Probability of Lie Detectors

anon2020

New member
Joined
Feb 2, 2020
Messages
12
A lie detector will show a positive reading 10% of the time when a person is really telling the truth, and a lie detector will show a positive reading 90% of the time when a person is in fact lying. The lie detector is tested on three subjects. The first subject is (secretly) known to lie to every single question, no matter what the question. The second lies to 70% of all questions, and the third lies to 10% of all questions.


a) Given that the lie detector showed a positive result on exactly one subject, what is the probability that subject was the first one?
b) Given that the lie detector showed a positive result on exactly two subjects, what is the probability those two subjects were subjects 1 and 2?


I'm having trouble figuring out the set up of these. I know that P(B|A)=P(AandB)/P(A) but I can't seem to figure out how to solve with "exactly" instead of "at least".
 
\(\displaystyle
\text{Detector probabilities}\\
p_{fa} = 0.1~~~~\text{(fa stands for false alarm)}\\
p_{cd} = 1-p_{fa} = 0.9~~~~\text{(cd stands for correct dismissal)}\\
p_d = 0.9~~~~\text{(d stands for detection)}\\
p_m = 1-p_d = 0.1~~~~\text{(m stands for miss)}\\~\\

\text{A priori lying probabilities}\\
p_1 = 1\\
p_2 = 0.7\\
p_3 = 0.1
\)

\(\displaystyle P[\text{subject 1 was a positive result| exactly 1 positive result}] =\\~\\

\dfrac{P[\text{1 positive result | subject 1 was a positive result}]P[\text{subject 1 was a positive result}]}{P[\text{exactly 1 positive result}]}\)

[MATH]\text{The first probability in the numerator is really just $P[\text{#1 positive, #2, #3 negative}$ since we know that #1 is always lying.}[/MATH]
[MATH]P[(P,N,N)] = (p_1 p_d + (1-p_1)p_{fa})(p_2 p_m + (1-p_2)p_{cd})(p_3 p_m + (1-p_3)p_{cd}) = 0.25092[/MATH]
[MATH]P[\text{subject 1 was a positive result}] = p_d p_1 = p_d = 0.9[/MATH]
[MATH]P[\text{Exactly 1 positive result}] = P[(P,N,N)]+P[(N,P,N)] + P[(N,N,P)] = \\ (p_1 p_d + (1-p_1)p_{fa})(p_2 p_m + (1-p_2)p_{cd})(p_3 p_m + (1-p_3)p_{cd}) + \dots \text{ you work out the other two and finish the problem}[/MATH]
 
Last edited:
How I would solve this: imagine 1000 such tests.
Subject A lies on every question. The test will return positive (A is lying) 900 times, negative (A is telling the truth) 100 times.
Subject B lies on 700 questions, tells the truth 300 times. The test will return positive (B is lying) .9(700)+ .1(300)= 630+ 300= 660 times, negative (B is telling the truth) 340 times.
Subject C lies on 300 questions, tells the truth 700 times. The test will return positive (C is lying) .9(300)+ .1(700)= 270+ 70= 340 times, negative (C is telling the truth) 660 times.

a) Given that the lie detector showed a positive result on exactly one subject, what is the probability that subject was the first one?
The test shows positive for A 900 times, negative for B and C 340+ 660= 900 times, a total or 900+ 900= 1800 times.
The test shows positive for B 660 times, negative for A and C 100+ 660= 760 times, a total of 660+ 750= 1410 times.
The test shows positive for C 340 times, negative for A and B 100+ 700= 800 times, a total of 340+ 800= 1140 times.

Out of the 1800+ 1410+ 1140= 4350 cases, A was positive, B and C negative 1800 times. Given that only one tested positive, the probability it was A is 1800/4350= 0.413.

b) Given that the lie detector showed a positive result on exactly two subjects, what is the probability those two subjects were subjects 1 and 2?
Much the same as before.
The test shows positive for A and B 900+ 660= 1560 times, negative for C 660 times, a total of 1560+ 660= 2220 times.
The test shows positive for A and C 900+ 340= 1240 times, negative for B 340 times, a total of 1240+ 340= 1580 times.
The test show positive for B and C 660+ 340= 1000 times, negative for A 100 times, a total of 1100 times.

Of the 2220+ 1580+ 1100= 4900 cases, A and B were lying, C telling the truth in 2220 of them. Given that exactly two were lying the probability A and B were lying is 2220/4900= 0.453
 
I find romsek's notation a bit hard to follow, but that stems from what seems to me to be a badly worded problem.

First, "positive result" is a confusing way to specify "flagged as lying." Therefore, a positive result is correct if the subject lied and is incorrect if the subject told the truth. There is no theoretical reason that the probability of an incorrect response to truth plus the probability of a correct response to falsity will equal 1.

[MATH]\text {P(flagged given lie) + P(not flagged given lie)} = 1.[/MATH]
[MATH]\text {P(flagged given truth) + P(not flagged given truth)} = 1.[/MATH]
Both the preceding statements are valid, but they do not entail that

[MATH]\text {P(flagged given lie) + P(flagged given truth)} = 1.[/MATH]
The statement above is not generally true. It just happens to be true in this problem.

But the problem is unconcerned with whether the flagging is correct or not. In any case, I think the notation needs to be as clear as possible given the weird interpretation of "positive result."

Second, the problem as given by the OP does not tell us what is potentially relevant, namely how many questions were asked of each subject. But it makes sense to assume one question.

I like to start with identifying the probability space. The probability space with respect to each subject is:

Subject 1, 2 possibilities, namely lies and is flagged (1 * 0.9 = 0.9) or lies and is not flagged (1 * 0.10 = 0.1), adding to 1;

Subject 2, 4 possibilities, namely lies and is flagged (0.7 * 0.9 = 0.63), lies and is not flagged (0.7 * 0.1 = 0.07), does not lie and is flagged (0.3 * 0.1 = 0.03). or does not lie and is not flagged (0.3 * 0.9 = 0.27), adding yp to 1; and

Subject 3, 4 possibilities, namely lies and is flagged (0.1 * 0.9 = 0.09), lies and is not flagged (0.1 * 0.1 = 0.01), does not lie and is flagged (0.9 * 0.1 = 0.09). or does not lie and is not flagged (0.9 * 0.9 = 0.81).

Thus, there are 2 * 4 * 4 = 32 joint probabilities to consider. If you want to develop all of them and avoid computational error, it is probably easiest to use a spreadsheet. And obviously, on this kind of problem, as the number of joint probabilities rises, using a spreadsheet to generate a complete list of probabilities (which is nice to do as a checking mechanism) becomes more and more efficient. But it is not necessary for this problem.

Given independence, we have

[MATH]\text {P(subject 1 only one flagged)} =[/MATH]
[MATH]]0.9(0.07+0.27)(0.01 + 0.81) = 0 .9 * 0.34 * 0.82 = 0.25092.[/MATH]
[MATH]\text {P(subject 2 only one flagged)} =[/MATH]
[MATH]]0.1(0.63+0.03)(0.01 + 0.81) = 0 .1 * 0.66 * 0.82 = 0.05412.[/MATH]
[MATH]\text {P(subject 3 only one flagged)} =[/MATH]
[MATH]]0.1(0.01 + 0.81) = 0 .1 * (0.07+0.27) * (0.09 + 0.09) = 0.1 * 0.34 * 0.18 = 0.00612.[/MATH]
[MATH]\therefore \text {P(exactly one flagged)} = 0.25092 + 0.05412 + 0.00612 = 0.31116[/MATH]
[MATH]\text {P(subject 1 flagged given only one flagged)} = \dfrac{0.25092}{0.31116} \approx 80.6\%.[/MATH]
Where did Halls go astray?

