Air is a mixture: mostly nitrogen and oxygen, with argon and a little carbon dioxide. How does each gas contribute to the pressure? The The Ideal Gas Law answers that, using the mole fractions you already know.
Key idea
Dalton's law: in a mixture of gases, each gas exerts the pressure it would have alone in the same container (its partial pressure), and the total is the sum: $$P_\text{total} = P_A + P_B + \cdots, \qquad P_A = \chi_A\,P_\text{total}.$$ A gas collected over water is mixed with water vapor: $P_\text{gas} = P_\text{total} - P_{\mathrm{H_2O}}$.
Why it works
In an ideal gas the molecules don't interact; each one hits the walls as if the others weren't there. Pressure comes from those hits, and $PV = nRT$ says the pressure is proportional to the number of molecules, $n$, at a given $V$ and $T$, whatever kind they are. So each gas's share of the pressure is its share of the molecules: its mole fraction. A heavy molecule hits harder but moves slower, and at the same temperature the two effects cancel exactly; that is why only the count matters.
Try it in Gas in a Box: mix two gases and read each one's partial pressure.
Worked example: A mixture of two gases
A tank holds $2.00\ \text{mol}$ of He and $1.00\ \text{mol}$ of Ar at a total pressure of $6.00\ \text{atm}$. Find the partial pressure of each.
- $\chi_\text{He} = \dfrac{2.00}{3.00} = 0.667$; $\chi_\text{Ar} = 0.333$.
- $P_\text{He} = 0.667 \times 6.00 = 4.00\ \text{atm}$; $P_\text{Ar} = 2.00\ \text{atm}$.
Answer: He $4.00\ \text{atm}$; Ar $2.00\ \text{atm}$.
Worked example: Collected over water
Hydrogen gas is collected over water at $25^\circ\text{C}$ in a $0.250\ \text{L}$ tube. The total pressure is $755\ \text{mmHg}$, and water's vapor pressure at $25^\circ\text{C}$ is $23.8\ \text{mmHg}$. How many moles of $\mathrm{H_2}$ were collected?
- $$P_{\mathrm{H_2}} = 755 - 23.8 = 731\ \text{mmHg} = 731/760 = 0.962\ \text{atm}$$
- $$n = \dfrac{PV}{RT} = \dfrac{(0.962)(0.250)}{(0.08206)(298.15)} = 9.83 \times 10^{-3}\ \text{mol}$$
Answer: $9.83 \times 10^{-3}\ \text{mol}$
Common mistake
Thinking the gas with heavier molecules supplies more of the pressure, or forgetting the water vapor in a gas collected over water. Pressure depends on the number of molecules, not their mass: in a 1 : 1 mixture of He and Ar, each supplies half. And a tube over water always holds water vapor; subtract its vapor pressure before using $PV = nRT$. Check: the partial pressures must add up to the total.