Skip to content
MathsISC Class 12 · Probability

Bayes' Theorem and the Theorem of Total Probability

Updated 15 October 2026 · Fact-checked

Bayes' theorem reverses a conditional probability. If E₁, E₂, …, Eₙ are mutually exclusive and exhaustive causes and A is an observed event, then P(Eᵢ | A) = P(Eᵢ)P(A | Eᵢ) ÷ ΣP(Eⱼ)P(A | Eⱼ). The denominator is P(A), found by the theorem of total probability.

Multiply along each orange branch to A, add them to get P(A), then a cause's posterior is its branch divided by that total.

Illustration drawn for QuestionBuddy.

Understand Bayes' Theorem

The situation. Something happens in two stages. First, one of several possible causes occurs: a box is chosen, a machine makes an item, a person has or does not have a disease. Then an outcome is observed: a red ball is drawn, the item is defective, a test is positive. Bayes' theorem answers the reverse question: given the outcome, how likely is each cause?

Setting up. Let be the causes. They must be mutually exclusive (only one happens) and exhaustive (one of them must happen), so . These are the prior probabilities. Let be the observed event, with likelihoods : the chance of if cause occurred.

Theorem of total probability. can happen through any of the causes, so

A tree diagram makes this visible: multiply along each branch, add the branches that end in .

Bayes' theorem. By the multiplication theorem, . Dividing,

In words: the posterior probability of a cause is its branch's share of the total probability of the outcome.

Likelihoods with two draws. When two items are drawn without replacement from the chosen box, the likelihood is a product with a changed denominator, for example . If the order does not matter (one white and one red in either order), add both orders or use combinations: . The ISC 2024 examiners noted candidates who did not recognise drawing without replacement in the gems question, and others who found the total probability but did not go on to apply Bayes' theorem.

Why the answers surprise. In a medical test with a rare disease, most positive results can still be false, because the healthy group is so large that even a small false-positive rate produces many positives. Bayes' theorem weighs the likelihood by how common each cause is.

Checks. The posterior probabilities of all the causes add up to 1. A cause with a higher likelihood should gain probability compared with its prior; a cause with a lower likelihood should lose it.

Bayes' Theorem: formulas to remember

Partition
Causes must be mutually exclusive and exhaustive.
Total probability
Add the branches of the tree that end in A.
Bayes' theorem
Posterior = branch ÷ total.
Multiplication theorem
Each branch of the tree.
Without replacement
For "one of each" in any order, add both orders.
Posterior check
A quick check on the arithmetic.

How to solve Bayes' Theorem questions

A clear structure earns most of the marks in a Bayes' theorem question.

  1. 1Name the causes in words (for example ": box I is chosen") and the observed event .
  2. 2Write the priors and check they add to 1.
  3. 3Work out each likelihood carefully, multiplying for two draws and adjusting for without replacement.
  4. 4Find by total probability: add over all causes.
  5. 5Apply Bayes' theorem for the cause asked: its term divided by .
  6. 6Simplify the fraction and, if asked, interpret it in words.
  7. 7Check that the posteriors of all causes would add to 1.

Bayes' Theorem in real life

Each concept, met in an everyday situation. Read the situation, try the problem, then check the solution. The one-line hook is what to remember.

Bayes' theorem with a forecast

Suppose in a town it rains on 20% of days. A forecaster predicts rain on 90% of the days when it does rain, but also predicts rain on 15% of the days when it stays dry.

The forecast for tomorrow is rain. What is the probability that it actually rains?

Try it first, then show the solutionSolution
  1. : it rains, ; : dry, . : rain is forecast.
  2. , .
  3. .
  4. .

Answer: 0.6: even with a rain forecast, there is a 40% chance of a dry day.

Memory hook: Posterior = the "rain and forecast" branch ÷ all "forecast" branches.

Total probability and Bayes for a delivery problem

Imagine a shop that uses three couriers: P delivers 50% of parcels, Q 30% and R 20%. Their late-delivery rates are 5%, 10% and 2%.

What fraction of parcels arrive late? If a parcel is late, what is the probability that Q delivered it?

Try it first, then show the solutionSolution
  1. .
  2. .

Answer: 5.9% of parcels are late; given a late parcel, the probability it was Q's is .

Memory hook: A small courier with a bad record can carry most of the blame.

Tricks to remember Bayes' Theorem

