icon

Thomas Bayes & Mr Zootpooper

Phil Wilson Share this page

Thomas Bayes & Mr Zootpooper

Phil Wilson
November 2004

It is the year 2057 and you are sitting in a vast auditorium beneath a night sky like nothing on Earth. The sky is inky black, but dusted with millions of stars which do not twinkle like those your grandparents were able to see on Earth before the Megacities spread, but seem to stare steadily back at you like the tens of thousands of your fellow Moon inhabitants in the auditorium with you. An utter silence falls like a fluffy blanket on the crowd beneath the clear buckychain dome, as the quizmaster ascends the levi-steps to his rostrum in front of you. Despite the nanofans embedded in your skin, you begin to sweat. Two years of elimination rounds from all the settlements in Sol system have come down to this. You are the final competitor; you have beaten contestants from a system-wide population of nearly 700 billion. All that remains is for you to win your prize. You silently request your neuralnet to release more progesterone and melatonin into your blood supply and you begin to breathe more easily.

The quizmaster speaks.

"Ladies, gentlemen, zynglophs of all dimensions: welcome." The quizmaster's voice sounds clearly in the ears of all present, via direct neuralnet transmission. Those on other planets and habitats in Sol system receive the same audio and visual experience but with a delay of seconds or minutes. "Our finalist will be faced with a simple, yet difficult, task to win her prize. She will be shown three portals. One will transport her, her family, and friends to lives of never-ending bliss on the tropical holiday planet of Relaxeyfun 5 in the Paradise system." A general chorus of "ooohs" and "aaahs"; Relaxeyfun 5 is the most exclusive of Paradise system's 10 holiday resorts. The small print (in fact, nano print) on waiting lists for a two-day vacation recommends cryogenic storage while you wait. "The other two portals, however," continues the quizmaster, as the hubbub dies down, "will transport her, alone, to the planet Ploppycack 7 in the Unmentionable system, where she will live a life of servitude to the evil overlord, Zootpooper." A horrified gasp goes up. The quizmaster fixes his hungry gaze on you.

"Contestant Sol-3-Luna-ZXd54E: choose your portal."

The contest

Which one?

You stare at the three massive blank discs of grey suddenly hovering in front of you, and the glowing pink numbers 1, 2, and 3 above them. No-one told you about THIS. But having been interested in mathematics at v-school, you know that there is a one in three chance of choosing the right portal. Steeling yourself, you confidently say: "I choose portal number 1."

The quizmaster smiles, a little nastily in your opinion. "Before I reveal where Portal 1 leads, let me show you something," he says. With a flourish he waves at Portal 3, and the iris opens to reveal an orbiting view of a horrible brown planet. Everything is a shade of brown: the lands, the sea, the clouds, the cities. "Ploppycack 7," he announces to the disgusted crowd, some of whom are being noisily sick into floating bags. "This means that either Portal 1 or Portal 2 leads to a life of parties and sunbathing. You have chosen Portal 1. I ask you: do you wish to stick with your choice, or do you want to change to Portal 2?"

Ploppycack7

Not the best choice...

If the crowd were silent before seeing Ploppycack 7, now it is so quiet that they seem to be producing anti-noise. But you find yourself smiling. From your maths classes you know that your chances of success have just improved dramatically.

You look the quizmaster in the eye and clear your throat . . .

Interlude

Let us early 21st century inhabitants of Earth take a brief pause to consider our heroine's predicament. Is her sudden increase in confidence well-founded?

To answer this question we need to think about probability. Nothing in life is guaranteed, they say, other than death and taxes, and they recommend you postpone both for as long as possible. We describe how likely an occurrence, or event, is by using numbers between 0 and 1. If something has absolutely no chance of happening, for example Eminem releasing a Christmas karaoke special with Queen Elizabeth, then we say it has probability 0. An event which will definitely occur has probability 1, and everything else is somewhere in between. The closer the probability of an event is to 0, the less likely it is to occur, and the closer it is to 1 the more likely.

Sometimes you can write down probabilities just by using your brain (and a pen and piece of paper). The probability of rolling a 3 with a fair die is 1/6 because there are six equally likely outcomes and "rolling a 3" is one of them. But sometimes you have to make observations to work out how likely something is. If huge meteorites leave big craters on the surface of the Earth every million years, and there's no reason to believe that any time is more likely than any other, then we can estimate the chance of one hitting us this year to be about 1/1,000,000.

So what of our heroine's choice? She is certainly right in thinking that when the three portals are first presented she has a 1 in 3 chance of success. If we call "Portal 1 leads to Relaxeyfun 5" the event R1, and the probability of this event P(R1), then P(R1)=1/3. If we define R2 and R3 similarly, then P(R2)=P(R3)=1/3 also: each portal is equally likely to take her to Relaxeyfun 5 and so she has no reason to pick one rather than another.

But then it is revealed that Portal 3 leads to Ploppycack 7, which means that one of the remaining portals leads to Relaxeyfun 5 and one leads to Ploppycack 7. Because there are now only two possible outcomes, R1 and R2, we have P(R1)=1/2 and P(R2)=1/2; the numbers have changed but both events are equally likely. There seems to be no advantage to changing the choice to Portal 2, right?

Wrong. The probability of Portal 1 leading to Relaxeyfun 5 remains one in three, that is P(R1)=1/3, and so now P(R2)=2/3 and our heroine should switch to Portal 2.

Why does this happen?

