AI Grounds
Open AI Grounds on a desktop
These interactive lessons need a larger screen. Please continue on a desktop or laptop computer.
AI Grounds
These interactive lessons need a larger screen. Please continue on a desktop or laptop computer.
Guided discovery
Count every positive signal before judging it.
Prior: real cases out of everyone before a signal. Use arrow keys on the slider. Press Enter or leave the number field to apply an exact edit.
Positive signals out of real cases. Use arrow keys on the slider. Press Enter or leave the number field to apply an exact edit.
Positive signals out of non-cases. Use arrow keys on the slider. Press Enter or leave the number field to apply an exact edit.
In this fictional scenario, a real case means has condition; a positive signal means tests positive. Expectations are model averages and can be fractional. This is not a simulated sample; actual counts vary.
| Group | Positive | Negative | Total |
|---|---|---|---|
| Real case | 9.5True positives | 0.5False negatives | 10 |
| No real case | 49.5False positives | 940.5True negatives | 990 |
| Total | 59 | 941 | 1000 |
True positives = 10 × 95% = 9.5.
False positives = 990 × 5% = 49.5.
The outlined table cells form this new reference group. Its total is 59 expected positives.
Real positives: 9.5 (≈ 16.1%). False positives: 49.5 (≈ 83.9%).
Posterior = 9.5 / (9.5 + 49.5) = 9.5/59; ≈ 16.1%
P(real | positive) = sensitivity × prior / [sensitivity × prior + false-positive rate × (1 − prior)]. The vertical bar means “given”. Both terms in the denominator are ways to get a positive result. Population size cancels, so the posterior depends on the rates.
Real cases before the signal.
1%
10 / 1000
True plus false positives.
59
9.5 + 49.5
Real cases among positive results.
≈ 16.1%
9.5 / 59
Medical Test; prior 1%, sensitivity 95%, false-positive rate 5%. 9.5 expected true positives and 49.5 false positives; posterior ≈ 16.1%.