PYQ Vault

CBSE Class 12 Maths · Probability

Bayes' Theorem

Bayes' theorem works backwards: knowing that an event A has happened, it gives the probability that A came from a particular cause, P(cause given A) = P(cause) P(A given cause) divided by P(A).

Why this matters

55 questions, thirty-one of them from board papers in every year from 2022 to 2026, and none of them an MCQ. Twenty-two of the thirty-one are case-study parts that reverse the total probability found in the part before (defective phones, electric cars, loan defaults, vaccines, students who answered wrongly). The written questions, worth 3 to 5 marks, cover machines in a factory (2022), a card lost from a pack (2022, 2024), a man who speaks the truth 7 times out of 10 (2022), a CEO and company profits (2022, 2024), a biased and a fair coin (2023) and a student who knows or guesses (2023). The textbook adds Examples 16 to 21, Miscellaneous Examples 22 and 24, Exercise 13.3 Q2 to Q13 and Miscellaneous Questions 3, 6, 7 and 10.

Concept 1 of 5: Bayes' theorem: from the effect back to the cause

The total probability theorem adds up every route to the event A. Bayes' theorem asks what share of that total came through one particular route: that route's product divided by the sum of all the routes.

Definition

  • Bayes' theorem: if E1,E2,…,EnE_1, E_2, \ldots, E_n form a partition of S and A is an event with P(A)≠0P(A) \ne 0, then P(Ei∣A)=P(Ei) P(A∣Ei)∑j=1nP(Ej) P(A∣Ej)P(E_i|A) = \dfrac{P(E_i)\,P(A|E_i)}{\sum_{j=1}^{n} P(E_j)\,P(A|E_j)}.
  • The EiE_i are called hypotheses; P(Ei)P(E_i) is the priori probability and P(Ei∣A)P(E_i|A) the posteriori probability. It is also called the formula for the probability of 'causes'.
  • Proof in two lines: P(Ei∣A)=P(A∩Ei)P(A)=P(Ei)P(A∣Ei)P(A)P(E_i|A) = \dfrac{P(A \cap E_i)}{P(A)} = \dfrac{P(E_i)P(A|E_i)}{P(A)} by the multiplication rule, and P(A) is the theorem of total probability.
  • Spot it: the result is observed (the ball is red, the item is defective) and the question asks where it came from.
  • Answer layout: define E1,E2,…E_1, E_2, \ldots and A; write the priors; write P(A∣Ei)P(A|E_i); write the formula; substitute; simplify.

Bayes' theorem

P(Ei∣A)=P(Ei) P(A∣Ei)∑j=1nP(Ej) P(A∣Ej)P(E_i|A) = \dfrac{P(E_i)\,P(A|E_i)}{\sum_{j=1}^{n} P(E_j)\,P(A|E_j)}
  • EiE_ithe cause (hypothesis) asked about
  • P(Ei)P(E_i)its probability before A is known (priori)
  • P(Ei∣A)P(E_i|A)its probability after A is known (posteriori)

Worked example

Machine A makes 60% of a factory's items and machine B the rest. 3% of A's items and 2% of B's items are defective. An item is found to be defective. Find the probability that machine A made it.
Practise this conceptself-check · 3 quick reps

The same idea in a real exam question:

CBSE Class 12 · 2022 · 65/5/3 · Q13Hard

Example 1 · Probability · Bayes' Theorem

There are two boxes, namely box-I and box-II. Box-I contains 3 red and 6 black balls. Box-II contains 5 red and 5 black balls. One of the two boxes, is selected at random and a ball is drawn at random. The ball drawn is found to be red. Find the probability that this red ball comes out from box-II.

Answering P(A|E) instead of P(E|A)

'The item is defective; find the probability that machine A made it' asks for P(A | defective). The defect rate of machine A is the given P(D∣E1)P(D|E_1), not the answer.

Leaving out the denominator

The answer is one route divided by the sum of ALL the routes. The numerator alone is P(Ei∩A)P(E_i \cap A), not P(Ei∣A)P(E_i|A).

Assuming equal priors

Only 'chosen at random' gives equal priors. Shares like 60% and 40%, or a die deciding the bag, give unequal ones.

Concept 2 of 5: Three or more causes

With three machines or three companies, the work is the same: one product per cause in the denominator, and the cause asked about on top. In a case study the denominator is usually the total found in part (i).

Definition

  • Write the priors from the shares or the ratio, and the rates as P(A∣Ei)P(A|E_i).
  • Work out every product P(Ej)P(A∣Ej)P(E_j)P(A|E_j) once; their sum is P(A).
  • P(Ei∣A)P(E_i|A) is the product for EiE_i divided by that sum.
  • The posteriors of all the causes add to 1, so 'Amber or Bonzi, given electric' is 1−P(Comet∣electric)1 - P(\text{Comet}|\text{electric}).
  • A factor that appears in every term, such as 1100\dfrac{1}{100}, cancels. Show the cancelling in one line.

Bayes' theorem with three causes

