Bayes's Theorem and Inverse Probability
Bayes's Theorem and Inverse Probability
This Demonstration allows you to explore the quantitative relationship between two conditional probability assessments, and , one the inverse of the other, where stands for probability, for a proposition about a "diagnostic signal", and for a proposition about a "state" variable of interest. Typically, the relationship between these inverse probabilities is understood through Bayes's theorem:
P(S|D)
P(D|S)
P
D
S
P(S|D)=P(S)
P(D|S)
P(D|S)P(S)+P(D|¬S)(1-P(S))
You can vary (1) the red point, , the sensitivity of the diagnostic test; (2) the blue point, , where is the specificity of the diagnostic test; and (3) the purple point, , the base rate of the state. In this notation and are symbols for the negations of propositions and , read as "not " and "not ".
P(D|S)
P(D|¬S)=1-P(¬D|¬S)
P(¬D|¬S)
P(S)
¬S
¬D
S
D
S
D
The Demonstration also illustrates Bayes's theorem. Bayes's theorem compares an unconditional probability for the state, , also called a prior probability, with a conditional probability , commonly called a posterior probability. The basic idea here is simple enough: if a signal is more likely given state than it is on average, that is, , then the posterior probability of the state having seen signal should exceed the prior probability for the state, that is, , and vice versa if the signal is less likely given the state. This is logically evident from the expression for Bayes's theorem since the weighted average in the denominator of the right-hand side is in fact . This is clear in the graphic by focusing on the horizontal difference between the blue dot and the vertical line through the purple dot as you vary the underlying parameters specified in the sliders.
P(S)
P(S|D)
D
S
P(D|S)>P(D)
D
P(S|D)>P(S)
P(D)
Keeping simultaneous track of all of the conditional and unconditional probabilities used in inverse probability reasoning is difficult, especially so when one or more of the probabilities is varying. The red and blue dotted lines in the animation are designed to ease that cognitive load, using the idea of weighted averages as a "constraint" on one's thinking about probabilities of states and signals. For example, when the base rate or prior probability is varied, while and remain constant, must remain a weighted average of the two inverse conditional probabilities and , even though the weights and the inverse conditional probabilities used in determining this average will all be changing as changes! This particular "weighted average" constraint on is illustrated by the blue dotted line. Symmetrically, the red dotted line shows another constraint, all possible weighted averages of the two endpoints and , with varying weights . The key point here is that the two constraints are NOT independent. First, the intersection of the two constraints must occur precisely at the unconditional probabilities . And second, given the red dotted line, that is, given the specification of the sensitivity and specificity of the test via the parameters in the animation, and given the base rate, also specified parametrically in the animation, the blue dotted line is fully determined. The endpoints of the blue dotted line, the two inverse conditional probabilities and , are especially interesting, since it is the difference between them that really indicates how "informative" the diagnostic signal is for the state. It is a worthwhile exercise to use the Demonstration to observe how uninformative a good (i.e., sensitive and specific) diagnostic test can be for very high or very low values of the base rate .
P(S)
P(D|S)
P(D|¬S)
P(S)
P(S|D)
P(S|¬D)
{P(D),1-P(D)}
P(S)
P(S)
P(D)
P(D|S)
P(D|¬S)
{P(S),1-P(S)}
P(S),P(D)
P(D|S)
P(D|¬S)
P(S)