Editing 1132: Frequentists vs. Bayesians

Jump to: navigation, search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 4: Line 4:
 
| title    = Frequentists vs. Bayesians
 
| title    = Frequentists vs. Bayesians
 
| image    = frequentists_vs_bayesians.png
 
| image    = frequentists_vs_bayesians.png
| titletext = 'Detector! What would the Bayesian statistician say if I asked him whether the--' [roll] 'I AM A NEUTRINO DETECTOR, NOT A LABYRINTH GUARD. SERIOUSLY, DID YOUR BRAIN FALL OUT?' [roll] '... yes.'}}
+
| imagesize =
 +
| titletext = 'Detector! What would the Bayesian statistician say if I asked him whether the--'<br>[roll] 'I AM A NEUTRINO DETECTOR, NOT A LABYRINTH GUARD. SERIOUSLY, DID YOUR BRAIN FALL OUT?'<br>[roll] '... yes.'}}
  
 
==Explanation==
 
==Explanation==
This comic is a joke about jumping to conclusions based on a simplistic understanding of probability. The "{{w|base rate fallacy}}" is a mistake where an unlikely explanation is dismissed, even though the alternative is even less likely. In the comic, a device tests for the (highly unlikely) event that the sun has exploded. A degree of random error is introduced, by rolling two {{w|dice}} and lying if the result is double sixes. Double sixes are unlikely (1 in 36, or about 3% likely), so the statistician on the left dismisses it. The statistician on the right has (we assume) correctly reasoned that the sun exploding is ''far more'' unlikely, and so is willing to stake money on his interpretation.
+
This is another comic about the accuracy of presidential election predictions that used Bayesian statistical models, such as Nate Silver's ''538'' and Professor Sam Wang's ''PEC''. Thomas Bayes studied conditional probability - the likelihood that one event is true when given information about some other related event. From {{w|Bayes Theorem|Wikipedia}}: "Bayesian interpretation expresses how a subjective degree of belief should rationally change to account for evidence".
  
The labels given to the two statisticians, in their panels and in the comic's title, are not particularly fair or accurate, a fact which [[Randall]] has acknowledged:<ref name="munroe-on-gelman">[http://web.archive.org/web/20130117080920/http://andrewgelman.com/2012/11/16808/#comment-109366 Comment by Randall Munroe] to "I don’t like this cartoon", blog post by Andrew Gelman in ''Statistical Modeling, Causal Inference, and Social Science''. Archived Jan 17 2013 by the Wayback Machine.</ref>
+
In the comic, the likelihood that the detector is lying is much higher than the likelihood of the Sun exploding. Therefore, one should conclude that a single "yes" result is probably a false positive. The bit about "p < 0.05" comes from a naive interpretation of modern scientific research standards (known as the P value), where a result is presumed to be valid if there is less than a 5% chance that it came from random chance. There is a 1/36 chance of rolling two sixes on 2d6.
<blockquote>I seem to have stepped on a hornet’s nest, though, by adding “Frequentist” and “Bayesian” titles to the panels. This came as a surprise to me, in part because I actually added them as an afterthought, along with the final punchline. … The truth is, I genuinely didn’t realize Frequentists and Bayesians were actual camps of people—all of whom are now emailing me. I thought they were loosely-applied labels—perhaps just labels appropriated by the books I had happened to read recently—for the standard textbook approach we learned in science class versus an approach which more carefully incorporates the ideas of prior probabilities.</blockquote>
 
  
The "{{w|Frequentist inference|frequentist}}" statistician is (mis)applying the common standard of "{{w|P-value|p}}<0.05". In a scientific study, a result is presumed to provide strong evidence if, given that the {{w|null hypothesis}}, a default position that the observations are unrelated (in this case, that the sun has ''not'' gone nova), there would be less than a 5% chance of observing a result as extreme. (The null hypothesis was also referenced in [[892: Null Hypothesis]].)
+
The title and the last two frames suggest that "frequentist" interpretation of statistics is somehow wrong, which is not actually the case. The Bayesian interpretation and the frequentist interpretation are not mutually exclusive and neither is wrong. It's the misuse of P values that causes the character in the panel labeled "Frequentist Statistician" to conclude that the sun has exploded, not the use of frequentist statistics.
  
