A criminal hides in a room with 99 innocent people...
Moderators: gmalivuk, Moderators General, Prelates
A criminal hides in a room with 99 innocent people...
A criminal hides in a room with 99 innocent people. You have a lie detector that correctly classifies 95% of people. You pick someone at random, wire them up to the machine, and ask them if they are the criminal. They say 'no', but the machine goes ‘ping’ and says the person is lying. What is the chance that you have caught the criminal?
Note: We are going under a different question than asked, we are going about what is the chance someone who tested positive was guilty if all 100 people were tested.
I believe it is 19%, but am having an argument about this with people saying it is 17.8% or 15.83% or 16.9%.
Note: We are going under a different question than asked, we are going about what is the chance someone who tested positive was guilty if all 100 people were tested.
I believe it is 19%, but am having an argument about this with people saying it is 17.8% or 15.83% or 16.9%.
Re: A criminal hides in a room with 99 innocent people...
I heard someone say it will come out as: 94 innocent 6 guilty, or 4 guilty 96 innocent, but I don't understand how it won't be 95 innocent and 5 appearing guilty.
 skeptical scientist
 closedminded spiritualist
 Posts: 6142
 Joined: Tue Nov 28, 2006 6:09 am UTC
 Location: San Francisco
Re: A criminal hides in a room with 99 innocent people...
kikko wrote:You have a lie detector that correctly classifies 95% of people.
This is an ambiguous statement. You need to know both the probability of a guilty result on an innocent individual, and the probability of a guilty result on a criminal in order to solve the problem. Are you saying that the lie detector classifies 95% of criminals as guilty and also classifies 95% of innocents as innocent? I'll assume this is what you meant. However, if people are arriving at different answers, one possible explanation is that they're interpreting this ambiguity differently.
After testing everyone, you find 5 people of being tested guilty. What is the chance that the last person tested guilty was actually guilty?
If the guilty individual tests guilty, then each person with a guilty result is equally likely to be the guilty individual, so there's a 20% chance. If the criminal tests innocent, clearly there's a 0% chance. So we want to find the probability that the criminal tested guilty, given that 5 people tested guilty (and then multiply by 20%).
The relevant probabilities can be computed using binomial coefficients. The chance that the criminal would test innocent and 5 of 99 innocents would test guilty is [math](.05)\left( \begin{array}{c} 99\\5 \end{array}\right)(.05)^5(.95)^{94} \approx .009.[/math]The chance that the criminal would test guilty and 4 of 99 innocents would test guilty is [math](.95)\left( \begin{array}{c} 99\\4 \end{array}\right)(.05)^4(.95)^{95} \approx .171.[/math]The conditional probability that the criminal would test guilty given that 5 people total tested guilty is therefore .171/(.171+.009)=.95, so we arrive at your answer of .95*20%=19%.
There's one thing I'm left wondering. Is there an intuitive explanation for the fact that the conditional probability that the criminal appears guilty given 5 positive tests exactly coincides with the prior probability without knowing the number of positive tests?
I'm looking forward to the day when the SNES emulator on my computer works by emulating the elementary particles in an actual, physical box with Nintendo stamped on the side.
"With math, all things are possible." —Rebecca Watson
"With math, all things are possible." —Rebecca Watson
Re: A criminal hides in a room with 99 innocent people...
kikko wrote:You have a lie detector that correctly classifies 95% of people
As skeptical scientist already said, this is a rather ambiguous statement. He solved it assuming it meant that it always classifies 95% of the people correctly.
However if you meant that it classifies a person correctly 95% of the time (which you expect to correctly classify 95% of people), it's a Baye's Theorem problem.
Re: A criminal hides in a room with 99 innocent people...
In the case where you test everyone and the machine has a 95% chance of correctly finding each innocent person innocent and a 95% chance of correctly finding each guilty person guilty:
You definitely tested the criminal, since you tested everyone. The odds of the criminal being among the people found guilty by the machine is 95%, since there is a 95% chance the machine correctly found the criminal guilty when tested. This is true regardless of how many innocent people were incorrectly found guilty.
In the case where you pick one person at random, they deny being the criminal, and the machine finds them guilty:
You have an x = 1% chance of picking the guilty person. The guilty person has a y = 100% (I assume) chance of denying being guilty. The machine has a 95% chance of finding the guilty person guilty. So the probability that a randomly chosen person will be guilty and found guilty is xyz = 0.95%.
You have an r = 99% chance of picking an innocent person. The innocent person has an s = 100% (I assume) chance of denying being guilty. The machine has a t = 5% chance of finding an innocent person guilty. So the probability that a randomly chosen person will be innocent and found guilty is rst = 4.95%.
These outcomes are mutually exclusive and cover all possible ways a person could be found guilty, so the probability that a randomly chosen person will be found guilty is xyz + rst = 5.9%. Thus the probability that a randomly chosen person who is found guilty will actually be guilty is 0.95% / 5.9% = 19/118 ≈ 16.1%
You definitely tested the criminal, since you tested everyone. The odds of the criminal being among the people found guilty by the machine is 95%, since there is a 95% chance the machine correctly found the criminal guilty when tested. This is true regardless of how many innocent people were incorrectly found guilty.
In the case where you pick one person at random, they deny being the criminal, and the machine finds them guilty:
You have an x = 1% chance of picking the guilty person. The guilty person has a y = 100% (I assume) chance of denying being guilty. The machine has a 95% chance of finding the guilty person guilty. So the probability that a randomly chosen person will be guilty and found guilty is xyz = 0.95%.
You have an r = 99% chance of picking an innocent person. The innocent person has an s = 100% (I assume) chance of denying being guilty. The machine has a t = 5% chance of finding an innocent person guilty. So the probability that a randomly chosen person will be innocent and found guilty is rst = 4.95%.
These outcomes are mutually exclusive and cover all possible ways a person could be found guilty, so the probability that a randomly chosen person will be found guilty is xyz + rst = 5.9%. Thus the probability that a randomly chosen person who is found guilty will actually be guilty is 0.95% / 5.9% = 19/118 ≈ 16.1%
wee free kings
 skeptical scientist
 closedminded spiritualist
 Posts: 6142
 Joined: Tue Nov 28, 2006 6:09 am UTC
 Location: San Francisco
