We revisit the mass ratio R between molecular hydrogen (H2) and atomic hydrogen (HI) in different galaxies from a phenomenological and theoretical viewpoint. First, the local H2 mass function (MF) is estimated from the local CO luminosity function (LF) of the FCRAO Extragalactic CO-Survey, adopting a variable CO-to-H2 conversion fitted to nearby observations. This implies an average H2-density Omega(H2)=(6.9±2.7)x10^(-5)/h and Omega(H2)/Omega(HI)=0.26±0.11 the local Universe. Secondly, we investigate the correlations between R and global galaxy properties in a sample of 245 local galaxies. Based on these correlations we introduce four phenomenological models for R, which we apply to estimate H2 masses for each HI galaxy in the HIPASS catalogue. The resulting H2-MFs (one for each model for R) are compared to the reference H2-MF derived from the CO LF, thus allowing us to determine the Bayesian evidence of each model and to identify a clear best model, in which, for spiral galaxies, R negatively correlates with both galaxy Hubble type and total gas mass. Thirdly, we derive a theoretical model for R for regular galaxies based on an expression for their axially symmetric pressure profile dictating the degree of molecularization. This model is quantitatively similar to the best phenomenological one at redshift z=0, and hence represents a consistent generalization while providing a physical explanation for the dependence of R on global galaxy properties. Applying the best phenomenological model for R to the HIPASS sample, we derive the first integral cold gas MF(HI+H2+helium) of the local universe.