2545: Bayes' Theorem
Title text: P((B|A)|(A|B)) represents the probability that you'll mix up the order of the terms when using Bayesian notation.
Bayes' theorem describes the probability of an event, given knowledge of conditions related to the event. It is typically used to update the probability that a starting condition occurred, given an outcome. This can reveal unintuitive results when the probability involved is very small. For example, when testing a large number of people for a rare disease, even a fairly accurate test will produce more false positives than the number of people actually afflicted with the disease, and hence a positive result is more likely to be false than true.
|Tested positive||Tested negative||Total|
For example, if a test has a 100% sensitivity (first line, all those affected receive a positive result) and a 99% specificity (second line, 1% of the unaffected also receive a positive result), the interpretation of a positive test depends on the prevalence of the disease in the population. In the example case, the prevalence is 0.1% (third column), so that when the test result is positive (1% of the tests, left column) the subject is actually unaffected nine times out of ten. Although this would be a very performant test, given the relative prevalences involved it will produce overwhelmingly false positives among all positive results. (But, in this example, all those told they are not in danger — almost a hundred times more individuals than test positive — are correctly notified.)
For this same example, the Bayesian formula gives :
- P( Affected | Positive ) = P( Positive | Affected ) * P( Affected ) / P( Positive ) = 100% * 0.1% / 1% = 10%
- and P( Unaffected | Positive ) = P( Positive | Unaffected ) * P( Unaffected ) / P( Positive ) = 0.9009% * 99.9% / 1% = 90%
In this comic, a teacher is presenting a problem which the students are supposed to use Bayes' theorem to solve. However, the off-panel student knows that they are studying Bayes' theorem, so they use that prior knowledge to guess the usual answer to such problems. The punch line is the caption - The student doesn't need to do the calculation because they're familiar with questions involving Bayes' theorem and how they often present the counterintuitive result to illustrate the importance of prevalence to the calculation.
The title text refers to the mathematical definition of Bayes' theorem: P(A | B) = P(B|A) * P(A) / P(B). Here, P(A|B) represents the probability of some event A occurring, given that B has occurred. This is often referred to as "the probability of A given B". It can be hard to remember if P(A|B) means probability of A given B, or if it's B given A, especially when talking about the probability of an earlier cause given a later effect. Randall's joke is based on this difficulty. Here P((B|A)|(A|B)) is meant to be read as the probability that you write (B|A) given that the correct expression is (A|B), which makes it the probability that you got the order of the notation mixed up.
- [Miss Lenhart is pointing with a pointer, held in her right hand, to a white-board with tables, what looks like formulae and lots of other unreadable text. She looks toward her off-panel class, from where a voice replies to her question.]
- Miss Lenhart: Given these prevalences, is it likely that the test result is a false positive?
- Off-panel voice: Well, this chapter is on Bayes' Theorem, so yes.
- [Caption below the panel]:
- Sometimes, if you understand Bayes' Theorem well enough, you don't need it.
- When this comic came out, the title text was only "P((B", and the comic itself linked to A) or A) (depending on where the comic was viewed from) and the "Black Lives Matter" image in the header was replaced by "(A", but this was quickly corrected.
- See this archived version.
- It turns out that it is the notation that messes with the home page as it also messes with this wiki.
- In this version of this page, the correct title text has been entered, but it still looked the same so everything from behind the first "|" fails to show.
- Now this has been fixed using the <nowiki> format.
add a comment! ⋅ add a topic (use sparingly)! ⋅ refresh comments!