Final answer:
Gases at STP have different densities because their densities are directly proportional to their individual molar masses. The volume a gas occupies at STP is constant (22.4 L for 1 mole), so the higher the molar mass, the higher the density.
Step-by-step explanation:
Two gases at STP (Standard Temperature and Pressure) can have different densities primarily because the densities of gases are influenced by their molar mass. At STP, one mole of any ideal gas occupies 22.4 L. Therefore, the density (p) of a gas, calculated as mass (m) per volume (V), is directly proportional to its molar mass. Different gases have different molar masses, which leads to the variation in their densities.
For instance, the density of air at sea level and 15 °C is approximately 1.224 g/L, whereas if we take another gas like gaseous ammonia (NH3), its density at STP is 0.0007 g/mL. The density of liquid ammonia, however, is significantly higher at 0.64 g/mL, demonstrating how phase changes from liquid to gas greatly increase volume and thus decrease density.