Predicting the compressibility factor of natural gas