The numbers
After a positive test, how likely is the condition?
16.1%Among people with a positive test, 16.1% have the condition.
It is not 95.0%. Among people who have the condition, 95.0% receive a positive test.
Out of 10,000 people
590 positive tests. 95 of them come from people with the condition.
- A and B
- 95
- not A, but B
- 495
- A, not B
- 5
- not A, not B
- 9,405
Calculations
2 × 2 count table
| Positive test | Negative test | Total | |
|---|---|---|---|
| Condition present | 95 | 5 | 100 |
| Condition absent | 495 | 9,405 | 9,900 |
| Total | 590 | 9,410 | 10,000 |
Derivation and odds form
Bayes calculation
P(A|B) = P(B|A)P(A) / [P(B|A)P(A) + P(B|not A)P(not A)]
Odds form
- Likelihood ratio
- 19x —
- Odds update
Base-rate sensitivity
Varying only the prior
| Prior | True B | False B | Posterior | Change |
|---|
Beta–Binomial model
Beta–Binomial model
Beta(alpha, beta) → Beta(alpha + heads, beta + tails)
Prior and posterior density
Both curves share the same scales.
- Prior: solid line
- Posterior: dashed line
- Means: dotted lines
- Thin dotted line: the flattened curve at a larger scale
| Distribution | Parameters | Mean | Standard deviation |
|---|---|---|---|
| Prior | Beta(1, 1) | 50.0% | 28.9% |
| Posterior | Beta(9, 3) | 75.0% | 12.0% |