# Bayes Rule?

• January 26th 2008, 12:13 AM
Breeegzkm
Bayes Rule?

The sensitivity of a test is the probability that a person having the disease will test positive; the specificity of a test is the probability that a person not having the disease will have a negative test.
Experience indicates that its sensitivity is .0934 and that its specificity is 0.968. Furthermore, it is know that roughly 1 in 500 people has the disease.

Determine the probability that a person testing positive actually has the disease.
• January 26th 2008, 10:39 AM
CaptainBlack
Quote:

Originally Posted by Breeegzkm

The sensitivity of a test is the probability that a person having the disease will test positive; the specificity of a test is the probability that a person not having the disease will have a negative test.
Experience indicates that its sensitivity is .0934
;

So:

$P(positive|disease)=0.0932$

Quote:

and that its specificity is 0.968. Furthermore, it is know that roughly 1 in 500 people has the disease.
So:

$P(negative| \overline{disease})=0.968$

Quote:

Determine the probability that a person testing positive actually has the disease.

$P(disease|positive)= \frac{P(positive|disease)P(disease)}{P(positive)}$

and we are told that:

$P(disease)=0.002$

and so:

$P(positive)=P(positive|disease)P(disease)+P(positi ve|\overline{disease})P(\overline{disease})$

and you have sufficient data to evaluate allof these probbailities

RonL
• January 26th 2008, 04:26 PM
mr fantastic
Quote:

Originally Posted by Breeegzkm

The sensitivity of a test is the probability that a person having the disease will test positive; the specificity of a test is the probability that a person not having the disease will have a negative test.
Experience indicates that its sensitivity is .0934 and that its specificity is 0.968. Furthermore, it is know that roughly 1 in 500 people has the disease.

Determine the probability that a person testing positive actually has the disease.

I always find it easiest to try and show these things visually using, say, a karnaugh table:

I start off with: $\, \begin{tabular}{l | c | c | c} & D & D\, ' & \\ \hline +ve & a & b & a + b \\ \hline -ve & c & d & c + d \\ \hline & a + c & b + d & 1 \\ \end{tabular}$

Note that the answer to the question will be $\frac{a}{a + b} \,$ , so the values of a and a + b are needed.

From the given data it's known that:

a + c = 1/500 = 0.002.

$\frac{a}{a + c} = 0.0934 \Rightarrow \frac{a}{0.002} = 0.0934 \Rightarrow a = 0.0001868$

$\frac{d}{b + d} = 0.968$

Update the table: $\, \begin{tabular}{l | c | c | c} & D & D\, ' & \\ \hline +ve & 0.0001868 & b & 0.0001868 + b \\ \hline -ve & c & d & c + d \\ \hline & 0.002 & b + d & 1 \\ \end{tabular}$

Clearly c = 0.002 - 0.0001868 = 0.0018132 and b + d = 1 - 0.002 = 0.998

Update the table: $\, \begin{tabular}{l | c | c | c} & D & D\, ' & \\ \hline +ve & 0.0001868 & b & 0.0001868 + b \\ \hline -ve & 0.0018132 & d & 0.0018132 + d \\ \hline & 0.002 & 0.998 & 1 \\ \end{tabular}$

From ealier, $\frac{d}{b + d} = 0.968$. Substitute b + d = 0.998: d = (0.968)(0.998) = 0.966064.

Therefore b = 0.998 - 0.966064 = 0.031936.

Update the table: $\, \begin{tabular}{l | c | c | c} & D & D\, ' & \\ \hline +ve & 0.0001868 & 0.031936 & 0.0321228 \\ \hline -ve & 0.0018132 & 0.966064 & 0.9678772 \\ \hline & 0.002 & 0.998 & 1 \\ \end{tabular}$

As a check of this table, note that the elements in the far right column add up to 1.