PrepShorts · Study sheet · Class 12 Mathematics · Chapter 13, ProbabilityPrepShorts

Chapter 13 · Probability

Working back from an observed effect to the likelihood of each cause

Reversing the conditioning17 min

This video could not be loaded. Reload the page to try again.

Sign in with Google

17 min.

The idea

Every question in §13.5 has the same shape: something happened at the end, and you want to know which route the experiment took to get there. The formula on Part II p. 425 answers it in three lines, and not one of those lines is new — the definition of a conditional, the product rule, and the total across a partition, all of them already proved. What is new is the direction, and the direction is where students come unstuck, because the answer refuses to behave the way intuition says it should. In the chapter's own worked disease example on Part II pp. 427–428, a test that catches nine cases in ten still leaves a positive result wrong about ninety-two times in a hundred, and the reason is sitting in the denominator: the rare branch is being outvoted by the common one. The chapter computes that number and says nothing about it. Saying it is the difference between an explanation that teaches a formula and one that teaches why anybody wanted the formula.

What you should be able to do

  • State the reversal formula with all of its hypotheses
  • Derive it in three lines, naming the earlier result each line uses
  • Identify the denominator as the total from the previous topic and say why it is never anything else
  • Name the three roles the chapter's terminology gives — the pieces, the probability before, the probability after
  • Set a word problem up by naming the partition first and the observed event second, in that order
  • Work a two-branch reversal from stated bag contents
  • Explain why a highly accurate test on a rare condition still gives a small answer, in terms of the two products in the denominator
  • Work a three-branch reversal of the manufacturing kind
  • Handle a branch whose conditional is zero, and say what it contributes
  • Recognise the same computation inside a puzzle whose wording hides it

Words to know

TermDefinition in one lineFirst introduced
Bayes' theoremthe rule giving the probability of each piece of a partition once an event has been observedprinted in this chapter, as the §13.5 heading and as the named result (Part II pp. 423, 425)
hypothesesthe chapter's name for the pieces of the partition, once the formula is being appliedprinted in this chapter, italicised in the Remark (Part II p. 426)
a posteriori probabilitythe probability of a piece worked out after the event has been observedprinted in this chapter, italicised in the Remark (Part II p. 426)
priori probabilitythe probability of a piece before anything has been observedprinted in this chapter, italicised in the Remark (Part II p. 426) — but see Notes, the article in front of it is wrong
partitiona family of events that overlap nowhere, cover everything, and each carry positive probabilityprinted in this chapter (§13.5.1, Part II pp. 423–424)
reverse probabilitythe chance of the earlier stage given what was observed at the later oneprinted in this chapter (§13.5, Part II p. 423)
causesthe chapter's informal name for the pieces, used in its alternative title for the formulaprinted in this chapter, in double quotation marks (Remark, Part II p. 426)
exhaustivesaid of a family of events that between them leave nothing outprinted in this chapter (§13.5.1, Part II p. 424; Example 19, Part II p. 428)
false positivea positive test result on somebody who does not have the conditionprinted in this chapter, in Exercise 13.3 Q5 (Part II p. 431)
base ratehow common the condition is before any test is runan added term, not printed anywhere in this chapter
likelihoodthe chance of the observed event given one particular piecean added vocabulary for the second factor; the chapter writes the conditional and never names this role

Where people slip up

  • "The two conditionals are interchangeable." The chance of a positive result given the condition and the chance of the condition given a positive result are different numbers, and in Example 18 they are nought point nine and nought point nought eight three. This confusion is the reason the topic exists.
  • "A ninety per cent accurate test means a positive result is ninety per cent likely to be right." It does not, and the gap is the whole content of Example 18. Show the two branch populations before showing any fraction.
  • "The denominator is the probability of the piece." It is the total of every piece's contribution. Building it from the wrong set of pieces is the single commonest structural error, and it is invisible in a written answer because the fraction still looks like a fraction.
  • "The pieces have to be equally likely for the formula to work." They never have to be. Example 16 happens to have equal weights and Examples 19, 20 and 21 do not; do Example 16 first and then break the symmetry deliberately.
  • "A branch whose conditional is zero has to be dropped from the partition." It stays in the partition, contributes nothing to the total, and comes out with answer zero. Example 20 has exactly such a branch.
  • "Once the answer is computed, the before-probabilities are irrelevant." They are half the formula. In Example 21 the before-probabilities are one sixth and five sixths and they are what pull the answer below a half.
  • "The gold-coin puzzle is about coins." It is about which box was chosen, and the chapter's own solution says so in one line that a student will read past. Slow down there.
  • "Every question printed after this section is a reversal question." Exercise 13.3 Q1 stops at the total and reverses nothing; it belongs to the previous topic.
Transcript2,401 words

