Why Class Prevalence Affects Precision
With fixed true-positive and false-positive rates, changing how common positives are can change the fraction of positive predictions that are correct.
- Source
- Anbloq
- Language
- English
- Created
- Updated
- Chapters
- 4
- Reading time
- 1 min
In this article4 chapters
Trace a small rate table
At sensitivity 0.8 and false-positive rate 0.1, 100 positives and 900 negatives contribute about 80 true positives and 90 false positives in expectation. Bayes from counts gives precision near 0.47 from those expected counts.
Compare a different prevalence
With equal class sizes the same rates give a higher precision. Keep population and operating threshold in the report. See precision and recall.[1][2]
Hold conditional error rates fixed and change the class mix
A classifier detects eighty percent of positives and falsely flags ten percent of negatives. In one thousand items with one hundred positives, it flags eighty true and ninety false cases, giving precision \(80/170\). With fifty positives and equally many total items, forty true and ninety-five false flags give \(40/135\). See Bayes from a table.
Prevalence .10 → precision ≈ .471
Prevalence .05 → precision ≈ .296
Assumption: conditional rates unchanged
Check whether the rates actually transfer
A new population can also shift feature distributions or conditional errors. Re-estimate metrics with suitable data and record the observed prevalence.