Gamebook store

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.

8 comments:

  1. Some of that is too much for my brain to compute, Dave. I will look at the links though and possibly get that Jamie book, as I've clocked it before.

    I once managed to rack up an impressive 13 second places on the horses between winners. Using some dodgy maths, I calculated that the probability of 13 seconds between winners using their lowest "in running" odds on the Betting Exchange, was akin to black going in 26 times, with the roulette wheel then elevating off the table and whizzing off into outer space like in Close Encounters of the Third Kind.

    Anyway, have a nice Christmas and thanks for all the great posts again this year.

    ReplyDelete
    Replies
    1. Thanks, Andy. As for brain puzzles, I'll bet you're like my grandad, who we have mentioned here before. "I'm no good at maths," he'd say, before proceeding to work out the odds on several horse races in his head!

      Delete
  2. 13/27 is the correct answer to the question "If I pick a random person who owns exactly two cats at least one of which is a male born on a Friday, what is the probability that the other cat is also male?".

    The question as worded above is rather more ambiguous, because we don't know enough about how the person, the cat and the day of the week were selected.

    For example, suppose I visit a friend and a cat walks into the room "This is Mr Friday," remarks my friend, "so named because he was born on Friday. Our other cat, Stripey, is shy and so is probably hiding." In this case the proposed maths does not apply, and Stripey will turn out to be a male cat half the time.

    ReplyDelete
    Replies
    1. Quite so. In fact it's the case I mentioned at the end there, only this case instead of "a black cat" it's "a cat that walked into the room".

      Delete
    2. Btw Dom, don't you agree the wood-panelled environs of the FL blog, with its slight aroma of pipe smoke, is much more conducive to discussion than the overbright steel-&-glass atmosphere of Facebook? :-)

      Delete
  3. A couple of friends on Facebook have raised good objections to the wording on the puzzle. I'm hoping they'll have time to comment here, but the important point is that I am really asking: "If we take all people who have two cats and who have at least one cat that is a male born on a Friday, and I select one of those people at random, what is the chance of the other cat also being male?"

    I think that selection process is clear from my coin-tossing examples, but as mentioned if you separate the selection steps so that you're asking: "Do you have two cats? Is at least one of them male? Was that one born on a Friday?" then it's analogous to asking about the multiple-heads coin toss halfway through the throws.

    ReplyDelete
  4. We should collaborate, Dave. What with your brain and my horse racing tips, the results could be genius. I suppose the problem is, what if it ends up being my brain and your horse racing tips?

    ReplyDelete
    Replies
    1. It's a fifty-fifty split between riches and disaster, Andy!

      Delete