Average Molar Weight

We have a mixture of two gases, say nitrogen and hydrogen. 
To calculate the average molar weight M , the formula says:


M (average) = (hydrogen pressure/100).M(H2) + ( 1 - nitrogen pressure/100).M(N2)


What I haven't understood is that why do we have pressure in the formula?


What I don't find logical as well is that the unit on the left side isn't the same as that on the right side of the equation. 




I suppose the $100$ is not unitless, but implies to be $\pu{100 kPa}$.
Then both equation sides have the same dimension and average molar mass is a weighed average of gas molar masses.


 1

You are correct that the pressure units should cancel. However your formula 


M (average) = (hydrogen pressure/100).M(H2) + ( 1 - nitrogen pressure/100).M(N2)


doesn't make any sense to me.


If we assume that the 100 is for 100 kPa, and that the total pressure of the gas is 100 kPa, then the formula should be:


M (average) = (hydrogen pressure/100).M(H2) + (nitrogen pressure/100).M(N2)


 1