# Question: the following application of bayes rule often occurs in actual...

###### Question details

The following application of Bayes rule often occurs in actual
medical practice. Suppose you have tested positive for a disease.
What is the probability you actually have the disease? It depends
on the sensitivity and specificity of the test, and on the
prevalence (prior probability) of the disease.

We’ll denote:

a positive test as: Test = pos

a negative test as: Test = neg

presence of disease as: Disease = true

absence of disease as: Disease = false

We know from clinical studies done on the test before FDA approval
that the sensitivity and specificity of the test are:

p (Test = pos | Disease = true) = 0.95 (true positive
rate, or sensitivity)

p (Test = neg | Disease = false) = 0.90 (true negative
rate, or specificity)

From which we can also deduce:

p (Test = neg | Disease = true) = 0.05 (false negative rate)

p (Test = pos | Disease = false) = 0.10 (false positive rate)

We also know from public health surveys that the disease is
relatively rare. The prevalence in the general population is:

p (Disease = true) = 0.01

From which we can deduce:

p (Disease = false) = 0.99

a) Use Bayes rule to calculate p (Disease = true | Test = pos),
i.e. the probability you actually have the disease, given the test
was positive.

b) Calculate the ratio p (Disease = true | Test = pos) / p (Disease
= true). [ In Bayesian statistics, a ratio like this is interpreted
as the effect of new evidence on our beliefs about a probability.
In this case, we are concerned with the probability of disease, and
the new evidence is the test result.]