P(E3∣A)=P(E3)P(A∣E3)P(E1)P(A∣E1)+P(E2)P(A∣E2)+P(E3)P(A∣E3)P(E_3|A) = \dfrac{P(E_3)P(A|E_3)}{P(E_1)P(A|E_1) + P(E_2)P(A|E_2) + P(E_3)P(A|E_3)}

Worked example

Three boxes are chosen with probabilities 12\dfrac{1}{2}, 13\dfrac{1}{3} and 16\dfrac{1}{6}. Box I has 1 red and 3 blue balls, Box II has 1 red and 1 blue, Box III has 4 red and 1 blue. A box is chosen and a ball drawn; it is red. Find the probability that it came from Box III.
Practise this conceptself-check · 3 quick reps

The same idea in a real exam question:

CBSE Class 12 · 2022 · 65/5/2 · Q13Hard

Example 2 · Probability · Bayes' Theorem

In a factory, machine A produces 30% of total output, machine B produces 25% and the machine C produces the remaining output. The defective items produced by machines A, B and C are 1%, 1.2%, 2% respectively. An item is picked at random from a day's output and found to be defective. Find the probability that it was produced by machine B?

Recomputing P(A) with a slip

In a case study, P(A) from part (i) is the denominator of the Bayes part. Reuse it, and copy it exactly.

Dropping a cause from the denominator

Every cause goes in the denominator, even one whose product is small. A two-term denominator for three causes gives a wrong answer.

Concept 3 of 5: Truth-tellers, guessing and test results

A report or a test result is evidence, not the truth. It can come from a true event reported honestly, or from a false one reported wrongly. Bayes' theorem weighs these two routes.

Definition

  • Truth-teller: E1E_1 = the event really happened, E2E_2 = it did not, A = the person reports that it happened.
  • P(A∣E1)P(A|E_1) = probability of speaking the truth; P(A∣E2)P(A|E_2) = probability of lying (1 minus the truth probability).
  • The priors come from the experiment itself (a six on a die: 16\dfrac{1}{6}), not from the person.
  • Knows or guesses: a student who knows is correct with probability 1; a guess is correct with the given probability (14\dfrac{1}{4} for four options).
  • Medical tests (NCERT Example 18): a positive result can come from a sick person (test detects) or a healthy one (false positive). With a rare disease, most positives can be false.

Report given by a truth-teller

P(E1∣A)=P(E1) tP(E1) t+P(E2) (1−t)P(E_1|A) = \dfrac{P(E_1)\,t}{P(E_1)\,t + P(E_2)\,(1 - t)}
  • ttprobability that the person speaks the truth
  • E1E_1the event really happened

Worked example

A speaks the truth 4 times out of 5. A die is thrown and A reports that the number is greater than 4. Find the probability that it really was greater than 4.
Practise this conceptself-check · 3 quick reps

The same idea in a real exam question:

CBSE Class 12 · 2022 · 65/1/2 · Q12Hard

Example 3 · Probability · Bayes' Theorem

A man is known to speak truth 7 out of 10 times. He threw a pair of dice and reports that doublet appeared. Find the probability that it was actually a doublet.

Giving the truth probability as the answer

The chance that the event really happened is not the person's truth rate. It equals the truth rate only when the two priors are equal, as with a fair coin.

A wrong report needs a lie

If the event did not happen, the person reports it only by lying, so P(A∣E2)=1−tP(A|E_2) = 1 - t, not t.

A student who knows is always right

P(correct∣knows)=1P(\text{correct}|\text{knows}) = 1. Writing the guessing probability there is a common slip.

Concept 4 of 5: A lost card or a missing ball

A card goes missing before the draw, so we do not know what the rest of the pack holds. The missing card's kind is the cause; the card drawn later is the evidence.

Definition

  • E1E_1 = 'the lost card is of the kind asked', E2E_2 = 'it is not'. Priors come from the full pack of 52.
  • After the loss, 51 cards remain. If the lost card was of that kind, one fewer of it remains.
  • For two cards drawn from the 51, use combinations: P(A∣E1)=kC251C2P(A|E_1) = \dfrac{{}^{k}C_2}{{}^{51}C_2}; the 51C2{}^{51}C_2 cancels in Bayes' theorem.
  • The same idea works for a ball moved to another bag (NCERT Miscellaneous Question 10): the moved ball's colour is the cause.

Lost card

P(E1∣A)=P(E1)P(A∣E1)P(E1)P(A∣E1)+P(E2)P(A∣E2)P(E_1|A) = \dfrac{P(E_1)P(A|E_1)}{P(E_1)P(A|E_1) + P(E_2)P(A|E_2)}

Worked example

A card is lost from a pack of 52 cards. Two cards are drawn from the remaining cards and both are face cards. Find the probability that the lost card was a face card.
Practise this conceptself-check · 2 quick reps

The same idea in a real exam question:

CBSE Class 12 · 2024 · 65/4/1 · 31 (a)Hard

Example 4 · Probability · Bayes' Theorem

A card from a well shuffled deck of 52 playing cards is lost. From the remaining cards of the pack, a card is drawn at random and is found to be a King. Find the probability of the lost card being a King.

