Gamebook store

Showing posts with label mathematics. Show all posts
Showing posts with label mathematics. Show all posts

Thursday, 22 December 2022

Cats, coins and conundrums


I don’t know how you stand on brain teasers. Jamie has written a whole book of them. I have a friend who likes to get us playing news quizzes on New Year’s Eve, but personally I prefer the kind of thing that stumps people at the dinner table. One of those is the Monty Hall problem. We featured one of Ivan Morris's on the blog a while back. But the one above is slightly less well-known and well worth thinking about.

Maybe you’d start by saying: “Somebody has two cats. The older cat is male. What’s the probability that the other cat is also male?” Everybody can get that. It’s fifty-fifty.

But maybe first we should pause and think about what probability means. Clearly if I have two cats, I already know what sex they are. Probability isn’t about the specific case where the facts are already known (well, duh), it takes a very large number of cases that meet the first condition and then asks how many of them meet the second condition – sight unseen.

Instead of cats, let’s think of it as people tossing coins. You have a room full of people (a thousand, say) and they all toss two coins. I ask everyone who has at least one coin that came up heads to raise their hand. Three-quarters of the room do so. So now I’m just looking at those 750 people and I ask how many have two heads. All but 250 hands go down. So, OK, if the question was: “Somebody has flipped two coins. At least one of them came up heads. What’s the chance their other coin also came up heads?” It’s 1 in 3.

Notice that earlier I mentioned the older cat being male. Making it the older cat defines it as distinct. It’s like asking everybody after tossing the first coin to put their hand up if they get heads. Then you get them to toss again, and keep their hand up if they get heads again. Now half of the hands go down, because each coin toss is random.

Digression: I knew somebody at the French Chamber of Commerce & Industry who believed that you could work out the odds of a coin toss based on how that coin had come up before. So if he tossed three heads in a row, he was convinced tails became more likely on the next toss.

This is of course nonsense, for which Pascal would have berated him soundly. It's nowadays known as the Monte Carlo fallacy. It is true that the chance of getting heads four times in a row is only 1 in 16, but those are the odds in advance. If you toss four coins, cover them up, and then show me that the first two are heads, and ask, “What’s the chance that the next two are heads?” I’ll tell you 1 in 4. You might already know that they both also came up heads, but see above – probability doesn’t apply if you know the facts. What probability can tell us is that in these circumstances, out of every four people who show you the first two heads, only one will be able to reveal two more heads.

So now we’re back to the problem at the top there. Sticking with coins rather than cats: “I have handed out lots of coins marked randomly with the numbers 1-7. Everybody has flipped two coins. If somebody in the room has at least one coin that came up heads with the number 7 marked on it, what’s the chance their other coin also came up heads?”

Think it through. Everybody gets their coins, tosses them, and looks at the result. I ask anyone who has at least one coin showing heads to put their hand up. Obviously nobody who got two tails does, so we ask them to leave.

Next I ask everybody who doesn’t have at least one coin showing a head that’s marked with a 7 to leave too. Two thirds of the people have one head and one tail showing, and only one in seven of those has a head marked with a 7. One third of the original group have thrown two heads. How many of them have at least one marked with a 7? Well, the chance of neither having a 7 is (6/7)squared, ie 36/49. So 13/49 of the two-heads folks have at least one marked with a 7.

Now compare that with the heads-&-tails people. There are 14/49 of them with a head marked with a 7. (One in seven got a head marked 7; count 1/7 times two because half tossed heads then tails, half tossed tails then heads.) Let’s just assume we began with a total of 196 people when the coins were handed out, so the total sample group who can say, “At least one of my coins came up heads and is marked with a 7” is 14+13 = 27 people. Of those, 13 threw two heads.

It applies to cats too (but don’t trying throwing them) and so the answer to “Somebody has two cats. At least one of them is a male born on a Friday. What’s the probability that the other cat is also male?” is 13/27.

Now, notice that this only applies in the general case. If I’d said: “Somebody has two cats, one white and one black. The black one is a male born on a Friday. What’s the probability that the other cat is also male?” Now it’s fifty-fifty, because you collapsed the wave function (so to speak) first. By identifying one specific cat in the pair by a characteristic the other doesn’t share (it could also have been age) you make its birthday irrelevant – the probability of the other one being male is now independent of the other.

By this stage you should have the dining table to yourself, so tuck into more turkey and drink some wine before you start thinking about a cat born on December 25th.