The formula is only valid for dry air. For humid air the molecular weight changes. For the plotted graph the following reasonable assumptions have been made:
Temperature at the ground: 20°C Temperature decrease rate:  1°C / 200 m Temperature at 10000 m:  30°C
Pressure at the ground: 1000 hPa
It can be seen from the calculated pressures in higher altitudes, that the pressure in 5,500 m is about 500 hPa in 11,000 m about 250 hPa.