Two bags. The first holds three red balls and four black. The second holds five red and six black. A bag is chosen at random and one ball is drawn, and the ball is red. Which bag did it come from? Everything you were handed runs the other way. You know how likely each bag was, and you know how likely a red ball is once the bag is named. What you want is the bag, given the ball.

That is the shape of every question in this topic. Something happened at the end, and you want to know which route the experiment took to get there. There is a formula for it. It is three lines long, and not one of those three lines is new — the definition of a conditional, the product rule, and the total across a partition. All of them already proved. What is new is the direction. And the direction is where the answers stop behaving the way you expect.

Here is the statement, and it demands three things before it will run. First, a partition: pieces that overlap nowhere, miss nothing, and each carry some probability. Those are the routes. Second, an event you actually observed, and it must have positive probability. If what you saw could never happen, there is nothing to condition on. Given those, for each piece, the chance that route was taken, given what you saw, equals the chance of that route times the chance of what you saw along it — divided by the same quantity summed over every route.

One answer per piece. And those answers themselves add to one, across every case where the formula can be asked at all. Swept over every cut of a die and every observable event, twelve thousand seven hundred and eighty nine times, they add to one every time. The result is usually called Bayes' theorem. The proof is three lines and you should watch all three, because each one is a result you already have.

Line one. The thing you want is a conditional probability, so write it by definition: the chance that the route and the observation both happened, over the chance of the observation. Line two. Rewrite the top with the product rule. The chance both happened is the chance of the route, times the chance of the observation given that route. Both of those are numbers you were handed. Line three. Rewrite the bottom with the total across the partition. The chance of the observation is the sum, over every route, of exactly the same kind of product.

And that is the formula. Nothing was invented. The only thing that happened is that a quantity you could not read off the setup got replaced twice by quantities you could. Checked against the definition it claims to compute — every cut of a die, every observable event, every piece — forty two thousand four hundred and sixty two answers, and not one of them disagrees. One thing about that formula is worth more attention than the rest of it put together, and it is the bottom of the fraction.

The denominator is the total across the partition. The whole of it, unchanged. And the numerator is one of its own terms. So draw the total once. Then lift one term out of it and set that term above the whole sum. That picture is the formula. Get that wrong and the answer still looks like an answer, which is why this is the commonest structural error in the material. Two ways of getting it wrong, both counted.

Build the bottom out of the route's own probability instead of the total, and over the same sweep it is wrong twenty three thousand eight hundred and ninety five times against eighteen thousand five hundred and sixty seven right. Build it out of the total but leave one route out, and it is wrong twenty one thousand eight hundred and ninety three times. Both of those are wrong more often than they are right, and neither leaves a visible mark on the page.

Three pieces of vocabulary, because they are standard and you will meet them. The pieces of the partition get called the hypotheses. They are the competing explanations, and exactly one of them is actually true on any given run — which is just the partition property said in words. Each piece's probability before you observed anything is called its a priori probability. Its probability afterwards is called its a posteriori probability.

Before, and after. That is all those two phrases mean. And there is a third quantity with no standard name in this setting: the chance of what you observed, given one particular route. This video will call it the likelihood of that route, because it is the factor that makes one route look more likely than another. Weight times likelihood, on the top. The sum of weight times likelihood, on the bottom.

Back to the two bags, and work it end to end. The routes are: first bag, or second bag. Each has weight a half. The likelihoods are the chance of red inside each bag. The first holds three red out of seven, so three sevenths. The second holds five red out of eleven, so five elevenths. Two products: a half times three sevenths, and a half times five elevenths. The total of those is the chance of drawing a red ball at all, which is thirty four over seventy seven.

The answer for the second bag is its own product over that total. Thirty five over sixty eight. Notice what happened to the weights. They were equal, so they cancelled, and the arithmetic reduced to the two likelihoods compared against each other. Five elevenths is a little bigger than three sevenths, so the second bag comes out a little above a half. That is the whole story when the weights are equal.

It is almost never the whole story, because the weights are almost never equal. Three boxes, two coins in each. One box has two gold coins. One has two silver. One has one of each. Pick a box at random, pull out one coin without looking, and it is gold. What is the chance the other coin in that same box is also gold? Most people say a half. The reasoning is: it was not the silver-silver box, so it was one of the other two, so it is fifty fifty.

That is wrong, and the step that fixes it is one sentence long. The other coin is gold exactly when the box you picked was the gold-gold box. Those are not two related events. They are the same event. So the question is: given that the coin you drew is gold, which box did you pick? Three routes, each of weight a third. The likelihood of drawing gold is one in the gold-gold box, nought in the silver-silver box, and a half in the mixed box.

Products: a third, nought, and a sixth. Total: a half — which is right, because three of the six coins are gold. The answer is a third over a half. Two thirds. The reason it is not a half is that the gold-gold box had two chances to hand you a gold coin, and the mixed box had one. Now the case that matters more than any other, and the reason anybody outside a maths class has heard of this formula.