Drawing from 52 after the loss

Once a card is lost, the pack is one card smaller. The conditional probabilities use the smaller pack; only the priors use the full pack.

Thinking the evidence makes the loss more likely

Drawing cards of a kind is a little LESS likely when one of that kind is missing, so the answer always comes out slightly below the prior. An answer above the prior signals a slip.

Concept 5 of 5: When the observed event is a 'not'

Case studies often turn the question round: the person was NOT infected, the student did NOT qualify. Bayes' theorem still works; use the complement of every rate and keep the priors as they are.

Definition

  • The evidence is A′A': 'the profit did not increase', 'the person is not infected'.
  • In each case, P(A′∣Ei)=1−P(A∣Ei)P(A'|E_i) = 1 - P(A|E_i). The priors P(Ei)P(E_i) do not change.
  • P(Ei∣A′)=P(Ei) P(A′∣Ei)∑jP(Ej) P(A′∣Ej)P(E_i|A') = \dfrac{P(E_i)\,P(A'|E_i)}{\sum_j P(E_j)\,P(A'|E_j)}.
  • The denominator is P(A′)=1−P(A)P(A') = 1 - P(A), so a total found earlier can be reused.
  • A rate that is already a 'not' (95% of dropouts do not qualify) is used as given.

Bayes' theorem with the complement as evidence

P(Ei∣A′)=P(Ei) [1−P(A∣Ei)]∑jP(Ej) [1−P(A∣Ej)]P(E_i|A') = \dfrac{P(E_i)\,[1 - P(A|E_i)]}{\sum_{j} P(E_j)\,[1 - P(A|E_j)]}

Worked example

A shop gets its parcels from suppliers P, Q and R in the ratio 1 : 2 : 2. They deliver on time with probabilities 0.9, 0.8 and 0.6. A parcel arrives late. Find the probability that it came from R.
Practise this conceptself-check · 3 quick reps

The same idea in a real exam question:

CBSE Class 12 · 2026 · 65/3/1 · 37 (iii) (b)Moderate

Example 5 · Probability · Bayes' Theorem

A survey was conducted to find out the success rate of students who qualified the entrance examination by dropping a year after class XII. As per the data collected, 40% students appearing in the examination were dropouts and the remaining students were regular students of class XII. Of the dropouts, 5% qualify the examination while 10% of the regular students qualify the examination. Based on the above information, answer the following questions.
A student selected at random did not qualify the examination. Find the probability that the student was a regular student.

Complementing the priors

Only the rates change to 1−P(A∣Ei)1 - P(A|E_i). The share of each group, P(Ei)P(E_i), stays as it was.

Using the 'yes' rates for a 'no' question

If the profit did NOT increase, the rates 0.8, 0.5, 0.3 for an increase become 0.2, 0.5, 0.7. A 2022 board question turned on this step.

Summary — formulas & gotchas at a glance

A revision cheat-sheet for the formulas and gotchas above. Click any concept name to jump back to its full explanation.

Formulas (5)

  • Bayes' theorem: from the effect back to the cause

    Bayes' theorem

    P(Ei∣A)=P(Ei) P(A∣Ei)∑j=1nP(Ej) P(A∣Ej)P(E_i|A) = \dfrac{P(E_i)\,P(A|E_i)}{\sum_{j=1}^{n} P(E_j)\,P(A|E_j)}
  • Three or more causes

    Bayes' theorem with three causes

    P(E3∣A)=P(E3)P(A∣E3)P(E1)P(A∣E1)+P(E2)P(A∣E2)+P(E3)P(A∣E3)P(E_3|A) = \dfrac{P(E_3)P(A|E_3)}{P(E_1)P(A|E_1) + P(E_2)P(A|E_2) + P(E_3)P(A|E_3)}
  • Truth-tellers, guessing and test results

    Report given by a truth-teller

    P(E1∣A)=P(E1) tP(E1) t+P(E2) (1−t)P(E_1|A) = \dfrac{P(E_1)\,t}{P(E_1)\,t + P(E_2)\,(1 - t)}
  • A lost card or a missing ball

    Lost card

    P(E1∣A)=P(E1)P(A∣E1)P(E1)P(A∣E1)+P(E2)P(A∣E2)P(E_1|A) = \dfrac{P(E_1)P(A|E_1)}{P(E_1)P(A|E_1) + P(E_2)P(A|E_2)}
  • When the observed event is a 'not'

    Bayes' theorem with the complement as evidence

    P(Ei∣A′)=P(Ei) [1−P(A∣Ei)]∑jP(Ej) [1−P(A∣Ej)]P(E_i|A') = \dfrac{P(E_i)\,[1 - P(A|E_i)]}{\sum_{j} P(E_j)\,[1 - P(A|E_j)]}

Watch out for (12)

Test yourself on Probability

15 past CBSE Class 12 questions from this chapter, timed at 23 minutes and marked the way the exam marks it. You see your score and every answer the moment you finish. Free to start.

Take the Probability chapter test