Please help calculate the odds of this

First off, let me say I know very little about math and even less about probabilities. I am a father of two teenage boys. One of them gave me a present for my birthday that consisted of several packages and puzzles that needed to be solved in order to open the package.

One of the things he did was to put fifty paper bags on a table. They were all closed. One bag contained a key. The other forty nine bags were empty. My task was to open each bag until I opened the one with the key. I jokingly said that with my luck it will be in the last bag. Sure enough, it was in the 50th bag that I opened. I said "Wow, I wonder what the odds are of that happening"? That is my question to you.

I have put this on Facebook and there have been several theories, the most popular is to say it is 50:1. But that is not it. I can prove that by saying if you were to try this scenario 50 times, one of those times would have to result in opening the bag with the key on the 50th try, there is no guarantee of that.

Other theories have been something to the effect of taking 1/50 times 1/49 times 1/48 times 1/47 and so on... Someone else thought it would be 49/50 times 48/49 times 47/48 etc....

I have no idea how to calculate this but I am thinking it is going to be a large number, very small odds in your favor of choosing the bag with the key on the 50th pick.

Please help.


TS Contributor
Assuming each bag is equally likely to contain the key, and the order of opening those bags is equally likely as well, then you have a probability of

[math] \frac {1} {50} [/math]

to obtain the key in any particular position, i.e. including the first bag and the last bag.
I would agree that the odds are 1/50 of picking it on the first try if it were in position 50. However, we are removing an item each time a bag is picked. Therefore, the first pick is 1/50, then the second is 1/49, the third is 1/48 and so on. If you add that all up, it would come to 1/1275.


Ambassador to the humans
There is a lot wrong with your last statement. First off 1/50 + 1/49 + ... + 1/1 definitely does not equal 1/1275.

Also the fact that you're summing the probabilities to get the probability of the final outcome tells me you don't have much probability background because that just doesn't make sense. Now here is one way to test your little theory - probability distributions need to sum to 1. That means if we calculate the probability of all possible outcomes and add them up that the sum should be 1. Your way definitely doesn't make this happen.

I will vouch for BGMs answer. It it 1/50.
As I said in the OP. I have little math background and no probability background. I am only passing on other theories that have been given to me by other people. One with a Masters in Electrical Engineering and the other with a Masters in the computer field. These are answers they have given me as I do not have clue one as to what the answer is. I was always under the impression that probability and odds were two separate things. I am only questioning the answer of 1/50 because if that were true, wouldn't it be correct in saying that if you tried this scenario 50 times, that at least one of those times you would pick the key on the 50th pick? The odds may in deed be 50:1, but what is the probability of it happening on the first and only attempt.


Ambassador to the humans
A probability of 1/50 doesn't guarantee anything. In this particular case it means if we look at all possible outcomes then 1/50 of those outcomes will result in the key being chosen last. Why don't look at a smaller example.

Let's say there were only 3 bags. Now let's say the key is randomly assigned to one of these bags. Now if we were going through the process of selecting bags and seeing if they contained the key (as is done in your problem) we wouldn't know which bag the key was in. But I'm going to assume that we know which bag it is in. I'll call it bag 3 and we'll call the other two bags by bag 1 and bag 2. Now I'm going to list out all the possible orders we could pick the bags up in.

1 2 3

1 3 2

2 1 3

2 3 1

3 1 2

3 2 1

Notice that there are 6 possible orders and that in 2 of the orders the bag with the key (bag 3) was picked last. So the probability of picking the key last in this case is 1/3. Now you might say "well you *assumed* the key was in bag 3" - sure but notice that whichever bag the key really is in that 2 out of the 6 possibilities have that bag being the last bag. It doesn't matter which bag it was put in - there is a 1/3 chance that we won't find it until the last bag!

Now the reason I wrote the full outcomes out (you might be thinking well for the sequence "3 2 1" why didn't he just stop at 3) is so that each of those 6 events have equal probability. If I would have listed

1 2 3
2 1 3
1 3
2 3

then those don't all have equal probability so we can't just count how many meet our requirement and divide by the total number of outcomes.

Another way to think about this is to argue from a symmetry standpoint. Let's say that instead of there only being 1 key that each bag had a key in it but they were different colors. So for the 3 bag example maybe we have red, blue, and gold. Your original problem boils down to only caring about one of the keys. Maybe we're only excited when we get the gold key. So you ask what is the probability of getting the gold key *last*. Well is there anything different about any of the keys other than color that would impact the chance we pick each key? Not really. So should the probability of getting the gold key last be different than the probability of getting the blue key last? Should this be different than the probability of getting the red key last? The answer, of course, is no. So there are 3 different keys that could occur last and they each need to be equally likely to have been chosen last so the probability of chosing any particular key last is 1/3.
Dason, that makes a lot of sense. Thank you. So the probability of it happening on the 50th pick is 1/50. What are the odds of that happening. In your 3 bag example, would the odds be 2:4 or 1:2? If so, what is it with 50 bags? Thanks again for the help, like I said, I am an idiot....
Junes, I am not sure, but still think the odds are greater than that. If they were 1:49, that is saying we could try the scenario 49 times and it would result with the bag being picked 50th one of those times.


Ambassador to the humans
Junes, I am not sure, but still think the odds are greater than that. If they were 1:49, that is saying we could try the scenario 49 times and it would result with the bag being picked 50th one of those times.
1:49 is correct. and what 1:49 means is that on average every 1 time you win you will lose 49 times. Another way of thinking about it is that out of 50 (49+1) games you will win one of those (on average).
Yup, I was just going to chime back in and agree that 1:49 is correct. The sum of the odds must equal the number of events. 1 favorable outcome to 49 unfavorable. So the odds are 1:49 with a 2% chance of it happening. I would not bet money on it.... Thank you all for your time!