JACQUES D. answered 08/18/20
Ivy league and MIT educated Chemical Engineer with career as teacher
Assume 1 moles worth of "dry" air which consists of .2095 moles of oxygen and .7905 moles of not oxygen. This is the case for 0% humidity. Let's set the pressure of the air at 1 atm, so the partial pressure of oxygen is .2095 atm and the partial pressure of not oxygen is .7905 atm. (note the partial pressure of a gas is equal to its mole fraction (i.e. moles of that gas/ total moles) times the total pressure. ( Pi = (ni/nT) PT = xiPT)
100% humidity means that PH2O = vapor pressure of H2O at the temperature of the air. At 20°C that is 17.5424 mmHg or 17.5424/760 = .02308 atm
So a Volume of air will expand with the extra water vapor. If we want to compare the same volume of "wet" air as dry air, we hold the volume we are treating as our system constant (like air in an open bottle). We also hold the pressure constant and the temperature constant. As a result, the moles of "air" will remain constant. The mole ratio of oxygen to not oxygen (nitrogen, argon, and other gases than water) will stay in proportion but it will only be the fraction of (1 atm - .02308 atm of water vapor)
Therefore, the mole fraction of oxygen 0% humidity is .2019
the mole fraction at 100% humidity is (1-.02308)(.2019 ) (note that for 1 mole of air at one atmosphere, the moles, the mole fraction, and the partial pressure are all the same numerical value - I actually calculated PO2. Xi = Pi/ 1 atm.
I hope that helps.