Molar mass of CH4 = 12 + 1(4) = 16 g mol–1
Molar mass of C2H4 = 2(12) + 1(4) 28 g mol–1
When these molecules are present in the x: y, their average molar mass
= \(\frac{\mathrm{x}\times16\times y\times28}{\mathrm{x}+y} \) = 20 g mol-1
i.e. 16x + 28y = 20(x + y)
or 4x + 7y = 5(x + y)
or x = 2y
or \(\frac{\mathrm{x}}{y}\) = \(\frac{2}{1}\) = 2 : 1
If the ratio is reversed, now ratio x : y = 1 : 2
\(\therefore\) Average molar mass = \(\frac{1\times16+2\times20}{1+2}\) = 24 g mol–1