# What's the physics behind XKCD #2027 (time between lightning flash and radio wave burst)?

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?

• Hint: index of refraction varies with frequency. Aug 1, 2018 at 14:41
• You seem to be asking "Why does the speed of EMR in a medium depend on frequency?" Possible duplicate of Why do prisms work (why is refraction frequency dependent)? Aug 1, 2018 at 16:40
• @uhoh always check the hover text on xkcds.. sometimes the entire joke is hidden in there :) Aug 1, 2018 at 17:15
• @uhoh Looks like you have 2027 xkcds to reread.
– Yakk
Aug 1, 2018 at 17:17
• @Jasper to be pedantic, technically what (almost) everyone who reads xkcd calls "alt text" is "title text" as "alt text" is the text that is show when the image fails to render, not the text that is show on mouse-over. Though I doubt it would have been any more clear to those who are unfamiliar with it if you used the "correct" term. Aug 1, 2018 at 19:17

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:

According to Wikipedia and other sources, refractive index of air at 0°C is about 1.000277, which equates to a speed of light around 299709.4 km/s (186230.8 miles/s). According to this paper, refractive index for radio waves in similar conditions is 1.000315, which equates to a speed around 299698.1 km/s (186223.7 miles/s). This means that to get the distance, the time difference in seconds between visible flash and radio burst should be multiplied by about 4.9 billion for miles, or about 7.9 billion for kilometers. More details for the calculations are in the comments below.

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.

• I'll give this a read right away, thank you! I had no idea there was such a thing as an explainedxkcd!
– uhoh
Aug 1, 2018 at 22:37
• I love explainxkcd.com! And I love its motto: "Explain xkcd: It's 'cause you're dumb." ;-) Certainly applies to me. For at least a third of the comics, I need explainxkcd.com to understand what's going on, and in many other cases I need it to point out and explain all the nuances that I would otherwise miss. Great site! Aug 1, 2018 at 22:42
• Maths doesn't check out. Although I am starting with spherical lightning in a vacuum.
– Aron
Aug 2, 2018 at 7:40
• In this case spherical lightning is a rare and poorly understood physical phenomena. Whereas lightning in a vacuum is just nonsense.
– Aron
Aug 2, 2018 at 18:42
• @JonaChristopherSahnwaldt also lookup spherical cows.
– muru
Aug 3, 2018 at 3:42

Well, without researching this at all, I’m going to go out on a limb and say it’s due to the difference in refractive indexes between visible light and radio waves in air. Air has dispersion like everything else, and so electromagnetic waves of different frequencies travel at different speeds through it. If you know the difference in refractive index, you can compute the time delay per mile.

• Okay well dispersion is just another word for different propagation speeds for different frequencies, but can you go a little deeper into the physics of why the speeds for light and radio have this particular difference?
– uhoh
Aug 1, 2018 at 14:46
• @uhoh Sure! Dispersion is also another word for different polarizabilities of the medium for different frequencies. Apparently, the air molecules are more easily polarizable for radio waves than light. Ultimately, this would be related to the density of air, the strength of optically active molecular vibration/rotational resonances, and the relative detuning of the different EM frequencies from those resonances. Aug 1, 2018 at 14:56
• @uhoh can you go a little deeper into the physics of why the speeds for light and radio have this particular difference? What is particular about this difference? It has to be some value. Aug 1, 2018 at 16:44
• @sammygerbil I guess what he is getting would be be "is the value of 5 billion reasonable?" Aug 1, 2018 at 18:16
• @Tyberius It seems to me uhoh is asking about the physics of the 38 ppm difference in velocity between visible and radio waves, rather than the mathematics of the calculation for the distance of the lightning. Aug 1, 2018 at 18:23

Note that the explanation from explainxkcd.com is not entirely correct. Not completely wrong but they make the common error to confuse the group index with the refractive index.

It is the group index that is responsible for the delay of a burst, not the refractive index! *

While in air the group index differs only slightly from the refractive index, in the RF domain, where are many resonant absorption lines due to water, the group index can differ significantly from the refractive index. Also due to absorption lines, the group index is itself strongly frequency dependent in the RF domain.

The actual delay that is observed for a RF wave hence depends on H2O concentration and also on the actual frequency distribution of the wave packet. There is also the influence of the ionosphere.

I found this thesis which does an experimental study of the delay between the lighting and the receive of a frequency burst. Although it is not strictly RF domain, but at lower frequencies, they find different group velocities depending on the environmental conditions (e.g. day vs. night). At least I understand it that way.

*) In fact the refractive index can be below one or even negative without any violation of relativity ("no information can travel faster than the speed of light in vacuum"). The phase propagation (the refractive index refers to phase velocity) is not able to carry any information. Information propagation requires a modulated wave and there the group velocity (and group index) comes into play.

EDIT: Strictly speaking the group velocity is also not always the speed a wave packet travels. This is only true in weakly absorbing media. Since air qualifies as weakly absorbing the group index is in my opinion indeed the right quantity for the problem here, but for completeness I will explain the full story:

Group velocity is the velocity of the envelope of a wave packet. If the absorption is so strong that the shape of the wave packet envelope itself changes during propagation, then group velocity is no longer appropriate to describe the propagation speed. One the other hand it is very difficult to asses the speed of something that changes its shape during propagation. That is why there are other definitions of velocity. Depending on the criteria one uses there is e.g. Front velocity or velocity of energy transport. The velocity that can never exceed the speed of light in vaccuum is the Front velocity. However this is also a bit difficult to work with, both experimentally and theoretically.

As references to the topic one has the book by Brillouin and Sommerfeld "Wave Propagation and Group Velocity" (1960) and the article "The Velocities of Light" by R. Smith (1970) (Thanks to David for pointing this out).

• I had a hunch there was some real physics here, thank you! Yes, with a dispersive medium and a broadband transient, what timing the speed of the "burst" means deserves some thought! I'll give that thesis a looks this week, thank you!
– uhoh
Aug 3, 2018 at 9:06
• @uhoh: Yes speed of wave bursts is a difficult topic with subtle nuances. BTW the thoughts of famous physicists on speed of propagation even fill a full book "Wave Propagation and Group Velocity" by Léon Brillouin. Aug 3, 2018 at 9:55
• This is the real answer; this needs to go to the top! Aug 3, 2018 at 11:04
• @knzhou indeed, I agree!
– uhoh
Aug 3, 2018 at 11:57
• @David: I knew it. Someone had to bring this up :-). Surely you are correct. I was hesitating to put this into the answer in the first place and actually deleted the remark on Front velocity... But now that this is the accepted answer it changes it a bit and I will add it for completeness. Thanks for the paper link. Aug 3, 2018 at 12:23

The question of "why" radio waves have a lower speed in air than light might be due to the interactions of radio waves with diatomic molecules ( O1 and N1 ). The radio photons energy are going to be closer to the "available" transition energy for rotations. The Hyperphysics page has a discussion. Think of it as the cumulative effect of many photons causing transitions, but the molecules are then re-emitting the photons with a slight delay.

Visible light has a much higher energy per photon and the probability of an interaction with the rotational modes of diatomic molecules is much lower, so the gas is less "prismatic" to visible light. (I changed the adjective describing refractivity from "transparent" to "prismatic" since transparency could also describe the absorptive index.