As temperature increases, so does the average speed of the atoms or molecules in a gas.
Average speed declines with increasing atomic mass.
A small fraction of the atoms in a gas move much faster than the average speed. Atoms can't escape from the lower parts of the atmosphere of a planet because they collide with other particles after traveling a short distance. In the thin outer atmosphere, however, a rapidly moving atom is unlikely to collide and be reflected back by another atom before escaping. Density is the mass of gas per unit volume. Gas pressure is the force per unit area exerted by the gas.