Three Bags of Marbles
Some fun logic and statistics puzzles involving three bags of marbles
So the goal of having a substack is to think of cool things while driving, and then rush home and type them in. Well, assuming you think they will be useful to someone.
In this case I came up with an idea for a game that is a series of logic puzzles. I haven’t figured it all out yet, but I have had fun working on it, and I know that all sorts of homeschooled kids are really into math and logic and statistics and proving themselves smarter than their parents and siblings so I figured they would like this game. The name of the game is ‘Three Bags of Marbles’.
You start with three bags of marbles. You can use real bags and real marbles, or just imagine them in your head. One bag has ten black marbles in it. One bag has ten white marbles in it. And one bag has five white and five black marbles in it.
The game is to try to guess which bag is which. The goal of this article is to work out the math and logic behind the situation.
Ok, so let’s start with the three bags, and we know nothing at all about them. Three bags, all different colors, but we don’t know which bags hold which marbles. We’ll imagine a red bag, and green bag, and a blue bag.
Now suppose you were to guess that the blue bag was the one with the black marbles. Blue, black, they both start with ‘b’ so, you know, a place to start. What are the odds of you being right?
Well, assuming that the person who put the marbles in the bag did so randomly, and not according to the ‘b’ in ‘blue’, then you have a one third chance. There is one bag with all black marbles, and two bags that don’t have all black marbles.
Now, here’s a trick for you, suppose you were to pick a marble out of that bag. What are the odds of it being black?
Well, there are a couple ways of calculating that, and I encourage you to try several out. But one way is to just ask yourself about the marbles… how many of what kind are there? There are fifteen white and fifteen black. And you have just as much chance of picking any of them, so there is a 50% chance of picking a black.
Now turn the situation on its head. Suppose you hadn’t guessed yet, and you picked a black marble out of the blue bag. What are the odds of the blue bag being the all black bag?
Well, right off the top of your head you would say, “Well, it can’t be the all white bag, so it must be one of the other two. One of the other two is all black, one is half and half… so there is a 50% chance it is the all black bag.
Good thinking, but it doesn’t go far enough. It seems logical enough. The black/white bag could produce a black or a white marble. If it produces a black, then you have two bags the black could have come through. If it produces a white, then ditto. But that answer is actually wrong.
There are a couple of ways to think through the actual chance, and I’m going to work through both of them.
The method that occured to me was to work through the possibilities by brute force. So I made myself a little chart like this:
Bags:
Blue
Green
Red
I decided to start with the black/white bag be the green one, and I started pulling out marbles in my head. I pulled one marble out of each bag and ended up like this:
Blue Black
Green Black
Red White
Then I pulled another out:
Blue Black,Black
Green Black, White
Red White, White
I started to see a trend so I pulled the rest of the marbles out:
Blue Blackx10
Green Blackx5, Whitex5
Red Blackx10
Which, obviously, I could have gotten from the initial composition! But then I asked myself, “So if I pulled a black marble out, what are the odds of it coming from which bag? And I saw that there was a 2:1 chance of it coming from the blue bag! Which means that if I guess that a black marble came from the black bag with no other information, I will have been right 2/3 of the time.
My son heard the game and immediately came up with another way of proving it. “Look, Dad,” he said. “If you guess that the colour you picked was the color of the whole bag, you will be wrong every single time you manage to draw from the black/white bag, but you will be right every single time you pull from the all black or all white bags. There are two of those and only one of the black/white bags, so you will be right 2/3 of the time.”
Well, duh, I wished I had thought of that!
Now the next thing to consider is what if you got to guess after pulling out two stones? Try as we might, we couldn’t see that that made a difference except in one case!
Suppose you pulled out another stone out of the same bag. If you pulled out a white stone then you would know, for sure, that it was the black/white bag. If it was another black stone you would be a teeny tiny bit more certain it was the all-black bag. (The odds of pulling out two of the same color out of the black/white bag are 4/9, or 44%, which makes the overall odds of it being the all black bag 69.4% instead of the 66% you had after the first draw. You are still going to guess it.)
Now it all changes when you draw the third marble… assuming you do it right. If you draw one form each bag then you will know, for sure and without question, at least one bag. Let’s see how that works:
Bag 1: Black
Bag 2: Black
Bag 3: White
or
Bag 1: Black
Bag 2: White
Bag 3: White
Ignore the names of the bags and just focus on the marbles. In each case we have pulled the same colour from two bags (either black or white) and the other colour from the third bag. So in each case we know, for sure, what the third bag is.
Why does that work? Well, we will always pull a black marble from the all-black bag, and a white marble from the all-white bag; and then we will pull either a white or a black marble from the half-black, half-white bag. This means that for one colour we will have two of the marbles, but for the other colour we will have only one marble. And we will know that that bag will be the one that only has that colour.
There are lots of other fun things you can do with this thought experiment, but I hope that these experiments with statistics were amusing and educational. I know I had fun thinking about them.
And you can teach this to all ages. The younger kids can learn by experimentation, the older kids can do more with math and abstract logic. And you can vary the experiment… suppose there were three colours and seven bags? (With a number divisible by three in each bag). Would any number of pulls allow you to know for sure which bag was which? How many?
Basic statistics relies on basic logic, and games are often a great way to teach both of them. Have fun.