Talk:Three prisoners problem

message: I wrote a PHP script to investigate this problem. Just like the Monty Hall problem, the solution is totally counterintuitive but at the same time apparently correct. Here is my script:
 for ($i = 0; $i < 1000; $i++) {
 	srand((double)microtime()*1000000);
 	$n = rand(1,3); //Number of prisoner who is scheduled to die (1, 2, or 3)
 
 	if ($n != 2) { //Warden reveals that prisoner 2 will be released
 		if ($n == 1) { //if prisoner 1 is scheduled to die
 			$dead++;
 		}
 		elseif ($n == 3) { //if prisoner 3 is scheduled to die
 			$alive++;
 		}
 	}
 	elseif ($n != 3) { //Since prisoner 2 is scheduled to die, warden instead reveals that prisoner 3 will be released
 		if ($n == 1) { //if prisoner 1 is scheduled to die
 			$dead++;
 		}
 		elseif ($n == 2) { //if prisoner 2 is scheduled to die
 			$alive++;
 		}
 	} 
 }
 echo "Alive:" . $alive . "Dead:" . $dead;
The output was always "Alive: 667 / Dead: 333" (with a slight amount of variation, obviously). It is the "elseif ($n != 3)" (accounting for the possibility that the warden reveals the third prisoner to live, instead of the second) that causes this to occur. Without that part, the results come to "Alive: 333 / Dead: 333", which is the more intuitive result. Every time that "elseif ($n != 3)" part is run, prisoner 1 lives, since if $n was equal to 1 he would have been counted dead in the first part. This should be considered the key to understanding how this works. — GT 02:57, 22 July 2006 (UTC)
thread_title: The solution is sound

message: Right or Wrong?
1. the only way this problem can be completely analogous with the monty hall problem is if the prisoner doing the questioning gets the chance to change his fate after questioning the warden.  even then he is not reducing his chance of being executed, he is only able to prevent it from being increased.  
:Which version are you talking about, where only one is pardoned or only one is executed?  In the version Gardner presented only one is pardoned.  Minus the ability to switch this is completely analogous to the Monty Hall problem where "pardoned" is equivalent to "wins the car".  The prisoner doing the asking has a 1/3 chance of being pardoned, while the remaining cohort has a 2/3 chance of being pardoned.
2. by asking the warden which of his 2 cohorts will be released (removing himself from the equation), he is effectively reducing the odds to 50/50 between his 2 cohorts.  once the warden responds this changes the equation to 1.  now the prisoner must reintroduce himself to the equation thereby splitting the odds 50/50.
:Not exactly. Again, in the one is pardoned version, the chance of the pardon is 1/3 with the asker and 2/3 between the other two.  If by "removing himself from the equation" you mean "we're only looking at the 2/3 case involving the 2 cohorts (where one of them is the one being pardoned)", then yes there's a 50/50 chance between them - but this is only in the 2/3 case where one of them is the one being pardoned.  When the warden's response changes this to 1/0, what's really going on is we're changing the ( 1/3 asker)  : ( 1/3 : 1/3 cohorts) ratios to ( 1/3 asker) : ( 2/3 : 0 cohorts), which is not 50/50 between the asker and the remaining cohort but 1/3 : 2/3.  
If all the prisoner is trying to do is make himself feel better about the situation he's better off closing his eyes and sticking his fingers in his ears until showtime to keep his (perceived) chance of execution at 1/3. Brad38 (talk) 11:14, 30 May 2008 (UTC)
replies: text: If there's only one pardon, and the prisoner can switch fates, doing so doubles his chance of surviving. -- Rick Block (talk) 14:45, 30 May 2008 (UTC)
thread_title:  The solution is not sound 

message: As the original problem (the top one) is worded... If the warden flips the coin when he has to make a choice between B and C, then A, who's standing there when the warden flips it, knows for certain whether he should switch or not - if the warden flips the coin, he should NOT switch, since B and C are going to be executed, and A is to be pardoned. Conversely, if the Warden doesnt flip the coin, then A -SHOULD- switch, since whichever one the warden doesnt name is the one who is to be pardoned. The probability becomes 1. Because the act of deciding is a physical action, rather than a mental one (with assumed even probability), it spoils the intent of the problem. EtoileLion (talk) 22:57, 19 August 2008 (UTC)
replies: text: Gardner's version (in the Scientific American column that's cited in the article) covers this quibble.  In his version the warden immediately brings up this very issue and the insistent prisoner suggests the warden go home and provide the name the next morning. -- Rick Block (talk) 23:47, 19 August 2008 (UTC)
replies: text: Personally, i'd have found it easier to stipulate the warden ALWAYS flip the coin - in the case of B or C being pardoned, the flip is purely for show, where in the case of A being pardoned, it actually decides the name given. Seems an easier (and more likely) way to avoid the problem. -- 68.209.116.39 (talk) 02:10, 20 August 2008 (UTC)
thread_title: Flipping the Coin

