text: The compressibility factor is defined in thermodynamics and engineering frequently as:
  where p is the pressure,  is the density of the gas and  is the specific gas constant,  being the molar mass, and the  is the absolute temperature (kelvin or Rankine scale).
  In statistical mechanics the description is:
  where p is the pressure, n is the number of moles of gas,  is the absolute temperature, and  is the gas constant, V is unit Volume
  For an ideal gas the compressibility factor is  per definition. In many real world applications requirements for accuracy demand that deviations from ideal gas behaviour, i.e., real gas behaviour, be taken into account. The value of  generally increases with pressure and decreases with temperature. At high pressures molecules are colliding more often. This allows repulsive forces between molecules to have a noticeable effect, making the molar volume of the real gas () greater than the molar volume of the corresponding ideal gas (), which causes  to exceed one. When pressures are lower, the molecules are free to move. In this case attractive forces dominate, making . The closer the gas is to its critical point or its boiling point, the more  deviates from the ideal case.