bayes theorem applied

71 Views Asked by At

I've tried to apply Bayes theorem to the following question, but I think I'm using it wrong.

2000 people take an exam and 1 person is cheating. A lie detector that is accurate 99% of the time is used to screen the candidates one by one. At some point during the screening the lie detector beeps to signal that the person is lying. What is the probability that the person was actually cheating?

$$P(A|B)=\frac{P(B|A)P(A)}{P(B)}$$

Let A = the person is cheating

Let B = lie detector correct

$$\frac{(0.99).(0.0005)}{(0.9995).(0.01)}$$

$$P(A|B)=0.04952$$

This seems incorrect, I'm not quite sure where I am going wrong.

2

There are 2 best solutions below

0
On

I think you need to modify your denominator. I believe the correct formulation is:

$P\left(\text{cheated}|\text{detected}\right)=\frac{P\left(\text{detected}|\text{cheated}\right)P\left(\text{cheated}\right)}{P\left(\text{detected}|\text{cheated}\right)P\left(\text{cheated}\right)+P\left(\text{detected}|\text{not cheated}\right)P\left(\text{not cheated}\right)}$

I believe you only computed the second term in the denominator. You need to add the first term (which is the same as the numerator in this case).

I hope this helps.

0
On

Until you get to be very comfortable applying Bayes theorem, I suggest you fill out this table.

$\begin {array}{cc|c} \text {True Positive} & \text {False Positive} & \text {Measured Positives}\\ \text {False Negative} & \text {True Negative} & \text {Measured Negatives}\\ \text {Total Positive} & \text{Total Negative} & \text {Total} \end{array}$

Or in this case

$\begin {array}{cc|c} \text {Cheater and Detected} & \text {Honest and Detected} & \text {Total Detected}\\ \text {Cheater and Not Detected} & \text {Honest and Not Detected} & \text {Total Not Detected}\\ \text {Cheater} & \text{Honest} & \text {Total} \end{array}$

Fill in what you know from the given information.

$\begin {array}{cc|c} \text {Cheater and Detected} & \text {Honest and Detected} & \text {Total Detected}\\ \text {Cheater and Not Detected} & \text {Honest and Not Detected} & \text {Total Not Detected}\\ 1 & 1999& 2000 \end{array}$

Then use that the test is 99% accurate.

$\begin {array}{cc|c} 0.99 & 19.99 & 20.98\\ 0.01 & 1979.01 & 1979.02\\ 1 & 1999& 2000 \end{array}$

If you are detected, there is a $\frac {19.99}{20.98}$ chance that you are innocent.