Re: A criminal hides in a room with 99 innocent people...
Qaanol wrote:In the case where you test everyone and the machine has a 95% chance of correctly finding each innocent person innocent and a 95% chance of correctly finding each guilty person guilty:
You definitely tested the criminal, since you tested everyone. The odds of the criminal being among the people found guilty by the machine is 95%, since there is a 95% chance the machine correctly found the criminal guilty when tested. This is true regardless of how many innocent people were incorrectly found guilty.
But not true regardless of how many total people were found guilty. For example, if 100 people tested guilty, there is a 100% chance that the criminal tested guilty (since everyone did). In general, if n of 100 people tested guilty by the machine, the chance that the guilty person among them is n*.95^{2}/(n*.95^{2}+(100n)*.05^{2}). This is only equal to 95% when n=5.
I'm looking forward to the day when the SNES emulator on my computer works by emulating the elementary particles in an actual, physical box with Nintendo stamped on the side.
"With math, all things are possible." —Rebecca Watson
"With math, all things are possible." —Rebecca Watson
Re: A criminal hides in a room with 99 innocent people...
I followed all the probability here so far, but I'm not sure what to make of this:
What if, instead of gathering the evidence before making rash decisions, we decide to have a good oldfashioned witch hunt, test people until we get a positive, and then burn that person at the stake. What is the probability that we have burned the criminal?
Certainly for each individual tested, there is a 1% chance that it is a criminal, and a 99% chance it is not. Further, we have a 0.95% chance of correctly burning the criminal, a 0.05% chance of missing the criminal and moving on, a 99%*95% chance of finding an innocent person and moving on, and a 99%*5% chance of finding an innocent person guilty, and incorrectly burning them. I tried to put together a fancy sum for this, but I realized that only the first person has a 1% chance to be the criminal.
I thought about considering first the probability that the criminal, if tested, would be caught, finding the probability that he would be the first, second, third, etc. person tested, and then the probabilities that if he was the nth person tested, the likelihood that we would not have any false positive before then. Of course, the probability he would be caught if tested is 95%, and he has a 1% chance of being first, second, third, etc. in the order of people tested. If he is in position n, we have a 0.95^(n1) chance of getting to him without any false positives (I think), and so the probability that he will be caught is the sum, for n from 1 to 100, of 0.95*0.01*0.95^(n1). I got roughly 18.89% for this scenario.
Of course, then there's a 0.95^99*0.05 chance that we'll catch no one, and have to do the whole thing again, but that's only 0.03%.
What if, instead of gathering the evidence before making rash decisions, we decide to have a good oldfashioned witch hunt, test people until we get a positive, and then burn that person at the stake. What is the probability that we have burned the criminal?
Certainly for each individual tested, there is a 1% chance that it is a criminal, and a 99% chance it is not. Further, we have a 0.95% chance of correctly burning the criminal, a 0.05% chance of missing the criminal and moving on, a 99%*95% chance of finding an innocent person and moving on, and a 99%*5% chance of finding an innocent person guilty, and incorrectly burning them. I tried to put together a fancy sum for this, but I realized that only the first person has a 1% chance to be the criminal.
I thought about considering first the probability that the criminal, if tested, would be caught, finding the probability that he would be the first, second, third, etc. person tested, and then the probabilities that if he was the nth person tested, the likelihood that we would not have any false positive before then. Of course, the probability he would be caught if tested is 95%, and he has a 1% chance of being first, second, third, etc. in the order of people tested. If he is in position n, we have a 0.95^(n1) chance of getting to him without any false positives (I think), and so the probability that he will be caught is the sum, for n from 1 to 100, of 0.95*0.01*0.95^(n1). I got roughly 18.89% for this scenario.
Of course, then there's a 0.95^99*0.05 chance that we'll catch no one, and have to do the whole thing again, but that's only 0.03%.
Re: A criminal hides in a room with 99 innocent people...
ST47 wrote:What if, instead of gathering the evidence before making rash decisions, we decide to have a good oldfashioned witch hunt, test people until we get a positive, and then burn that person at the stake. What is the probability that we have burned the criminal?
Certainly for each individual tested, there is a 1% chance that it is a criminal, and a 99% chance it is not.
Be careful here. Each individual tested is either innocent or guilty. There is no probability in that, there is only the truth. Probability only enters when we grab someone at random and start looking at our belief in their truth or innocence. This sort of fundamental error can make good math do bad things.
Time flies like an arrow, fruit flies have nothing to lose but their chains Marx
Re: A criminal hides in a room with 99 innocent people...
skeptical scientist wrote:There's one thing I'm left wondering. Is there an intuitive explanation for the fact that the conditional probability that the criminal appears guilty given 5 positive tests exactly coincides with the prior probability without knowing the number of positive tests?
If you apply Bayes' theorem, you'll see that this is equivalent to saying that seeing 5 tests is equally likely whether or not the criminal was found guilty  that is, when you test 99 innocent people, you're exactly as likely to get 4 false positives as you are to get 5.
To be more general, it's the fact that if you expect x false positives when you test n innocent people, you're just as likely to get x or x1 when you test n1. Is there an intuitive explanation for that?
All posts are works in progress. If I posted something within the last hour, chances are I'm still editing it.
Re: A criminal hides in a room with 99 innocent people...
Firstly lets take the person in front of us, who has 1% chance of being the criminal. In the event they are, there is a 95% chance the machine will print out Guilty and a 5% chance it will print out Innocent. If the person in front of us is innocent (99% probability) then there is a 5% chance it will print out Guilty and a 95% chance it will print out Innocent. We therefore have two events each with two outcomes for a total of four outcomes all together which to recap are:
Criminal  Guilty  1% * 95%
Criminal  Innocent  1% * 5%
Civilian  Guilty  99% * 5%
Civilian  Innocent  99% * 95%
From the question we know that the machine has given us a guilty response thus we can reduce this to:
Criminal  Guilty  1% * 95%
Civilian  Guilty  99% * 5%
We can now think of this as the entire probability 'space'. We want to find out the probability they are guilty so we take
P(Criminal  Guilty) / (P(Criminal  Guilty) + P(Civilian  Guilty))
Which evaluates to 19/118 or 16.1%
This is effectively the same solution and explanation as Qaanol but in what I hope is a wordier and more lucid form.
Criminal  Guilty  1% * 95%
Criminal  Innocent  1% * 5%
Civilian  Guilty  99% * 5%
Civilian  Innocent  99% * 95%
From the question we know that the machine has given us a guilty response thus we can reduce this to:
Criminal  Guilty  1% * 95%
Civilian  Guilty  99% * 5%
We can now think of this as the entire probability 'space'. We want to find out the probability they are guilty so we take
P(Criminal  Guilty) / (P(Criminal  Guilty) + P(Civilian  Guilty))
Which evaluates to 19/118 or 16.1%
This is effectively the same solution and explanation as Qaanol but in what I hope is a wordier and more lucid form.
 imatrendytotebag
 Posts: 152
 Joined: Thu Nov 29, 2007 1:16 am UTC