Since the likelihood of rolling double sixes is below this 5% threshold, the "frequentist" decides (by this rule of thumb) to accept the detector's output as correct. The "{{w|Bayesian statistics|Bayesian}}" statistician has, instead, applied at least a small measure of probabilistic reasoning ({{w|Bayesian inference}}) to determine that the unlikeliness of the detector lying is greatly outweighed by the unlikeliness of the sun exploding. Therefore, he concludes that the sun has ''not'' exploded and the detector is lying.
+
The final panel is a tongue-in-cheek reference to the absurdity of the premise. If the sun did explode, he won't need to pay out the bet because the Earth and everyone on it would be destroyed. But if it didn't explode, then he'll win $50. It also likely refers to a well-publicized bet that Nate Silver tried to make with Joe Scarborough regarding the outcome of the election:
  
A real statistician (frequentist or Bayesian) would probably demand a lower ''p''-value before concluding that a test shows the Sun has exploded; physicists tend to use 5 sigma, or about 1 in 3.5 million, as the standard before declaring major results, like discovering new particles.  This would be equivalent to rolling between eight and nine dice and getting all sixes, although this is still not "very good" compared to the actual expected likelihood of the Sun spontaneously going nova, as discussed below.
+
[[File:Nate Silver Tweet.png|.@JoeNBC: If you think it's a toss-up, let's bet. If Obama wins, you donate $1,000 to the American Red Cross. If Romney wins, I do. Deal?|right]]
  
