Question: An excerpt from [this](http://www.chem4kids.com/files/matter_gas.html) page:

> 
> Gases can fill a container of any size or shape. It doesn't even matter how big the container is. The molecules still spread out to fill the whole space equally. That is one of their physical characteristics. 
> 
> 
> 

If a fixed quantity of gas is let out in a limited space, will it spread out equally and maintain a fixed gas distribution throughout the space?

Or, does it go where the gravitational pull is maximum? And what factors affect the distribution of gas in a given area?

Answer: 
Yes, without gravity, the gas fill out the space evenly so you can get uniform distribution of gas. Certainly, it only occurs at thermodynamic equilibrium, that is, if you wait for a long time.

With gravity, the density would be higher at location of lower gravitational potential. If we can treat the gas as ideal gas, then each gas molecule is independent with each other and the distribution will be following the Boltzmann distribution $e^{-E/k\_BT}$.

Near the surface of the Earth, the energy is roughly given by $E=mgh$, therefore the higher from the ground, the lower the density and it decreases exponentially. Real situation are more complicated as the molecule can absorb light energy, but it is still true in general. So the Earth can trap the gas even though it is not a closed container.

In practice, gas in small container can be treated as uniformly distributed since the gravitational potential difference is small.
Of course gravity affects distribution.

That is why we have 'layers' of atmosphere surrounding the earth. The lower layers are very dense, and the density decreases as we go outwards, to zero in space. 

When a limited amount of gas is released in a containter, it will fill up the space *almost* equally; the lower regions will be slightly denser (depends on how much gas is present and how tall the container is). If the container's height is comparable to the radius of the earth, then because of the mere weight of the gases on top, we'd have more pressure at the bottom - which is literally what's happened in the atmosphere! In the case of small containers - yes, even a ship could be considered small - the effect would be negligible, but in theory, the lower portions WOULD be denser, even by a really tiny amount. 

Evem if you were to do it in space, the container in which you performed the experiment has mass, and subsequently its own gravitational field - and this would affect the distribution too. 

However, if you completely remove gravity, then - yes, gas spreads out exactly evenly everwhere. 

---

You've quoted from a kids' chemistry site. They obviously won't get into the depths of it - it's just basics, perhaps that's why they haven't mentioned it. See, they even mentioned that vapour and gases mean the same thing - although there is a difference. Vapour is definitely a gas and in the gaseous state, but not all gas is vapour!!! ;)

$P.S$: I finished + posted this answer more than 2 hours ago :/ Unfortunately my stupid internet connection conked off and it didn't post it until now, when I got connectivity again.