The speed of sound in a gas depends upon the average speed of the gas molecules. Why is such a relationship reasonable?
The greater the density of the medium ie gas pressure, temperature, the better sound traves through it. Why? because there are more molecules per volume to resonate with the propagating waves.