The line, "Bet you $50 it hasn't", is a reference to the approach of a leading Bayesian scholar, {{w|Bruno de Finetti}}, who made extensive use of bets in his examples and thought experiments. See {{w|Coherence (philosophical gambling strategy)}} for more information on his work. In this case, however, the bet is also a joke because we would all be dead if the sun exploded.  If the Bayesian wins the bet, he gets money, and if he loses, they'll both be dead before money can be paid. This underlines the absurdity of the premise and emphasizes the need to consider context when examining probability.
+
The title text refers to a classic series of logic puzzles known as {{w|Knights_and_Knaves#Question_3|Knights and Knaves}}, where there are two guards in front of two exit doors, one of which is real and the other leads to death. One guard is a liar and the other tells the truth. The visitor doesn't know which is which, and is allowed to ask one question to one guard. The solution is to ask either guard what the other one would say is the real exit, then choose the opposite. Two such guards were featured in the 1986 Jim Henson movie ''Labyrinth'', which is referenced in the text.
 
 
It is also possible that the use of the sun is a reference to Laplace's {{w|Sunrise problem}}.
 
 
 
The title text refers to a classic series of logic puzzles known as {{w|Knights and Knaves#Fork in the road|Knights and Knaves}}, where there are two guards in front of two exit doors, one of which is real and the other leads to death. One guard is a liar and the other tells the truth. The visitor doesn't know which is which, and is allowed to ask one question to one guard. The solution is to ask either guard what the other one would say is the real exit, then choose the opposite. Two such guards were featured in the 1986 Jim Henson movie ''{{w|Labyrinth (1986 film)|Labyrinth}}'', hence the mention of "A LABYRINTH GUARD" here. A labyrinth was also mentioned in [[246: Labyrinth Puzzle]].
 
 
 
===Further a less serious mathematical exploration===
 
As mentioned, this is an instance of the {{w|base rate fallacy}}. If we treat the "truth or lie" setup as simply modelling an inaccurate test, then it is also specifically an illustration of the {{w|false positive paradox}}: A test that is rarely wrong, but which tests for an event that is even rarer, will be more often wrong than right when it says that the event has occurred.
 
 
 
The test, in this case, is a neutrino detector. It relies on the fact that neutrinos can pass through the earth, so a neutrino detector would detect neutrinos from the sun at all times, day and night. The detector is stated to give false results ("lie") 1/36th of the time.
 
 
 
There is no record of any star ever spontaneously exploding—they always show signs of deterioration long before their explosion—so the probability is near zero. For the sake of a number, though, consider that the sun's estimated lifespan is 10 billion years. Let's say the test is run every hour, twelve hours a day (at night time). This gives us a probability of the Sun exploding at one in 4.38×10<sup>13</sup>. Assuming this detector is otherwise reliable, when the detector reports a solar explosion, there are two possibilities:
 
# The sun '''has''' exploded (one in 4.38×10<sup>13</sup>) and the detector '''is''' telling the truth (35 in 36). This event has a total probability of about 1/(4.38×10<sup>13</sup>) × 35/36 or about one in 4.50×10<sup>13</sup>
 
# The sun '''hasn't''' exploded (4.38×10<sup>13</sup> − 1 in 4.38×10<sup>13</sup>) and the detector '''is not''' telling the truth (1 in 36). This event has a total probability of about (4.38×10<sup>13</sup> − 1) / 4.38×10<sup>13</sup> × 1/36 or about one in 36.
 
 
 
Clearly the sun exploding is not the most likely option. Indeed, Bayes' theorem can be used to find the probability that the Sun has exploded, given a result of "yes" and the prior probability given above:
 
 
 
: <math>
 
\begin{align}
 
P(\text{exploded}\,|\,\text{yes})&=\frac{P(\text{yes}\,|\,\text{exploded})P(\text{exploded})}{P(\text{yes})}\\
 
&=\frac{P(\text{exploded})(1-P(\text{lie}))}{P(\text{exploded})(1-P(\text{lie}))+P(\text{lie})(1-P(\text{exploded}))}\\
 
&\approx\frac1{1.25226\times10^{12}}
 
\end{align}
 
</math>
 
  
 
==Transcript==
 
==Transcript==
:[Caption above the first panel:]
+
:Did the sun just explode? (It's night, so we're not sure)
:<big>Did the sun just explode?</big>
 
:(It's night, so we're not sure)
 
  
:[Two Cueball-like guys stand on either side of a small table with a small black device on it. The device has white lines (ventilation) and two small antennas and a button on top. When the device speaks it uses in Westminster typeface. The Guy on the left, called Frequentist Statistician in the 2nd panel, points to the device. The guy on the right, called Bayesian Statistician in the 3rd panel, is just looking at the device. Above the spoken word from the device is a sound.]
+
:[Two statisticians stand alongside an adorable little computer that is suspiciously similar to K-9 that speaks in Westminster typeface]
 
:Frequentist Statistician: This neutrino detector measures whether the sun has gone nova.
 
:Frequentist Statistician: This neutrino detector measures whether the sun has gone nova.
:Bayesian Statistician: Then, it rolls two dice. If they both come up as six, it lies to us. Otherwise, it tells the truth.
+
:Bayesian Statistician: Then, it rolls two dice. If they both come up as six, it lies to us. Otherwise, it tells the truth.
:Frequentist Statistician: Let's try. ''Detector! Has the sun gone nova?''
+
:Frequentist Statistician:: Let's try. [to the detector] Detector! Has the sun gone nova?
:Sound:''Roll''  
+
:Detector: ''roll'' YES.
:Device: <big>YES.</big>
 
  
:[Two panels side by side are beneath the first panel. together they are broader than the top panel. Above each panel is a caption. In the left panel only the left statistician is shown with the device on the table. And in the right panel only the right statistician is shown with the device on the table. both are just looking at the device.]
 
 
:Frequentist Statistician:
 
:Frequentist Statistician:
 
:Frequentist Statistician: The probability of this result happening by chance is 1/36=0.027.  Since p<0.05, I conclude that the sun has exploded.
 
:Frequentist Statistician: The probability of this result happening by chance is 1/36=0.027.  Since p<0.05, I conclude that the sun has exploded.
Line 62: Line 35:
 
:Bayesian Statistician: Bet you $50 it hasn't.
 
:Bayesian Statistician: Bet you $50 it hasn't.
  
==Trivia==
+
{{comic discussion}}  
* The Sun will never explode as a supernova, because it does not have enough mass to undergo core collapse and also does not have a companion star
 
*In the same blog comment as cited above<ref name="munroe-on-gelman"/>, Randall explains that he chose the "sun exploding" scenario as a more clearly absurd example than those usually used:
 
<blockquote>…I realized that in the common examples used to illustrate this sort of error, like the cancer screening/drug test false positive ones, the correct result is surprising or unintuitive. So I came up with the sun-explosion example, to illustrate a case where naïve application of that significance test can give a result that’s obviously nonsense.</blockquote>
 
*"Bayesian" statistics is named for Thomas Bayes, who studied conditional probability — the likelihood that one event is true when given information about some other related event. From {{w|Bayes Theorem|Wikipedia}}: "Bayesian interpretation expresses how a subjective degree of belief should rationally change to account for evidence".
 
* The "frequentist" says that 1/36 = 0.027. It's actually 0.02777…, which should round to 0.028.
 
* Using neutrino detectors to get an advance warning of a supernova is possible, and the {{w|Supernova Early Warning System}} does just this. The neutrinos arrive ahead of the photons, because they can escape from the core of the star before the supernova explosion reaches the mantle.
 
 
 
==References==
 
<references/>
 
 
 
{{comic discussion}}
 
 
 
 
[[Category:Comics featuring Cueball]]
 
[[Category:Comics featuring Cueball]]
[[Category:Multiple Cueballs]]
+
[[Category:Math]]
 
[[Category:Statistics]]
 
[[Category:Statistics]]
[[Category:Physics]]
 
[[Category:Astronomy]]
 

Please note that all contributions to explain xkcd may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see explain xkcd:Copyrights for details). Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following CAPTCHA:

Cancel | Editing help (opens in new window)