PYQ Vault

JEE Mains Maths · Probability

Total Probability and Bayes' Theorem

Splitting an event over the ways it can happen (total probability), and reversing a conditional to find which way it most likely happened (Bayes' theorem), including cases where the contents of a bag are unknown.

Why this matters

Twenty-six PYQs, all but three of them multiple choice. Five only need the total probability of an outcome; sixteen then reverse it with Bayes' theorem; five infer an unknown bag or a lost card from what was drawn. Three ideas cover the page.

Concept 1 of 3: Total probability

When an outcome can happen through several mutually exclusive routes — which bag, which machine, which ball was transferred — add the route probabilities: P(E)=∑P(Hi) P(E∣Hi)P(E)=\sum P(H_i)\,P(E\mid H_i). A transfer between bags is a two-stage experiment: the transferred ball is the route.

Definition

  • P(E)=∑iP(Hi) P(E∣Hi)P(E)=\sum_iP(H_i)\,P(E\mid H_i), with HiH_i mutually exclusive and covering all cases.
  • A tree: multiply along a branch, add across branches.
  • Transfer from bag 1 to bag 2, then draw: the routes are the colours transferred.

Total probability

P(E)=∑iP(Hi) P(E∣Hi)P(E)=\sum_{i}P(H_i)\,P(E\mid H_i)

Worked example

Bag I has 2 red and 3 blue balls, bag II has 4 red and 1 blue. A bag is chosen at random and a ball drawn. Find P(red)P(\text{red}).
Practice this conceptself-check · 4 quick reps

The same idea in a real exam question:

JEE Mains · 2026 · 23 Jan 2026 Shift 2 · Q61Moderate

Example 1 · Probability · Total Probability and Bayes' Theorem

Bag A contains 9 white and 8 black balls, while bag B contains 6 white and 4 black balls. One ball is randomly picked up from the bag B and mixed up with the balls in the bag A . Then a ball is randomly drawn from the bag A . If the probability, that the ball drawn is white, is pq,gcd(p,q)=1\frac{p}{q},gcd(p,q) = 1, then p+qp + q is equal to

The receiving bag has one more ball

After a transfer, the second bag holds one extra ball. Using its original total in the denominator is the usual mistake.

Concept 2 of 3: Bayes' theorem

Given that the outcome happened, the chance it came through route HkH_k is that route's share of the total: P(Hk∣E)=P(Hk)P(E∣Hk)∑iP(Hi)P(E∣Hi)P(H_k\mid E)=\frac{P(H_k)P(E\mid H_k)}{\sum_iP(H_i)P(E\mid H_i)}. Compute every route product once; the answer is one product divided by their sum. With equal priors, the priors cancel.

Definition

  • P(Hk∣E)=P(Hk) P(E∣Hk)∑iP(Hi) P(E∣Hi)P(H_k\mid E)=\frac{P(H_k)\,P(E\mid H_k)}{\sum_iP(H_i)\,P(E\mid H_i)}.
  • Equal priors: P(Hk∣E)=P(E∣Hk)∑P(E∣Hi)P(H_k\mid E)=\frac{P(E\mid H_k)}{\sum P(E\mid H_i)}.
  • Percentages: work with the products directly, e.g. 0.5×0.020.5\times0.02.

Bayes' theorem

P(Hk∣E)=P(Hk) P(E∣Hk)∑iP(Hi) P(E∣Hi)P(H_k\mid E)=\frac{P(H_k)\,P(E\mid H_k)}{\sum_iP(H_i)\,P(E\mid H_i)}

Worked example

Machines A and B make 70% and 30% of the items; 2% of A's and 5% of B's are faulty. A faulty item is found. Find the probability it came from B.
Practice this conceptself-check · 4 quick reps

The same idea in a real exam question:

JEE Mains · 2023 · 8 Apr 2023 · Q68Moderate

Example 2 · Probability · Total Probability and Bayes' Theorem

In a bolt factory, machines A,BA,B and CC manufacture respectively 20%,30%20\%,30\% and 50%50\% of the total bolts. Of their output 3, 4 and 2 percent are respectively defective bolts. A bolt is drawn at random from the product. If the bolt drawn is found the defective, then the probability that it is manufactured by the machine CC is

Priors are not always equal

When bags or machines are chosen with different chances, keep P(Hi)P(H_i) in every product. Dropping them is only allowed when they are equal.

Concept 3 of 3: Inferring an unknown bag or a lost card

When the number of black balls in a bag is unknown, each possible number is a route, usually taken as equally likely. The draw's probability under each route is a ratio of combinations, and Bayes' theorem weights the routes by those ratios. A lost card works the same way: the routes are 'the lost card was a spade' and 'was not'.

Definition

  • Routes: every possible composition, equally likely unless stated.
  • Likelihood of drawing rr of a kind from kk of that kind among nn: (kr)(nr)\frac{\binom kr}{\binom nr}.
  • Common denominators cancel, so work with (kr)\binom kr as weights.
  • Lost card: priors 14\frac14 (spade) and 34\frac34 (not).

Weights for an unknown bag

P(k∣draw)=(kr)∑j(jr)(equal priors)P(k\mid\text{draw})=\frac{\binom kr}{\sum_j\binom jr}\quad(\text{equal priors})

Worked example

A bag has 4 balls, each black or white, all compositions equally likely. One ball is drawn and it is black. Find the probability that all 4 are black.
Practice this conceptself-check · 4 quick reps

The same idea in a real exam question:

JEE Mains · 2023 · 31 January 2023 · Q67Moderate

Example 3 · Probability · Total Probability and Bayes' Theorem

A bag contains 6 balls. Two balls are drawn from it at random and both are found to be black. The probability that the bag contains at least 5 black balls is

Include the impossible compositions

Compositions that could not produce the draw have weight 0 but still count when setting equal priors. The denominator sums over all of them; the zeros simply add nothing.

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 (3)

  • Total probability

    Total probability

    P(E)=∑iP(Hi) P(E∣Hi)P(E)=\sum_{i}P(H_i)\,P(E\mid H_i)
  • Bayes' theorem

    Bayes' theorem

    P(Hk∣E)=P(Hk) P(E∣Hk)∑iP(Hi) P(E∣Hi)P(H_k\mid E)=\frac{P(H_k)\,P(E\mid H_k)}{\sum_iP(H_i)\,P(E\mid H_i)}
  • Inferring an unknown bag or a lost card

    Weights for an unknown bag

    P(k∣draw)=(kr)∑j(jr)(equal priors)P(k\mid\text{draw})=\frac{\binom kr}{\sum_j\binom jr}\quad(\text{equal priors})

Watch out for (3)

Test yourself on Probability

20 past JEE Mains questions from this chapter, timed at 48 minutes and marked the way the exam marks it. You see your score and every answer the moment you finish. Free to start.