2
$\begingroup$

I have following data from experiment to assess accuracy of test in patients with and without disease:

enter image description here

Where T stands for test and D stands for disease.

I want to get probability of (D+|T+) with prevalence of disease at 0.9 (90%)

I used formula:

P(D+|T+) = P(T+|D+) * P(D+) / P(T+)

P(T+|D+) = 80/100 = 0.8    (from table)
P(T+) = 90/200 = 0.45      (from table)
P(D+) = 0.9    (given for actual population)

Hence:
P(D+|T+) = 0.8 * 0.9 / 0.45 = 1.6

However, how can probability be > 1

Where is the error in my calculations ?

$\endgroup$
2
  • 2
    $\begingroup$ But D+ is 50% in the table, not 90%. $\endgroup$ – COOLSerdash Jun 9 '20 at 11:00
  • 1
    $\begingroup$ It is 50% in experiment (table) but I want to apply these results to another (real) population where D+ is 90% $\endgroup$ – rnso Jun 9 '20 at 11:03
4
$\begingroup$

$P(D+|T+)$ is commonly called the positive predictive value (PPV). A general formula for the PPV is:

$$ \mathrm{PPV} = \frac{\text{sensitivity} \times \text{prevalence}}{\text{sensitivity} \times \text{prevalence} + (1-\text{specificity})\times (1-\text{prevalence})} $$

The sensitivity based on your table is $P(T+|D+)=80/100=0.8$ and the specificity is $P(T-|D-)=90/100=0.9$. Assuming a prevalence of $\color{red}{0.9}$, the PPV is (values of the prevalence are colored in red) $$ \mathrm{PPV}=\frac{0.8\times \color{red}{0.9}}{0.8\times \color{red}{0.9} + (1 - 0.9)\times (1-\color{red}{0.9})} = 0.986 $$

You could also create a table with the same sensitivity and specificity as in the table above but with a prevalence of $0.9$:

NewTable

If you apply Bayes' theorem on this table, you'll get the same result: $$ P(D+|T+)=\frac{0.8\times 0.9}{0.73} = 0.986 $$

Here is a graph showing the PPV for different prevalences:

PPVpic

$\endgroup$
2
  • $\begingroup$ Ok. Is there some formula to get PPV using values in my table and Prevalence of 0.9? $\endgroup$ – rnso Jun 9 '20 at 11:20
  • $\begingroup$ @mso Yes: Use the first formulas and put in the sensitivity and specificity from your table and a prevalence of 0.9, as shown. $\endgroup$ – COOLSerdash Jun 9 '20 at 11:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.