A criminal hides in a room with 99 innocent people...

For the discussion of math. Duh.

Moderators: gmalivuk, Moderators General, Prelates

kikko
Posts: 69
Joined: Sat Apr 04, 2009 12:18 am UTC

A criminal hides in a room with 99 innocent people...

Postby kikko » Fri May 27, 2011 3:29 am UTC

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%.

kikko
Posts: 69
Joined: Sat Apr 04, 2009 12:18 am UTC

Re: A criminal hides in a room with 99 innocent people...

Postby kikko » Fri May 27, 2011 3:39 am UTC

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.

User avatar
skeptical scientist
closed-minded 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...

Postby skeptical scientist » Fri May 27, 2011 4:00 am UTC

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

User avatar
314man
Posts: 119
Joined: Sat Oct 09, 2010 6:03 pm UTC
Location: Ontario

Re: A criminal hides in a room with 99 innocent people...

Postby 314man » Fri May 27, 2011 4:25 am UTC

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.

User avatar
Qaanol
The Cheshirest Catamount
Posts: 3069
Joined: Sat May 09, 2009 11:55 pm UTC

Re: A criminal hides in a room with 99 innocent people...

Postby Qaanol » Fri May 27, 2011 4:41 am UTC

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%
wee free kings

User avatar
skeptical scientist
closed-minded 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...

Postby skeptical scientist » Fri May 27, 2011 5:03 am UTC

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*.952/(n*.952+(100-n)*.052). 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

ST47
Posts: 125
Joined: Tue Oct 16, 2007 6:42 pm UTC

Re: A criminal hides in a room with 99 innocent people...

Postby ST47 » Sat May 28, 2011 3:23 am UTC

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 old-fashioned 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^(n-1) 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^(n-1). 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%.

User avatar
Velifer
Posts: 1132
Joined: Wed Dec 26, 2007 4:05 pm UTC
Location: 40ºN, 83ºW

Re: A criminal hides in a room with 99 innocent people...

Postby Velifer » Tue May 31, 2011 12:58 pm UTC

ST47 wrote:What if, instead of gathering the evidence before making rash decisions, we decide to have a good old-fashioned 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

Token
Posts: 1481
Joined: Fri Dec 01, 2006 5:07 pm UTC
Location: London

Re: A criminal hides in a room with 99 innocent people...

Postby Token » Tue May 31, 2011 3:55 pm UTC

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 x-1 when you test n-1. 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.

User avatar
galadran
Posts: 20
Joined: Sun Feb 10, 2008 3:14 pm UTC

Re: A criminal hides in a room with 99 innocent people...

Postby galadran » Thu Jun 02, 2011 11:45 pm UTC

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.

User avatar
imatrendytotebag
Posts: 152
Joined: Thu Nov 29, 2007 1:16 am UTC

Re: A criminal hides in a room with 99 innocent people...

Postby imatrendytotebag » Fri Jun 03, 2011 6:34 am UTC

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:
This uses the same reasoning as SS: the probability that k people test positive and none of them are the criminal is:

[math]\binom{N-1}{k}(1-p)^{k+1}p^{N - k - 1} = (N-k)(1-p)^2\left(\frac{1}{N}\binom{N}{k}(1-p)^{k-1}p^{N-k-1}\right)[/math]

(There are N-1 choose k ways of picking k innocent people. Then the lie detector screws up k+1 times: for those people and the criminal, and gets the other N - k - 1 correct)

Now the probability that k people test positive and the criminal is among them is:

[math]\binom{N-1}{k-1}(1-p)^{k-1}p^{N - k + 1} = kp^2\left(\frac{1}{N}\binom{N}{k}(1-p)^{k-1}p^{N-k-1}\right)[/math]

(We pick k-1 innocent people, and the lie detector gets those k-1 wrong and the rest right).

So the resultant probability is: (simplifying)

[math]\frac{kp^2}{kp^2 + (N-k)(1-p)^2}[/math]

In a slightly different vein, suppose you test all the suspects, and pick one of the guilty ones at random (or give up if nobody tests guilty). Then the probability you get the right guy is:

[math]\sum_{k=1}^{N}\frac{1}{k}\binom{N-1}{k-1}(1-p)^{k-1}p^{N - k + 1}[/math]
[math]=\frac{1}{N}\sum_{k=1}^{N}\binom{N}{k}(1-p)^{k-1}p^{N-k+1} = \frac{p(1-p^N)}{N(1-p)} = \frac{p}{N}(1 + p + p^2 + \cdots + p^{N-1})[/math]
Hey baby, I'm proving love at nth sight by induction and you're my base case.

User avatar
phlip
Restorer of Worlds
Posts: 7572
Joined: Sat Sep 23, 2006 3:56 am UTC
Location: Australia
Contact:

Re: A criminal hides in a room with 99 innocent people...

Postby phlip » Fri Jun 03, 2011 7:21 am UTC

ST47 wrote:What if, instead of gathering the evidence before making rash decisions, we decide to have a good old-fashioned 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)⚠);}
[he/him/his]

blademan9999
Posts: 44
Joined: Sun May 01, 2011 5:18 am UTC

Re: A criminal hides in a room with 99 innocent people...

Postby blademan9999 » Sun Jul 17, 2011 6:46 pm UTC

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%
http://officeofstrategicinfluence.com/spam/
That link kills spam[/size][/b][/u]

User avatar
silverhammermba
Posts: 178
Joined: Fri Oct 13, 2006 1:16 am UTC

Re: A criminal hides in a room with 99 innocent people...

Postby silverhammermba » Fri Jul 22, 2011 4:08 am UTC

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?


Return to “Mathematics”

Who is online

Users browsing this forum: No registered users and 7 guests