As far as I know, sound is actually so slow that you don't need to average the noise and make an educated guess as to what to filter. Acoustic noise filtering in headphones should work by detecting the outside noise with a microphone and playing the cancelling wave form as soon as the sound wave reaches the interior of your headphone.
In contrast, you can't do that for the noise of a car on the road because here the whole car vibrates and you couldn't, even if you wanted to emit sounds that cancel whatever rumbles quickly enough. Therefore they employ some spectral analysis of the noise and cancel persistent noise. This, of course, wouldn't cancel the sound of hitting a wall.
Again, I'm not 100% sure about this because it's outside of my field of expertise. Corrections are welcome.