message: I changed the lay out a little. Mainly introducing \tfrac in math. Nijdam (talk) 11:19, 17 February 2009 (UTC)
thread_title: Lay out

message: Does it make the solution better understandable by "conditioning" on the rules of the game? It seems superflues to me and even confusing. And only in a rather "sought" way may it be interpreted as real conditioning in the probabalistic way. Nijdam (talk) 23:54, 18 February 2009 (UTC)
replies: text: It certainly makes it formally correct and complete. Truly, among specialists it is customary to assume that the reader is aware of all unstated terms, and therefore drop the "universal" background I\, as a shorthand. However this section of the article (as for all of Wikipedia's mathematical entries) is addressed to readers that, while mathematically proficient and curious, are not necessarily sophisticated - otherwise there'd be no reason for adding links to articles defining terms like "posterior probability". Hence I feel it proper to spell out all conditioning terms in the text as well as in the formulae. So, to answer your more general question: yes, I believe it makes this particular section of the article more understandable for the unsophisticated (but mathematically curious) readers who decide to spend time reading it. All the other readers will just skip it, so there's no impact for them. Finally, what do you mean by "real conditioning in the probabilistic way"? Is there such a thing as unreal conditioning? And what is a "sought" way to interpret it?glopk (talk) 15:54, 19 February 2009 (UTC)
replies: text: Sorry for the word "sought", I didn't find the right term for something like "artificial", brought into the matter in an unnatural way. Your opinion on conditioning on the rules is clear to me, but what does it offer more than just mentioning it in the text. It makes the notation a lot lighter and, because the rules keep constant, absolutely not less understandable. Nijdam (talk) 17:08, 19 February 2009 (UTC)
thread_title: Conditions

message: Two separate mathematical formulations, neither properly sourced, the longer one shoved inside Aids to understanding (!). I may take a stab at fixing things, and my first step will probably be to remove both math. form. and start afresh with just the Mosteller's solution.
Thoughts?  glopk (talk) 17:08, 7 September 2010 (UTC)
replies: text: Not such a mess. The "longer mathematical solution" hasn't recently been shoved inside Aids to understanding, but was there for as long as I know. Probably because it is titled "Bayesian analysis", what it isn't IMO. What else is problematic to you? Nijdam (talk) 23:55, 7 September 2010 (UTC)
replies: text: Guess I have a bad memory, since I wrote it. My problem is with sourcing for both the short and the long math solution. glopk (talk) 03:18, 8 September 2010 (UTC)
replies: text: Have a look here: http://homepage2.nifty.com/hashimoto-t/try/prison-e.html Nijdam (talk) 11:03, 8 September 2010 (UTC)
replies: text: Yikes, I'd have a hard time calling that page a reputable source. Do you have access to the Congnition paper that is cited? glopk (talk) 14:53, 8 September 2010 (UTC)
replies: text: That's right, but I guess it is a "quote" from the original paper. If I find the time I'll go to the University to look it up.Nijdam (talk) 09:54, 9 September 2010 (UTC)
thread_title:  This article is a mess 

message: Is "Three Prisoners problem" correct? Seems it should either be "Three prisoners problem" or "Three Prisoners Problem". Joefromrandb (talk) 07:46, 1 June 2011 (UTC)
thread_title:  Capitalization 

message: Came across this and tried to think it through. From prisoner A's perspective the incorrect conclusion comes from not understanding probability too well. The difficulty with the "other prisoner's" chance of survival seems largely of obfuscating his odds in his perspective with difficult maths talk.
The total table looks like this:
1) 1/6 chance A lives, says B dies
2) 1/6 chance A lives, says C dies
3) 1/3 chance A dies, says B dies
4) 1/3 chance A dies, says C dies
1/6 + 1/6 = 2/6 = 1/3 chance A lives.
But in context of the "other prisoner" you only use half of that table. If the warden says B dies then you can safely ignore point 2 and 4 above, leaving:
1) 1/6 chance A lives, says B dies
3) 2/6 chance A dies, says B dies
Since the other half of the table is moot then the probabilities in relation to each other are:
1) 1/3 chance A lives, says B dies
2) 2/3 chance A dies, says B dies
Looking at that from C's perspective the only time he will die is that 1/3 chance B came up from the coin toss. This gives him a 2/3 chance he will live. Or expanding from above
1) 1/3 chance A lives, says B dies, (C must die)
2) 2/3 chance A dies, says B dies, (C must live).
If the warden says C then you simply swap B and C around in the above table.
It took me ages to get this. For people that don't use a lot of mathematical theory and notation the answers on this page are horribly confusing. I know this isn't a "proper" mathematical explanation and shouldn't be on the wiki page proper but if it helps people understand this problem please leave it here in the talk page.
203.206.73.82 (talk) 13:52, 22 February 2012 (UTC)
thread_title:  Solution is confusing 

message: What does the so called "Bayesian analysis" (it is hardly Bayesian) contribute that is not already in the article?? Nijdam (talk)
My suggestion is to remove the section "Bayesian analysis" . Nijdam (talk) 09:24, 2 December 2012 (UTC)
replies: text: I agree. There is nothing Bayesian about this solution. It is the same solution as before but using different notation. Remove. Richard Gill (talk) 17:26, 26 March 2013 (UTC)
replies: text: Done. Nijdam (talk) 08:16, 27 March 2013 (UTC)
thread_title:  Bayesian 

message: This new section is completely superfluous. The essence is of it is already shown in the section 'Table'. Moreover it uses dubious notation, such as {A,B} for an ordered pair, and it speaks about sample spaces before and after, where a sample space does not change. Reduction of the sample space means change of the probability measure. Nijdam (talk) 11:01, 20 January 2013 (UTC)
replies: text: Agree. Again, this is just a repetition of what was written before but with different (uncommon) notation and terminology. Remove? Richard Gill (talk) 17:27, 26 March 2013 (UTC)
replies: text: Done Nijdam (talk) 08:16, 27 March 2013 (UTC)
thread_title:  Aids in understanding? 

message: Jgoemat (talk) 23:39, 22 June 2014 (UTC)
thread_title:  Easier explanation? 

message: In this section 3rd paragraph
This article states, "With the stipulation that the warden will choose randomly,..."   It should have been governor and now is.  In this version of Gardner's Article the warden's choices are not random they are set out by prisoner A and are quite clear.  This was probably just a typo.  T S Ballantine (talk) 16:08, 1 February 2016 (UTC)
replies: text: It was not an error. Taking the sentence in its entirety, it says that in the case where A is pardoned, the warden chooses randomly which of B's and C's names to give A. In this one case the warden does make a random choice, and the fact that he chooses randomly is an important stipulation. I will restore the correct wording. 2.24.119.119 (talk) 00:41, 25 June 2016 (UTC)
thread_title:  Enumeration of Possible Cases 

message: While the parallels are obvious, is it correct to declare this problem to be "equivalent" to Bertrand's box paradox? Can you identify the prisoners with the boxes? If yes, in what way exactly? --KnightMove (talk) 04:24, 18 December 2017 (UTC)
thread_title:  Equivalent to Bertrand's box paradox? 

message: I offer another way to think about the solution that I think is easier to understand.
It involves using extreme numbers to magnify the effects of the situation.
I won't attempt to word it perfectly, but here is the general idea.
Instead of 3 prisoners let's say we have a million.
And, let's say that the deal prisoner A makes with the warden is slightly different, but effectively the same.  Let's say that when the warden reveals who will not be pardoned, he also immediately kills that prisoner, so we have an ever shrinking remaining population of prisoners.  And after each execution, prisoner A makes the same plea to the warden, that the warden reveal another prisoner that will not be pardoned.  In other words, execute someone else first.  This deal is effectively that the warden agrees to execute prisoner A no earlier than second to last.
When there are only two prisoners left, prisoner A and one other, what are the chances that prisoner A will be pardoned?
Another way of wording this makes the probability very clear:
Why is prisoner A still alive?
Is it because he will be pardoned?  
We know the chances of this are literally one in a million.
Or because he is under the protection of the deal he made with the warden?
In other words, the chances that he wasn't chosen, which is 999,999/1,000,000.  Very likely.
Why is the other prisoner still alive?  
He is under no such protection from the deal with the warden.
So, is it because he hadn't been chosen yet to be executed?
Intuitively we know this must be a low chance (999,998!/999,999! or 1/999,999)
Or, because he will be pardoned?
If the chances of the other outcome are low, then the chances of this outcome must be high. 
Dustin184 (talk) 04:49, 4 June 2023 (UTC)
thread_title:  Another easier to understand explanation