The difference in the speeds of sound in air, hydrogen, and carbon dioxide are the result of the different densities of these three gasses. The higher the density, the more resistance the sound waves have against them as they travel. The difference is comparable to the difference between running in water and running through the air on land. Water has a higher density than air does, and as such, there is more resistance against you when you run in water, consequently the same amount of force on land (in air) will produce a higher speed than the same force of running in water. At 0 degrees Celsius, and 1 atmosphere of pressure, the density of hydrogen is 0.09 g/L, the density of air is 1.29 g/L, and the density of carbon dioxide is 1.98 g/L. Since hydrogen has the lowest density of the three, the speed of sound will be fastest through hydrogen compared to the other two gasses. The speed of sound will be the slowest through carbon dioxide as its density of the three is the highest.