The speed of sound in a medium is determined by the properties of that medium, including its density and elastic properties. The speed of sound in a gas depends on factors such as temperature, molecular mass, and molecular interactions.
In general, the speed of sound is faster in gases with lighter molecules because they have lower molecular masses and can move more quickly. Oxygen (O₂) has a molecular mass of about 32 grams per mole, while air is composed of various gases, including nitrogen (N₂) and oxygen, which have an average molecular mass of about 29 grams per mole.
When we refer to the speed of sound in air, we are considering the average molecular mass of the gases in the atmosphere. Since oxygen is a component of air, the average molecular mass of air is slightly lower than that of pure oxygen.
Therefore, the speed of sound in oxygen is slightly lower than the speed of sound in air because the average molecular mass of air is slightly lighter due to the presence of other lighter gases such as nitrogen.