To understand we first note that the problem has changed from "choose one of three apparently identical portals" to "choose one of two portals, {\em given that you know a fact about a third portal}". Questions of this type deal with {\em conditional probabilities}, in which the probability of an event $A$ occurring is conditional on the probability of another event, $B$, occurring. We write this conditional probability as $P(A|B)$ and say "the probability of A given B". The formal definition is \begin{equation} P(A|B)= \frac{P(A \mbox{ and }B)}{P(B)}. \end{equation} provided that $P(B)$ is not 0. In this formula, $P(A \mbox{ and }B)$ means the probability of both $A$ and $B$ occurring.

Conditional probability was first studied properly by the mathematician Thomas Bayes, but since he lived from 1702 to 1761 we can be fairly sure that he never imagined his work applying to an interplanetary quiz show on the Moon. In an essay discovered after his death, Bayes had written what has become known as Bayes' Theorem: $$ P(A|B)=\frac{P(B|A)P(A)}{P(B)}. $$ This simple theorem has an almost unbelievable number of applications in science, technology, business, economics, healthcare, interplanetary quizshows, and so on. Let us see how it leads to the conclusion that switching to Portal 2 increases the odds of happiness.

We will need some more notation: let $Q1$ denote the event "the quizmaster reveals that Portal 1 leads to Ploppycack 7", and similarly for $Q2$ and $Q3$. Since we have said that the quizmaster opens Portal 3, we are interested in finding $P(R1|Q3)$ and $P(R2|Q3)$. We first thought that both were equal to 1/2, but then we claimed that they are different.

Bayes' Theorem tells us \setcounter{equation}{1} \begin{equation} P(R2|Q3)=\frac{P(Q3|R2)P(R2)}{P(Q3)}, \end{equation} and so we need to determine all the terms on the right hand side. Well, $P(R2)=1/3$, as before. Next, the quizmaster can only uncover Portal 2 or Portal 3, but {\em if} Relaxeyfun 5 is behind Portal 2 {\em then} he must open Portal 3. That is, $P(Q3|R2)=1$. Note that we haven't said that Relaxeyfun 5 {\em must} be behind Portal 2, but the theorem asks us for the probability of the quizmaster revealing Portal 3 {\em if} Portal 2 leads to the real prize.

Finding $P(Q3)$ takes a little thought because it is not immediately clear from the data. If you want to find the probability of one of several events, then if the events do not affect each other, if they are {\em independent}, then you simply sum the probabilities of each occurring individually. The throws of a die are independent, so the probability of throwing a 2 or a 4, which we write $P(2~\mbox{or}~4)$, is simply $$P(2 \mbox{ or } 4) =P(2)+P(4)=1/6+1/6=1/3.$$ The event $Q3$ can be split into two independent events, whose probabilities we can sum. The quizmaster opens Portal 3 {\em either} when Portal 1 leads to Relaxeyfun 5 {\em or} when Portal 2 does; these events cannot happen together, and so are independent, but clearly these are the only two options. This leads to the formula \begin{eqnarray*} P(Q3)& = & P(Q3 \mbox{ and} R1) + P(Q3 \mbox{ and} R2) = P(Q3|R1)P(R1) + P(Q3|R2)P(R2)\\ & = &1/2 \times 1/3 + 1 \times 1/3 = 1/2, \end{eqnarray*} where we have used formula (1).

Substituting these values into (2) gives us P(R2|Q3)=2/3 . Hence, as we claimed, our heroine should switch her choice to Portal 2.

Relaxeyfun5

Probability can help you get there

Let us recap. When our heroine knew nothing about any of the portals in particular, then each portal was equally likely to lead her to Relaxeyfun 5. But knowing something about Portal 3 gives her extra information about Portals 1 and 2. To put it another way, choosing between two options when you know something about a third, is not the same as simply choosing between two options.

Back to 2057 . . .

You continue to smile as you look the quizmaster in the eye and say, very clearly, "I think I'll change to Portal 2, please." The quizmaster's face hardens slightly, and something pulses near his left eye. He asks if you are sure you want to change. You reply that you are.

"Ladies, gentleman, all kinds of zynglophs. Our finalist has made her choice," he announces, his voice icy. Portal 1 vanishes and Portal 2 swells to an enormous size, hanging obliquely above your reclined chair. You can sense the frisson passing through the crowd as the quizmaster shouts, "And Portal 2 leads to . . ." as the greyness begins to swirl. As the swirls become shadows of what is to come, you think of how there is still a one in three chance that you'll be spending the rest of your life in Ploppycack 7. Your heart is in your throat and you can't stop staring at the resolving shadows which fill your visual field.

The portal iris opens...

Postscript

  1. Can readers think of a way to prove that the odds on Portal 2 leading to Relaxeyfun 5 improve to two in three after being shown that Portal 3 leads to Ploppycack 7 without using Bayes' Theorem?
  2. What would happen with four or more portals?
  3. Interpret the P(B)=0 in the context of formula (1). What happens to the remaining terms?
  4. The contestant's I.D. is in the form "System-Planet-Satellite Number-Human Number" The human number is six characters long. The first three and final one are upper or lower case letters of the Roman alphabet. Characters 4 and 5 are digits from 0 to 9. If all human numbers have this six digit form what is the maximum number of people who can be identified uniquely?

About the author

Phil Wilson is a JSPS Postdoctoral Fellow at the University of Tokyo, where he studies biological cell dynamics. He obtained his PhD in 2003 from University College London for research in fluid dynamics, and taught there briefly before moving to Japan.