Bayes' Rule from a Small Frequency Table

Bayes' rule reverses a conditional question by recalculating the denominator for the observed result.

Source
Anbloq
Language
English
Created
Updated
Chapters
4
Reading time
1 min
In this article4 chapters
  1. Use tangible counts
  2. Keep the two questions separate
  3. Count true positives and false positives in the same population
  4. Change prevalence while keeping conditional flag rates fixed

Use tangible counts

Of 100 tickets, 20 are priority. Twelve of those receive a fast reply. Sixteen of the eighty ordinary tickets also receive one. Given a fast reply, the chance of priority is \(12/28=3/7\). Conditional probability explains the denominator.

Keep the two questions separate

Given priority, the fast-reply fraction is \(12/20\). Treating that as the reverse probability ignores the other group and its size. Total probability via groups helps build the total number or weight of fast replies.[1]

Count true positives and false positives in the same population

In a hypothetical batch of one thousand records, ten contain defects. A detector flags eight defective records and ninety-nine of the remaining clean records. Among flagged records, the defective fraction is \(8/107\), about 7.48 percent. The sensitivity among defective records is eighty percent. See conditional probability with counts.

                     Flag   No flag   Total
Defective              8        2       10
Clean                 99      891      990
Total                107      893     1000

Change prevalence while keeping conditional flag rates fixed

Lower prevalence gives clean records more opportunities to contribute false positives. To recompute the predictive probability for another population, apply the conditional flag rates to its new population mix and divide by all flags.

References

  1. Eric Lehman, F. Thomson Leighton and Albert R. Meyer, Mathematics for Computer Science ↩