XKCD usually has solid (and often contemporary) science behind it. Lightning Difference, #2027 one says:
Q: What’s that trick for telling how many miles away lightning is?
A: Just count the seconds between the visible flash and the radio wave burst, then multiply by 5 billion.
Usually it's lightning versus thunder, and you divide the time by 5 (or thereabouts) to get the distance in miles.
Here though, light time for 1 mile (about 1600 meters) would be about 5.3E-06 seconds, and if the difference between the visible light flash and the radio burst were one five-billionths of a second (2E-10 seconds), that suggests a velocity difference of about 38 ppm.
What is the physics behind that 38 ppm difference?
Best Answer
I think it's fair to say that explainxkcd.com is the authoritative source for questions regarding xkcd. In this case, a detailed discussion (including formulas) is taking place on the page for xkcd 2027.
Here's a quote from its current text:
As for why radio waves are slower in air than visible light - I don't know, and I didn't find any useful sources, but I guess it's because even in the troposphere some molecules are ionized, and the free electrons affect radio waves much more than waves of higher frequencies. What I read about the ionosphere and dispersion due to free electrons in the interstellar medium seems to support that idea. But it's just a guess - I may be completely wrong.