Short memory aids. Say each one aloud once, then use it on a question the same day.

  • Branch over total

    Draw the tree. Posterior = (the branch you want) ÷ (sum of all branches ending in the observed event).

    Use it when: Every Bayes' theorem question.

  • Prior × likelihood

    Each branch is "how common the cause is" × "how likely the evidence is from that cause".

    Use it when: Building the numerator and denominator.

  • No replacement, shrink the bottom

    Second draw without replacement: subtract one from the total (and from the colour already taken).

    Use it when: Two-draw likelihoods.

  • Posteriors sum to 1

    If your posteriors over all causes do not add to 1, something is wrong.

    Use it when: A quick final check.

Bayes' Theorem: solved examples

Ordered from board level to HOTS. Try each one before you open the solution.

Example 1: Total probability with two bags · 1 mark · MCQBoard level

Bag I has 3 red and 2 black balls; bag II has 2 red and 3 black balls. A bag is chosen at random and a ball is drawn. The probability that it is red is:
(a)
(b)
(c)
(d)

Try it first, then show the solutionSolution
  1. .

Answer: (b) .

Example 2: Reversing the question · 3 marks · Short answerBoard level

In the previous example, the ball drawn is red. Find the probability that it came from bag I.

Try it first, then show the solutionSolution
  1. : bag I, : bag II, each with probability ; : red ball. (1 mark)
  2. , , so . (1 mark)
  3. . (1 mark)

Answer: .

Example 3: Three machines · 5 marks · Long answerHarder board level

Suppose machines A, B and C produce 50%, 30% and 20% of a factory's bolts, with 2%, 3% and 4% of their bolts defective. A bolt chosen at random is defective. Find the probability that it was made by C.

Try it first, then show the solutionSolution
  1. : made by A, B, C; . : defective. (1 mark)
  2. , , . (1 mark)
  3. . (1 mark)
  4. . (1 mark)
  5. Interpretation: C makes only 20% of bolts but accounts for about 30% of defective ones. (1 mark)

Answer: .

Example 4: A screening test · 3 marks · Short answerHarder board level

Suppose 1% of a population has a certain disease. A test detects the disease in 95% of people who have it, but also gives a positive result for 5% of people who do not. A person tests positive. Find the probability that the person has the disease.

Try it first, then show the solutionSolution
  1. , ; , . (1 mark)
  2. . (1 mark)
  3. . (1 mark)

Answer: : only about 1 in 6 positives actually has the disease.

Example 5: Truth-telling · 3 marks · Short answerHarder board level

A person tells the truth 3 out of 4 times. A fair die is thrown and the person reports that it shows a six. Find the probability that it actually is a six.

Try it first, then show the solutionSolution
  1. : six occurs, ; : not six, . : reports a six. (1 mark)
  2. (tells the truth); (lies). (1 mark)
  3. . (1 mark)

Answer: .

Example 6: Two draws without replacement · 5 marks · Case-basedHOTS / competency

Suppose box I has 2 white and 3 red balls, box II has 4 white and 1 red, and box III has 3 white and 3 red. A box is chosen at random and two balls are drawn one after the other without replacement. Both are white.
(i) Find the probability of drawing two white balls from each box. (2 marks)
(ii) Find the probability that the balls came from box II. (3 marks)

Try it first, then show the solutionSolution
  1. (i) Box I: . Box II: . Box III: .
  2. (ii) Each box has prior . .
  3. .

Answer: (i) ; (ii) .

Where students lose marks in Bayes' Theorem

The slips examiners see most often, and what to write instead.

  • Mistake: Stopping at total probability

    The ISC 2024 examiners noted candidates who found P(A) but did not apply Bayes' theorem.

    Do this: Read the last line of the question: "given that…, find the probability that…" always needs the final division.

    Usually costs: 1 to 2 marks.

  • Mistake: Ignoring "without replacement"

    In the 2024 gems question, candidates used the same denominator for both draws.

    Wrong working

    .

    Right working

    , and for "one of each" add the other order: , total .

    Do this: Reduce the total by one for the second draw, and count both orders when order does not matter.

    Usually costs: 2 marks.

  • Mistake: Not defining events

    Without named events, the working is hard to follow and method marks are lost.

    Do this: Write E₁, E₂, … and A in words at the start.

    Usually costs: 1 mark.

  • Mistake: Confusing P(A|B) with P(B|A)

    The likelihood P(positive | disease) is not the posterior P(disease | positive).

    Do this: Say each conditional probability aloud: "probability of … given …".

    Usually costs: The whole answer.

Exam tips

  • Draw a tree diagram, even a small one; it organises the priors and likelihoods and earns method credit.
  • Write by total probability as a separate line before applying Bayes.
  • Keep fractions; decimals are fine in context questions but must be exact enough (three significant figures).
  • If the question gives counts (like numbers of drivers), you can use them as weights directly.
  • Interpret the answer in one sentence when the question is set in a real situation.

