The pressure of a sample in the gas state only depends on
the concentration and temperature: it does not matter what
the substance is. Particles with greater mass hit the wall
harder, but are moving more slowly at a given temperature.
The two effects cancel out. If samples are at the same temperature
and pressure, we can use volumes to compare numbers of particles.
The two samples below are at the same temperature and pressure.
One container is twice the volume of the other. Predict how
the number of carbon dioxide particles will compare to the
number of oxygen particles, then check your prediction: