Something about probablility

This is a discussion on Something about probablility within the A Brief History of Cprogramming.com forums, part of the Community Boards category; Originally Posted by mike_g Actually that makes sense now as the host would not open the winning door as that ...

  1. #31
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,383
    Quote Originally Posted by mike_g View Post
    Actually that makes sense now as the host would not open the winning door as that would not make good tv. So by switching you would be moving from 1/3 to 2/3 chance of winning. So yeah I get it now
    This should be interesting...

    Step 1. What's the odds of choosing the right door on your first try? 33%

    Step 2. The host eliminates a door and essentially asks you to choose again from 2 doors.

    Step 3. What's the odds of choosing the right door? 50%

    The whole point of the exercise is to confuse the player and probably get a few giggles out of his indecision. But the matter of the fact is that the game was all about choosing one of two doors.
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  2. #32
    Dr Dipshi++ mike_g's Avatar
    Join Date
    Oct 2006
    Location
    On me hyperplane
    Posts
    1,218
    Step 3. What's the odds of choosing the right door? 50%
    Yes, but because this is a gameshow we can assume the host knows the winning door. Now he is not going to open a door with the treasure behind it; what would be the point in making a choice then? Its either lose or lose. So by switching you do infact move to a 2/3 chance of winning.

    If it were in a non-gameshow scenario and the door to be revealed was picked from random it would still be a 50:50 chance.

  3. #33
    Internet Superhero
    Join Date
    Sep 2006
    Location
    Denmark
    Posts
    934
    I think Mario is right, the presented problem is not about choosing one of three doors, the last door is irrelevant.

    Whichever door you choose, one of the doors will be removed, and since the door with the treasure won't be removed, and the one you pick won't be removed either, we know that one of the doors with a donkey behind it gets scrapped, it's a 50% chance all the way through.
    How I need a drink, alcoholic in nature, after the heavy lectures involving quantum mechanics.

  4. #34
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,383
    Quote Originally Posted by mike_g View Post
    So by switching you do infact move to a 2/3 chance of winning.
    Not really, lol.

    I'm getting confused now too, hehe. I'm struggling to find the words here... This is one of those times I wished English was my mother tongue.

    Ok... Let's see....

    Probabilities are non deterministic in the sense that events prior to the one being calculated don't affect the outcome and our results won't affect the next event. It's the coin toss thing we were discussing before. Just because I threw 1^64 coins and they all fell on heads, it doesn't mean there's a higher probability of the next toss fall on tails.

    Now...

    The host naturally knows the winning door. But we don't. And it is we that are calculating the odds. Not the host. So from out point of view we have two doors and we can choose one of them. Our odds of winning is 1:2

    Whatever happened before that, is irrelevant because our probability event is right there, the decision to swap or not.

    Swap or not swap. 1:2. This is the final result. Consequentely, since the odds are even, it doesn't matter what we do.
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  5. #35
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    20,975
    Whichever door you choose, one of the doors will be removed, and since the door with the treasure won't be removed, and the one you pick won't be removed either, we know that one of the doors with a donkey behind it gets scrapped, it's a 50&#37; chance all the way through.
    How would you explain why, by mere counting, a strategy of "pick at random then switch" wins 2/3 of the time?
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  6. #36
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,383
    Quote Originally Posted by laserlight View Post
    How would you explain why, by mere counting, a strategy of "pick at random then switch" wins 2/3 of the time?
    Because you are making the mistake of assuming your first choice mattered. It didn't. By eliminating one door, the rules have changed. You are now picking from one of two doors.
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  7. #37
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,892
    You're still using intuition to counter counting. That won't work. The entire purpose of the puzzle is that it goes against intuition.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  8. #38
    Dr Dipshi++ mike_g's Avatar
    Join Date
    Oct 2006
    Location
    On me hyperplane
    Posts
    1,218
    Whichever door you choose, one of the doors will be removed, and since the door with the treasure won't be removed, and the one you pick won't be removed either, we know that one of the doors with a donkey behind it gets scrapped, it's a 50% chance all the way through.
    Look at it this way, when you start you pick a door. lets split the doors between you and the host:
    Code:
    You: door
    Host: door, door
    We dont know whats behind any doors; only the host does.

    At this point in time your door has a 1/3 chance of winning, and the host doors 2/3 if you coul pick both of them

    Now the host has to reveal a door. If your 1/3 chance choice was correct, it wouldent matter what door he reveals, if you switch you lose.

    On the other hand if either of the doors he holds has the money, you will win because he is not going to reveal the winning door. So out of the 2 doors he has you get the one (if any) that will be the winner.

  9. #39
    Registered User
    Join Date
    Oct 2001
    Posts
    2,129
    Look at it this way: whats the probability that the door will be the one the host chooses? One half and one half and zero. So the chance that the door that you don't choose is one that you can switch to is 1/2.

    Which door the host chooses is part of the problem from square one.
    Last edited by robwhit; 03-08-2008 at 03:43 PM.

  10. #40
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,383
    No. The host knows the winning door. The problem specifically states the host choses a losing door. And he can always choose a losing door no matter what is your initial choice.
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  11. #41
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    20,975
    Because you are making the mistake of assuming your first choice mattered. It didn't. By eliminating one door, the rules have changed. You are now picking from one of two doors.
    The first choice does not matter. The strategy matters. I am presenting two possible strategies:
    1. Switch. (That is, pick the other door.)
    2. Don't switch. (That is, pick the door you first chose.)

    Based on the fact that there are two choices of strategy, you are proposing that the strategies have an equal chance of winning.

    Now, suppose that all contestants, when faced with this problem, choose strategy #2. They do not switch. We would expect that, in the long run, half of them would win.

    Suppose also that door A is always the winning door, and that the contestants choose the door at random (i.e., they do not suspect that A is always the winning door).

    So, a billion contestants choose door A and stick with it, another billion contestants choose door B and stick with it, and yet another billion contestants choose door C and stick with it. However, only 1/3 of them win, since only 1/3 of them chose door A.

    This is a contradiction, which implies that the original assumption is false. The strategies do not have an equal chance of winning.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  12. #42
    Registered User
    Join Date
    Oct 2001
    Posts
    2,129
    Quote Originally Posted by Mario F. View Post
    No. The host knows the winning door. The problem specifically states the host choses a losing door. And he can always choose a losing door no matter what is your initial choice.
    how does that contradict my post?

  13. #43
    Dr Dipshi++ mike_g's Avatar
    Join Date
    Oct 2006
    Location
    On me hyperplane
    Posts
    1,218
    Mario, robwhit: try splitting the doors into 2 categories.

    One door you have chose.
    Two doors you have not.

    Out of both of the two doors there is a 2/3 chance to win.

    Now make a truth table of what the host can have:
    Code:
    1: donkey, donkey
    2: money, donkey
    3: donkey, money
    The host HAS to reveal one door. The host will NOT reveal the money. So lets look at what we have left:
    Code:
    donkey
    money
    money
    Make sense?

  14. #44
    Crazy Fool Perspective's Avatar
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    2,640
    CornedBee et. al. are correct. Mario, think of it this way:

    The probability that you picked the right door first is 1/3 (I don't think there is any argument here). Thus, the probability that the other door is correct *must* be 2/3 (probabilities sum to one, and the eliminated door has a probability of 0 for being correct).

  15. #45
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,383
    Quote Originally Posted by laserlight View Post
    So, a billion contestants choose door A and stick with it, another billion contestants choose door B and stick with it, and yet another billion contestants choose door C and stick with it. However, only 1/3 of them win, since only 1/3 of them chose door A.

    This is a contradiction, which implies that the original assumption is false. The strategies do not have an equal chance of winning.
    Oh, no. You can't do it that way. You proved there is a 1/3 chance of winning if nothing else happens. That is, the available doors is kept at 3.

    But something changed. The host removed a losing door and asked you to start all over again. Choose one of two doors. That is your event, laserlight. The previous choice will have no consequence on the outcome of this new choice.

    CornedBee mentioned this exercise goes against intuition and I've been wracking my brain ever since trying to see where I'm failing. However I can't. This is really that simple. In the end you are just asked to choose from two doors.

    For your odds to become 66% you would have to be able to pick 2 doors out of three and not know what's behind the 3rd door.
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

Page 3 of 8 FirstFirst 12345678 LastLast
Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21