Arte SheetsLearn. Try. Understand.

Statistical

Bayes' Theorem formula: Positive Predictive Value (PPV) & false-positive paradox

Use a hypothetical fraud detector to calculate predictive values from prevalence, sensitivity and specificity.

Why base rates matter for interpreting a positive flag

Suppose fraud affects 1.0% of transactions (Prevalence A2 = 0.01), and your ML detector boasts 99.0% Sensitivity (catches 99% of true fraud, B2 = 0.99) and 99.0% Specificity (clears 99% of legitimate orders, C2 = 0.99 -> 1% False Positive Rate). Intuitively, people guess a flagged order is 99% likely to be fraud—wrong!

In an illustrative population of 10,000 orders, 100 are fraudulent. At 99% sensitivity, 99 are flagged. At 99% specificity, 99 of the 9,900 legitimate orders are also flagged. Half the flags are therefore true positives. These are expected counts under the assumed rates, not measured performance.

Updating the 50% posterior with a second positive result gives 99% only when the tests are conditionally independent given fraud status and given non-fraud status, with the same sensitivity and specificity. Repeating a correlated detector does not justify that update. With a 50% prior, the negative predictive value is also 99%, not 99.99%.

Bayesian Screening Metric (99% Sens / 99% Spec)Prevalence = 1%Prevalence = 10%2nd Independent Confirming Test
Positive Predictive Value P(D | +)50.00% (1-in-2 false alarm!)91.67%99.00% (Updated prior = 50%)
False Discovery Rate (1 - PPV)50.00%8.33%1.00%
Negative Predictive Value P(~D | -)99.99%99.89%99.00% (prior = 50%)

Bayes' Theorem Positive Predictive Value (PPV) and Negative Predictive Value (NPV)

Computes exact posterior P(Condition | Positive Flag) from Prior Prevalence (A2), Sensitivity (B2), and Specificity (C2).

=IF(OR(COUNT(A2:C2)<>3,MIN(A2:C2)<0,MAX(A2:C2)>1),"Invalid probabilities",IF(A2*B2+(1-A2)*(1-C2)=0,"Undefined conditional probability",ROUND((A2 * B2) / (A2 * B2 + (1 - A2) * (1 - C2)), 4)))

Negative Predictive Value P(Clear | Negative Result)

Measures confidence that a non-flagged item is genuinely clean: TrueNegatives / (TrueNegatives + FalseNegatives).

=IF(OR(COUNT(A2:C2)<>3,MIN(A2:C2)<0,MAX(A2:C2)>1),"Invalid probabilities",IF((1-A2)*C2+A2*(1-B2)=0,"Undefined conditional probability",ROUND(((1 - A2) * C2) / ((1 - A2) * C2 + A2 * (1 - B2)), 4)))

Try the example

Use the original values or change them to test your understanding.

Further reading