The density or thickness of air does affect the speed at which waves, such as light or sound waves, travel through it. The relationship between the density of a medium and the speed of a wave is described by the concept of wave propagation.
For electromagnetic waves, such as light, the speed of propagation in a medium is determined by the properties of that medium, particularly its refractive index. The refractive index is a measure of how much slower light travels in a medium compared to its speed in a vacuum. In general, the refractive index of a medium increases with its density. So, in denser air (or any other medium), light will typically travel at a slower speed compared to less dense air.
When it comes to sound waves, the relationship is a bit more complex. The speed of sound in a medium depends on both its density and its compressibility. In gases like air, sound travels by compressing and rarefying the air molecules as it propagates. The denser the air, the more closely packed the molecules are, and thus the easier it is for sound waves to propagate. As a result, in denser air, sound waves generally travel faster compared to less dense air.
It's important to note that variations in air density are usually small and have a relatively minor effect on the speed of light or sound in everyday conditions. However, in extreme situations, such as at high altitudes where air density is significantly reduced, the speed of sound and light can be noticeably different from their values at sea level.
In summary, the density or thickness of air affects the speed of wave propagation. In the case of light, higher air density generally leads to slower propagation. For sound waves, denser air typically results in faster propagation.