Baye’s theorem derived PPV and NPV

Let’s unveil the mathematics behind the relation between:

  1. Prevalence (Pre-test probability)
  2. Predictive value (Post-test probability)
  3. Sensitivity
  4. Specificity
PPV NPV Baye theorem


Total screened population = n
Prevalence = P
Sensitivity = Sn
Specificity = Sp
True positive = TP
True negative = TN
False positive = FP
False negative = FN
With disease = D+
Without disease = D-
Positive predictive value = PPV
Negative predictive value = NPV

Since, we calculate all these in percentage, lets assume n = 1
If n = 1,
Total diseased = D+ = P
Total without disease = D- = 1-P


Sn = TP rate = TP/D+
or, TP = Sn X D+ = SnXP

Sp = TN rate = TN/D-
or, TN = Sp X D – = SpX(1-P)

1-Sn = (D+ – TP)/D+ = FN/D+ = FN/P
or, FN = (1-Sn)XP

1-Sp = (D- – TN)/D- = FP/D- = FP/(1-P)
or, FP = (1-Sp)(1-P)


Just remember, prevalence (P) is there in all.
a. TP = + X + (truly positive)
b. TN = + X – (one positive and one negative)
c. FN = – X + (one positive and one negative)
d. FP = – X – (both negative by product is falsely positive)

FN has letter N, Sensitivity has letter N and there will be minus (-) on Sensitivity: FN = (1-Sn)XP — one negative, one positive

FP has letter P, Specificity and Prevalence both have letter P and there will be minus (-) on both: FP = (1-Sp) X (1-P) — both negative

Remember the other two, these are opposite. While FN relates to Sn, TN relates to Sp and while FP relates to Sp, TP relates to Sn.

TN = Sp X (1-P) — one positive one negative
TP = Sn X P — both positive

= SnXP/[SnXP + (1-Sp)(1-P)]

= SpX(1-P)/[SpX(1-P) + (1-Sn)XP]

You are often tested on exams with numerical questions. This is how, I try to figure out the Bayism in PPV and NPV when forgotten.

One Viewpoint ๐Ÿ’ฌ on “Baye’s theorem derived PPV and NPV”

Write your Viewpoint ๐Ÿ’ฌ

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.