CMatrixLab by Martin Grossman martin.grossman@gmail.com

Your flu test is positive. What’s the chance you really have flu? That’s precision—and it also depends on how common flu is among the people tested.
Compare 10% and 50% sick using the same test. Precision changes, even though the share of sick people correctly testing positive (TPR) and the share of people without flu getting a false alarm (FPR) stay the same.

50% 0% · no one has flu 100% · everyone has flu
TP · Correct detection FP · False alarm FN · Missed TN · Correctly ignored

Full dot or square = 10 people; smaller = partial.

Test −
Test +
Actual flu
500 cases
FN 0
TP 0
Actual no flu
500 cases
TN 0
FP 0
Among positive tests: —
Green: 0 have flu Red: 0 false alarms

1,000 weighted cases. Counts are expected values and may be fractional. Sick share changes counts and precision; TPR and FPR stay fixed at the same threshold and separation.