Bayes' Theorem and the Theorem of Total Probability (Class 12)
Updated 15 October 2026 · Fact-checked
If E₁, E₂, …, Eₙ partition the sample space and A is any event with P(A) ≠ 0, 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. Bayes' theorem reverses a conditional probability: from causes-to-result to result-to-cause.
Multiply along each branch to reach A, add the branches to get P(A), then divide the branch you want by that total.
Illustration drawn for QuestionBuddy.
Understand Bayes' Theorem
Bayes' theorem answers 'reverse' questions: we see a result (a defective item, a red ball, a positive test) and ask which cause (machine, bag, condition) produced it.
Partition. Events form a partition of the sample space if they are pairwise disjoint, together cover the whole sample space, and each has non-zero probability. In questions, the partition is the list of possible causes: the bag chosen, the machine used, the group a person belongs to.
Theorem of total probability (NCERT Section 13.5.2). For any event ,
.
Read it as: the chance of the result is the weighted average of its chances under each cause, weighted by how likely each cause is.
Bayes' theorem (NCERT Section 13.5). If ,
.
The numerator is the one branch that ends in through ; the denominator is all branches that end in . The are called prior probabilities and the posterior probabilities. The posteriors always add up to 1.
Tree layout. Draw one branch for each cause with its prior, then a branch to the result with the likelihood . Multiply along each branch, add the products for , and divide the required branch by the sum. This layout is what marking schemes expect.
Variations boards like.
- Not the result: if the item is *not* defective, use as the likelihoods.
- Transfer problems: balls moved from one bag to another; the causes are the possible transfers (with probabilities from combinations).
- Medical or quality tests: a rare condition with a good test still gives a modest posterior, because false positives from the large healthy group dominate.
- Repeated evidence: after one result, the posterior becomes the new prior.
Bayes' theorem is the heaviest topic in the chapter: a 4- or 5-mark question (often a case study) appeared in every board paper from 2023 to 2026.
Bayes' Theorem: formulas to remember
- Partition
- The possible causes.
- Total probability
- Sum over all branches ending in A.
- Bayes' theorem
- One branch divided by all branches.
- Two causes
- The common case: E and its complement.
- Posteriors add to 1
- A quick check on your arithmetic.
- Complement result
- When the observed result is 'not A'.
How to solve Bayes' Theorem questions
The five-step layout for 3-, 4- and 5-mark Bayes questions.
- 1Define the causes (they must partition the sample space) and the observed result , in words.
- 2Write the priors ; check they add to 1.
- 3Write the likelihoods from the question (use if the result is a 'not').
- 4Find by the theorem of total probability.
- 5Apply Bayes: , simplify, and state the answer in context.
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.
Why a positive screening test is not a diagnosis
Suppose a condition affects 2 in every 1000 people. A screening test detects it in 99% of people who have it, but also gives a positive result for 5% of people who do not.
A person tests positive. What is the probability that they have the condition?
Try it first, then show the solutionSolution
- Priors: , . Likelihoods: , .
- .
- .
Answer: About 0.038, under 4%: most positives come from the large healthy group. That is why a positive screen is followed by a confirmatory test.
Memory hook: Rare cause + small error rate on a big group = mostly false alarms.
Updating where something is
Imagine you lost your phone either in the classroom (probability 0.6) or the canteen (0.4). A search of the classroom finds the phone with probability 0.7 if it is there.
You search the classroom and do not find it. Now what is the probability that it is in the canteen?
Try it first, then show the solutionSolution
- Result A: not found in the classroom. , .
- .
- .
Answer: , up from 0.4: failing to find it in one place makes the other place more likely.
Memory hook: Evidence shifts belief; Bayes says by exactly how much.
Tricks to remember Bayes' Theorem
Short memory aids. Say each one aloud once, then use it on a question the same day.
One branch over all branches
Bayes = (the branch you want) ÷ (sum of every branch that ends in the observed result).
Use it when: Writing the formula without memorising symbols.
PLT-B
Partition, Likelihoods, Total, Bayes: the order of the steps.
Use it when: 5-mark layout.
Not the result? Flip the likelihoods
If the item is good (not defective), use on every branch.
Use it when: Complement-result questions.
Posteriors sum to one
Find all the posteriors and add them; if they do not total 1, recheck.
Use it when: Self-checking in the exam.
Bayes' Theorem: solved examples
Ordered from board level to HOTS. Try each one before you open the solution.
Example 1: Total probability with two suppliers · 2 marks · Very short answerBoard level
A bakery buys 70% of its eggs from farm A and 30% from farm B. 2% of farm A's eggs and 5% of farm B's eggs are cracked. Find the probability that an egg picked at random is cracked.
Try it first, then show the solutionSolution
- Let : from A, : from B, C: cracked. , , , . (1 mark)
- . (1 mark)
Answer: 0.029
Example 2: A coin with two heads · 3 marks · Short answerBoard level
A box contains two fair coins and one coin with heads on both sides. A coin is chosen at random and tossed, and it shows a head. Find the probability that it is the two-headed coin.
Try it first, then show the solutionSolution
- : a fair coin, : the two-headed coin; , . H: head. , . (1 mark)
- . (1 mark)
- . (1 mark)
Answer:
Example 3: Three couriers and a late parcel · 5 marks · Long answerHarder board level
An online store ships 45% of its parcels through courier X, 35% through Y and 20% through Z. The probabilities that a parcel arrives late are 0.02, 0.04 and 0.08 respectively. A parcel arrives late. Find the probability that it was shipped through each courier.
Try it first, then show the solutionSolution
- Let : shipped by X, Y, Z; L: late. Priors 0.45, 0.35, 0.2 (they add to 1). (1 mark)
- Likelihoods , , . (½ mark)
- . (1½ marks)
- , , . (1½ marks)
- Check: . Z, though it ships the fewest parcels, is the most likely source of a late one. (½ mark)
Answer: X: , Y: , Z:
Example 4: Quality check: passed and rejected items · 3 marks · Short answerHarder board level
In a factory, 90% of items are good. A quality check passes a good item with probability 0.95 and passes a defective item with probability 0.1. Find (i) the probability that a passed item is good, and (ii) the probability that a rejected item is defective.
Try it first, then show the solutionSolution
- (i) ; . (1½ marks)
- (ii) Rejection likelihoods: for good, for defective. . (1 mark)
- . (½ mark)
Answer: (i) (ii)
Example 5: Transfer of two balls · 5 marks · Long answerHOTS / competency
Bag I contains 4 white and 2 black balls; bag II contains 3 white and 5 black balls. Two balls are transferred at random from bag I to bag II, and then a ball drawn from bag II is white. Find the probability that both transferred balls were white.
Try it first, then show the solutionSolution
- Causes: two white, one white and one black, two black transferred. , , . (1½ marks)
- Bag II then has 10 balls with 5, 4 or 3 white: , , . (1 mark)
- . (1½ marks)
- . (1 mark)
Answer:
Example 6: Case study: coaching batches · 4 marks · Case-basedHOTS / competency
Suppose a coaching centre has three batches: morning (50% of students), afternoon (30%) and weekend (20%). The probabilities that a student scores above 90 in a test are 0.3, 0.2 and 0.4 respectively. A student is chosen at random.
(i) Find the probability that the student scored above 90. (1 mark)
(ii) The student scored above 90. Find the probability that they are from the morning batch. (1 mark)
(iii) The student scored above 90. Find the probability that they are from the weekend batch. (1 mark)
(iv) The student did not score above 90. Find the probability that they are from the afternoon batch. (1 mark)
Try it first, then show the solutionSolution
- (i) . (1 mark)
- (ii) . (1 mark)
- (iii) . (1 mark)
- (iv) ; afternoon branch ; . (1 mark)
Answer: (i) 0.29 (ii) (iii) (iv)
Where students lose marks in Bayes' Theorem
The slips examiners see most often, and what to write instead.
Mistake: Using as the answer
The question asks for , the reverse conditional.
Wrong working
Late parcel from Z: 0.08.
Right working
.
Do this: Write the required probability in symbols before starting.
Usually costs: Almost the whole question.
Mistake: Priors that do not form a partition
Total probability needs causes that are disjoint and cover everything.
Wrong working
Transfer problem with causes 'a white ball moved' and 'a black ball moved' (they overlap).
Right working
Causes: two white, one of each, two black, with probabilities , , .
Do this: Check that the priors add to exactly 1.
Usually costs: Most of the marks.
Mistake: Forgetting to flip likelihoods for a 'not' result
If the observed result is 'rejected' or 'not defective', the likelihoods change.
Wrong working
Rejected item: .
Right working
.
Do this: Write for each cause in a small table.
Usually costs: 1 to 2 marks.
Mistake: Arithmetic slips in the total
Several small products are added; one slip spoils every posterior.
Wrong working
.
Right working
; check that the posteriors add to 1.
Do this: Use the 'sum to 1' check before writing the answer.
Usually costs: 1 mark.
Exam tips
- A Bayes or total-probability question of 4 or 5 marks appeared in every board paper from 2023 to 2026 (2023 Q35(a), 2024 Q37, 2025 Q38, 2026 Q37), and the 2026-27 sample paper has a 5-mark one (Q35).
- Case studies often split it into parts: total probability in one part, Bayes in the next. Reuse from the earlier part.
- Define events in words first (': the parcel is shipped by X'); unclear events lose the first step mark.
- A tree diagram is optional but makes the working easy to follow; label each branch with its probability.
- Fractions are expected unless the data are decimals; with decimals, convert the final ratio to a fraction where neat (such as ).
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.
Q1 · 1 mark · MCQBoard level
and form a partition with . If and , then is:
(a) 0.32
(b) 0.7
(c) 0.2
(d) 0.5Hint
.
Answer
(a) .
Q2 · 2 marks · Very short answerBoard level
Box I has 5 good fuses and 1 faulty fuse; box II has 3 good and 3 faulty. A box is chosen at random and a fuse drawn from it is faulty. Find the probability that it came from box II.
Hint
Likelihoods and .
Answer
; .
Q3 · 3 marks · Short answerHarder board level
In a factory, 40% of workers are in shift A and 60% in shift B. The probability that a worker has an accident in a month is 0.05 in shift A and 0.1 in shift B. An accident is reported. Find the probability that the worker was in shift B.
Hint
Total probability first.
Answer
; .
Q4 · 5 marks · Long answerHarder board level
Three bakeries supply bread to a canteen in the ratio 2 : 3 : 5. The proportions of stale loaves are 3%, 2% and 1% respectively. A loaf is found stale. Find the probability that it came from (i) the first bakery (ii) the third bakery.
Hint
Priors 0.2, 0.3, 0.5.
Answer
. (i) (ii) . (The second bakery also gives ; the three add to 1.)
Q5 · 1 mark · Assertion-reasonHarder board level
Assertion (A): In Bayes' theorem, the posterior probabilities always add up to 1.
Reason (R): The events form a partition of the sample space.
(a) Both A and R are true and R is the correct explanation of A.
(b) Both A and R are true but R is not the correct explanation of A.
(c) A is true but R is false.
(d) A is false but R is true.Hint
Add the numerators: what do you get?
Answer
(a). The numerators add to precisely because the partition the space, so the posteriors add to 1.
Q6 · 3 marks · Short answerHarder board level
A die is thrown. If it shows 1 or 6, a coin is tossed twice; otherwise it is tossed once. Exactly one head appears. Find the probability that the coin was tossed twice.
Hint
.
Answer
Priors (two tosses) and (one toss); likelihoods and . ; posterior . (Equal likelihoods leave the prior unchanged.)
Q7 · 3 marks · Short answerHOTS / competency
30% of machines in a workshop are faulty. A test flags a faulty machine with probability 0.9 and wrongly flags a sound machine with probability 0.2. (i) A machine is flagged once; find the probability that it is faulty. (ii) An independent second test also flags it; find the updated probability.
Hint
For (ii), use the answer to (i) as the new prior.
Answer
(i) . (ii) (the same as ).
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.State the theorem of total probability.Show answer
If partition S, then .
2.State Bayes' theorem.Show answer
.
3.What are prior and posterior probabilities?Show answer
Priors before the result is known; posteriors after.
4.What three conditions make a partition?Show answer
Pairwise disjoint, union is the whole sample space, each with non-zero probability.
5.Priors 0.5 and 0.5, likelihoods 0.2 and 0.6. Posterior of the second cause?Show answer
.
6.What do all the posteriors add up to?Show answer
1.
Bayes' Theorem: frequently asked questions
What is Bayes' theorem in simple words?
It finds the probability of a cause given an observed result. You multiply each cause's prior probability by the chance it produces the result, then divide the product for the cause you want by the sum of all such products.
How do I recognise a Bayes question?
The question describes several causes with given chances, then says a result has been observed and asks for the probability that it came from a particular cause, for example 'the item is defective; find the probability that it was made by machine B'.
What is the difference between total probability and Bayes' theorem?
Total probability gives the overall chance of the result, P(A). Bayes' theorem uses that P(A) as the denominator to find the probability of one cause given the result.
Which NCERT section covers Bayes' theorem?
Section 13.5 (Bayes' Theorem), including 13.5.1 on partitions of a sample space and 13.5.2 on the theorem of total probability, followed by the statement and proof of Bayes' theorem, in Chapter 13 of NCERT Mathematics Part II for Class 12.
Do I have to draw a tree diagram?
No, it is not required, but it organises the working and reduces mistakes. Writing the priors, likelihoods, total and final ratio clearly earns full marks either way.