How I would solve this: imagine 1000 such tests.

The test shows positive for A 900 times, negative for B and C 340+ 660= 900 times, a total or 900+ 900= 1800 times.
The test shows positive for B 660 times, negative for A and C 100+ 660= 760 times, a total of 660+ 750= 1410 times.
The test shows positive for C 340 times, negative for A and B 100+ 700= 800 times, a total of 340+ 800= 1140 times.

Out of the 1800+ 1410+ 1140= 4350 cases, A was positive, B and C negative 1800 times. Given that only one tested positive, the probability it was A is 1800/4350= 0.413.

But there are not 4350 cases, just 1000. He is double counting
 
I find romsek's notation a bit hard to follow, but that stems from what seems to me to be a badly worded problem.

[MATH]]0.1(0.01 + 0.81) = 0 .1 * (0.07+0.27) * (0.09 + 0.09) = 0.1 * 0.34 * 0.18 = 0.00612.[/MATH]
[MATH]\therefore \text {P(exactly one flagged)} = 0.25092 + 0.05412 + 0.00612 = 0.31116[/MATH]
[MATH]\text {P(subject 1 flagged given only one flagged)} = \dfrac{0.25092}{0.31116} \approx 80.6\%.[/MATH]

Just a lot of letters. It's all pretty standard detection theory jargon.
Our answers agree. (at least if you finish the plug and chug I left for OP)
 
Just a lot of letters. It's all pretty standard detection theory jargon.
Our answers agree. (at least if you finish the plug and chug I left for OP)
Ahh. Detection theory is not an arrow in my quiver. I was not criticizing your reasoning. I just was having trouble figuring out what the notation was all about. Because the problem seems to me confusingly worded, I tried to be as clear as possible. All is good.
 
Ahh. Detection theory is not an arrow in my quiver. I was not criticizing your reasoning. I just was having trouble figuring out what the notation was all about. Because the problem seems to me confusingly worded, I tried to be as clear as possible. All is good.

I never thought otherwise.
 
Top