advertisement

Complements As explained in paragraphs 5.3 and 5.4, there are three quantities which you should know for interpreting the results of a diagnostic test. These are Sensitivity, Specificity and Prevalence. In a test there are two dichotomic random variable of interest. 1. The result of the test. We code its possible outcomes with Neg for Negative and Pos for positive. 2. The presence or absence of the characteristic which we are testing, for example a disease. We code its possible outcomes by Y if the characteristic is present and N if the characteristic is absent. In terms of conditional probabilities of the possible outcomes, the definitions of the quantities above are as follows Sensitivity = p(P os|Y ) Specificity = p(N eg|N ) Prevalence = p(Y ) For patients or doctors which receive the result of the test, the quantities of interests are instead: p(Y |P os) p(N |P os) p(Y |N eg) p(N |N eg) Since p(N |P os) = 1 − p(Y |P os) e p(Y |N eg) = 1 − p(N |N eg) we need only two formulas for the above quantities. These are p(Y |P os) = Sensitivity · Prevalence Sensitivity · Prevalence + (1 − Prevalence)(1 − Specificity) and p(N |N eg) = Specificity · (1 − Prevalence) Specificity · (1 − Prevalence) + Prevalence(1 − Sensitivity) Proof of the first identity p(Y |P os) = p(Y ∩ P os) p(P os|Y )p(Y ) = = p(P os) p(Y ∩ P os) + p(N ∩ P os) p(P os|Y )p(Y ) = p(Y ) · p(P os|Y ) + p(N )p(P os|N ) p(P os|Y )p(Y ) (1) p(Y ) · p(P os|Y ) + (1 − p(S))(1 − p(N eg|N )) 1 The first equality comes from the definition of conditional probabilities. The second equality comes from N = S c , hence P os = P os ∩ Ω = P os ∩ (S ∪ S c ) = (P os ∩ S) ∪ (P os ∩ S c ). The third is just for the definition of conditional probabilities The last, which ends the proof of the result, follows from the general fact that p(A|B) + p(Ac |B) = 1 as follows immediately from the definition of conditional probabilities. 2 The second equality can be proved in a completely analogous way. In the proof of the identity, we have also proved the following useful formulas p(P os) = Sensitivity · Prevalence + (1 − Prevalence)(1 − Specificity) and p(N eg) = Specificity · (1 − Prevalence) + Prevalence(1 − Sensitivity). The two formulas are not independent, since their sum is one. 2