A screening test for some condition. It catches nine cases in ten. It wrongly flags one healthy person in a hundred. And one person in a thousand actually has the condition. Somebody is tested and the result is positive. What is the chance they have it? Two routes: affected, and healthy. Weights one thousandth and nine hundred and ninety nine thousandths. The two products. Affected: one thousandth times nine tenths, which is nought point nought nought nought nine. Healthy: nine hundred and ninety nine thousandths times one hundredth, which is nought point nought nought nine nine nine.

Look at those two numbers before dividing anything. The second is eleven point one times the first. So the answer is ninety over one thousand and eighty nine. About eight point three per cent. A test that catches nine cases in ten, and a positive result is wrong about ninety two times in a hundred. That number is not a paradox and it is not a trick. It is sitting in the denominator, and it is easiest to see by counting people instead of multiplying fractions.

Take a hundred thousand people. One in a thousand is affected, so a hundred of them have the condition and ninety nine thousand nine hundred do not. The test catches nine in ten, so of the hundred affected people, ninety are flagged. The test wrongly flags one in a hundred, so of the ninety nine thousand nine hundred healthy people, nine hundred and ninety nine are flagged. Now count the flagged people. Ninety of them are genuinely affected and nine hundred and ninety nine are not. Ninety out of one thousand and eighty nine.

Same answer, no fractions. The healthy branch is nine hundred and ninety nine times more populated, so even a one in a hundred error rate on that branch produces eleven times as many flags as the true cases do. And you can watch it happen. Keep the same test, and change only how common the condition is. One in ten: the answer is ten elevenths. One in a hundred: ten twenty-firsts, just under a half. One in a thousand: ten over a hundred and twenty one. One in a million: ten in a hundred and eleven thousand one hundred and twenty one.

The test never changed. Only the population did. The crossing point is exactly one in ninety one — that is where the two products are equal and the answer is exactly a half. The factory shape, which is the one exam questions take most often. Three machines make bolts. The first makes twenty five per cent of the output, the second thirty five, the third forty. Their defect rates are five per cent, four per cent and two per cent.

A bolt is picked at random and it is defective. Which machine made it? Three routes, three weights, three likelihoods, three products. Nought point nought one two five. Nought point nought one four. Nought point nought nought eight. Total: nought point nought three four five. That is the overall defect rate, and it is worth noticing that it lies between two per cent and five per cent, as a weighted average must.

The second machine's answer is its product over the total. Twenty eight over sixty nine, about forty one per cent. And look what the arithmetic did. The second machine is not the worst — the first one is, at five per cent — but the second makes more bolts, and the product is what decides. Neither column wins on its own. One more shape, and it settles a question people ask.

A doctor visits a patient by one of four routes, with probabilities three tenths, one fifth, one tenth and two fifths. The chances of arriving late are one quarter, one third, one twelfth — and for the fourth route, nought. That route is never late. The doctor arrives late. Which route was taken? The four products are three fortieths, one fifteenth, one one hundred and twentieth, and nought. They total three twentieths, and the answer for the first route is one half.

The fourth route is the interesting one. Its likelihood is nought, so it contributes nothing to the total, and its answer comes out at nought. But it stays in the partition. It has to — a partition needs every piece to carry some probability, and this one does, two fifths of it. What is nought is not the route's probability. It is the chance that route would have produced what you saw.

Those are different things, and only one of them is allowed to be nought. Last one, and it is the whole topic in a single line. Somebody tells the truth three times out of four. They throw a die and report a six. What is the chance it really was a six? Two routes. It was a six, weight one sixth. It was not a six, weight five sixths. Likelihoods: if it was a six, they report a six when they are being truthful, three quarters. If it was not a six, they report a six only when they are lying, one quarter.

Products: one eighth, and five twenty fourths. Total: one third. Answer: three eighths. Below a half. They are honest three times in four, they say six, and it is still more likely than not that it was not a six. Same reason as the screening test. There are five ways for it not to be a six and only one way for it to be a six, and five wrong faces with a quarter chance of a false report beats one right face with a three quarter chance of a true one.

The weights do not disappear just because the likelihoods are lopsided. What to keep. The formula reverses a conditional. You are given the chance of the observation along each route, and you want the chance of the route given the observation. Those two numbers are different, and the gap between them is the entire subject. Weight times likelihood on the top. The sum of weight times likelihood over every route on the bottom. The bottom is the total from the previous topic and it is never anything else.

Set the problem up by naming the routes first and the observation second, in that order, and before writing any number. A route's probability goes up exactly when your observation was likelier along that route than it was overall. That is not a feeling, it is an exact criterion, and it is right at all forty two thousand four hundred and sixty two cases swept here. A route whose likelihood is nought contributes nothing and comes out at nought, and it still belongs to the partition.

And when an answer surprises you, put the two products side by side before you divide. The surprise is almost always a rare route being outvoted by a common one.

The book

Open in a new tab