A closer look at Atmospheric escape
Gas can leave a planet through thermal motion and several nonthermal processes.
Gravity, upper-atmosphere temperature, particle mass, and stellar irradiation all affect the outcome. A planet can lose some gases preferentially over others. Its orientation can change when the surrounding solar wind changes.
Light hydrogen escapes more readily than heavier species under comparable conditions. The atmosphere left behind can retain a chemical signature of that loss. For the surrounding ideas, see Planetary magnetosphere.
Want to learn more about Atmospheric escape? Atmospheric escape on Wikipedia.

