The Turing Guide

(nextflipdebug5) #1

418 | 38 BANBURISmUS REVISITED


We were not totally in the dark about what the work was for, as Mr Freeborn had told some
staff as much as he could to keep their interest. Probably the first time we realised we were
helping was when the Bismarck was sunk in May 1941. To show their gratitude the cook of one
of our ships involved sent us a cake!


Bayes’ theorem


The solving of the daily Enigma depended on a theorem proved almost two centuries earlier
by the eponymous Presbyterian minister of a church in Tunbridge Wells, Thomas Bayes. The
Royal Society of London published his theorem in 1763. Its importance is this: it shows us how
to assign numbers, representing levels of reliability, to what we learn from experience and what
we conjecture. Sadly Bayes was in ill health and did not live to see his theorem in print.
We start with a hypothesis to be tested, for example that a certain statement is true. We start
also with some understanding of the credibility of the hypothesis, which may be objective or
subjective. For simplicity I depart a little here from Bayes’ own exposition and express that
credibility in terms of odds on, or odds against, the hypothesis. Odds are simple: if something
happens on average four times out of five trials (so 80% probability of its happening), the odds
are 4:1 on its happening (or 1:4 on its not happening).
What we start with are the prior odds—prior, that is, to an event that gives us some additional
evidence. We now need to know whether that event is more likely to happen when the state-
ment in the hypothesis is true or when it is false; and how much more likely—or, to be more
precise, to know the ratio of the first of those probabilities to the second. That ratio is called the
‘Bayes factor’. Bayes’ theorem tells us that the credibility after we have the additional evidence
(the posterior odds) is obtained by multiplying the prior odds by the Bayes factor, and the cred-
ibility is enhanced or diminished according to whether the factor is above or below 1. Moreover,
if there are successive events that are independent of each other, their factors can be multiplied
to give a composite factor.
To illustrate this, suppose that I work in quality control for a firm making torch bulbs. Each
bulb is tested at a high level of current, and the experience is that one bulb in five fails. When
I start using a new tester, all five of the first five bulbs tested fail, instead of the expected one.
Suspicious, I recall the fable of the railway worker whose job was to walk alongside a stationary
train, testing each wheel with his hammer. If the blow produced a dull thud instead of a clear
ring, the wheel was assumed to be cracked. He had caused nineteen carriages to be taken out of
service before he realized that his hammer was cracked.
On enquiry, the suppliers confess that my new tester came from a suspect batch in which 1%
of the testers were faulty: they passed too high a current and blew one quarter of the acceptable
bulbs as well as all the substandard ones. I now need to test the hypothesis that my new tester
is one of the faulty 1%.
Out of a batch of 100 bulbs, a true tester will fail 20. Out of such a batch a false tester will
fail those 20, but will also (by reason of its own fault, as explained by the supplier) fail one in
four of the other 80 (i.e. another 20), meaning that 40 fail in all out of the 100 bulbs. Thus the
probability that a bulb will fail when tested by a faulty tester is 40%, compared with a probability
of failure of 20% when tested by a true tester. A single bulb failure is thus twice as likely (40%
against 20%) to occur with a faulty tester as with a true one. This means a Bayes factor of 2 in
favour of the hypothesis that my tester is a faulty one.

Free download pdf