Re: A criminal hides in a room with 99 innocent people...
More generally, if we have N people (one criminal), a lie detector with accuracy p, and upon testing them all we find that k of them test positive, the chance that the criminal is among that k is:
Spoiler:
Hey baby, I'm proving love at nth sight by induction and you're my base case.
 phlip
 Restorer of Worlds
 Posts: 7573
 Joined: Sat Sep 23, 2006 3:56 am UTC
 Location: Australia
 Contact:
Re: A criminal hides in a room with 99 innocent people...
ST47 wrote:What if, instead of gathering the evidence before making rash decisions, we decide to have a good oldfashioned witch hunt, test people until we get a positive, and then burn that person at the stake. What is the probability that we have burned the criminal?
I think it depends... are we testing people entirely at random, with replacement? Or are we making sure we only test each individual once (but in a random order)? And, in the latter case, what do we do if we test everyone, and get all innocent results?
This sounds like a much more complicated question, regardless, but I'm pretty sure the different options there will have different answers.
Code: Select all
enum ಠ_ಠ {°□°╰=1, °Д°╰, ಠ益ಠ╰};
void ┻━┻︵╰(ಠ_ಠ ⚠) {exit((int)⚠);}

 Posts: 44
 Joined: Sun May 01, 2011 5:18 am UTC
Re: A criminal hides in a room with 99 innocent people...
There will be 0.95 true positives and 0.05*99 = 4.95 false positives.
That gives us 0.95/(4.95+0.95) = 0.95/5.9= 0.161 = 16.1%
That gives us 0.95/(4.95+0.95) = 0.95/5.9= 0.161 = 16.1%
http://officeofstrategicinfluence.com/spam/
That link kills spam[/size][/b][/u]
That link kills spam[/size][/b][/u]
 silverhammermba
 Posts: 178
 Joined: Fri Oct 13, 2006 1:16 am UTC
Re: A criminal hides in a room with 99 innocent people...
This is clearly a case of different interpretations resulting in different answers. I agree with skeptical scientist's answer, but apparently the question was removed from the OP and replaced with a different one?
Who is online
Users browsing this forum: No registered users and 10 guests