Practice questions on Bayes' Theorem

Write each answer on paper first. Open the hint only if you are stuck, and the answer only when you have finished.

  1. Q1 · 1 mark · MCQBoard level

    If , and , then is:
    (a) 0.25
    (b) 0.5
    (c) 0.75
    (d) 0.6

    Hint

    Branch over total.

    Answer

    (c) .

  2. Q2 · 3 marks · Short answerBoard level

    Suppose urn 1 has 4 white and 6 black balls, and urn 2 has 7 white and 3 black. A coin is tossed: heads, a ball is drawn from urn 1; tails, from urn 2. The ball is white. Find the probability that the coin showed heads.

    Hint

    .

    Answer

    .

  3. Q3 · 3 marks · Short answerHarder board level

    Suppose an insurer covers 3000 two-wheeler drivers, 5000 car drivers and 2000 truck drivers, whose probabilities of an accident in a year are 0.02, 0.01 and 0.05. An insured driver has an accident. Find the probability that the driver drives a truck.

    Hint

    Use the counts as weights.

    Answer

    Expected accidents: . .

  4. Q4 · 3 marks · Short answerHarder board level

    In a multiple-choice test with 4 options, a student knows the answer with probability and otherwise guesses. Given that the answer is correct, find the probability that the student knew it.

    Hint

    A guess is right with probability .

    Answer

    .

  5. Q5 · 1 mark · Assertion-reasonHarder board level

    Assertion (A): In Bayes' theorem the events must be mutually exclusive and exhaustive.
    Reason (R): The theorem of total probability, which gives the denominator, requires the to partition the sample space.
    (a) Both true, R explains A. (b) Both true, R does not explain A. (c) A true, R false. (d) A false, R true.

    Hint

    Where does the denominator come from?

    Answer

    (a).

  6. Q6 · 3 marks · Short answerHOTS / competency

    A card from a well-shuffled pack of 52 is lost. From the remaining 51 cards, two cards are drawn and both are hearts. Find the probability that the lost card was a heart.

    Hint

    Causes: lost card heart or not.

    Answer

    .

  7. Q7 · 4 marks · Case-basedHOTS / competency

    Case study: Suppose 40% of the emails a company receives are spam. The word "offer" appears in 30% of spam emails and in 5% of genuine emails.
    (i) Find the probability that an email contains "offer". (1 mark)
    (ii) An email contains "offer". Find the probability that it is spam. (1 mark)
    (iii) An email does not contain "offer". Find the probability that it is genuine. (1 mark)
    (iv) Should the filter delete every email containing "offer"? Give a reason. (1 mark)

    Hint

    Use complements for (iii).

    Answer

    (i) . (ii) . (iii) . (iv) No: 20% of emails containing "offer" are genuine, so deleting them all would lose real mail.

Test your recall

Answer in your head or on paper first, then open the card. Pulling an answer out of memory makes it stick far better than re-reading.

  1. 1.State the theorem of total probability.Show answer

    for a partition .

  2. 2.State Bayes' theorem.Show answer

    .

  3. 3.What conditions must the causes satisfy?Show answer

    They must be mutually exclusive and exhaustive.

  4. 4.What are prior and posterior probabilities?Show answer

    Prior: before the evidence. Posterior: after observing .

  5. 5.Two bags chosen equally; P(red | bag I) = 0.8, P(red | bag II) = 0.2. Red drawn: P(bag I)?Show answer

    0.8.

  6. 6.What do the posterior probabilities of all causes add up to?Show answer

    1.

Bayes' Theorem: frequently asked questions

When should I use Bayes' theorem?

When a question tells you how likely an outcome is under each of several causes, and then asks for the probability of a particular cause given that the outcome happened. The phrase "given that … find the probability that it came from …" is the signal.

What is the difference between total probability and Bayes' theorem?

Total probability finds the overall chance of the outcome by adding over all causes. Bayes' theorem then divides one cause's share by that total to find the probability of the cause given the outcome.

Why can a positive medical test still mean a low chance of disease?

If the disease is rare, the healthy group is much larger, so even a small false-positive rate produces more false positives than true positives. Bayes' theorem weighs each group by its size.

Do I need a tree diagram?

It is not compulsory, but it makes the structure clear and helps avoid mistakes, especially with two-stage draws. Examiners often give method marks for a correct tree.

How many marks does Bayes' theorem carry in ISC?

It appears as a long question in most years: a 4-mark case question on gems in boxes in 2024 and a 6-mark question in 2025. Probability carries 9 marks in the 2027 paper.