A Bayes question always has the same skeleton. Something happened in two stages. The first stage is hidden (which urn, which machine, which coin, whether the person has the condition), and the second stage is what you observed. You are asked how likely each hidden cause was, now that you have seen the result. Students who learn Bayes' theorem as a formula tend to put numbers into the wrong slots; students who learn it as "total probability tells me how often the result happens, and Bayes tells me which cause owns each share of it" rarely do.
The chapter guide to conditional probability, Bayes and independent events introduces total probability and Bayes with machines, urns and a screening example. This post goes deeper into the Bayes half: how to set up the partition, three equivalent methods (formula, tree, table of counts), the odds form that makes repeated evidence easy, and the problem families that go beyond a single urn. Its sibling on conditional probability and independence deals with the other half. For the overview see Statistics and Probability for JEE. Twelve worked examples follow, each checked by exact arithmetic before it was written down, then the traps, a recap and a practice plan.
What this post covers
All of it is in the JEE Main Mathematics syllabus (syllabus page). The areas:
| Area | The skill |
|---|---|
| Partitions | Mutually exclusive, exhaustive causes; spotting hidden ones |
| Total probability | The probability of an observed result across all causes |
| Bayes' theorem | Posterior probability of a cause given the result |
| Three methods | Formula, tree diagram, table of counts |
| Odds form | Prior odds times likelihood ratio |
| Repeated evidence | Updating after a second observation |
| Modelling traps | Behaviour of the person revealing information |
Partitions, total probability and Bayes' theorem
Events $E_1,E_2,\dots,E_n$ form a partition of the sample space if exactly one of them must occur: they are mutually exclusive and their probabilities add to $1$. The hidden stage of a problem is a partition: which of three machines made the item, which of two urns was chosen, whether a coin is fair or two-headed.
Total probability. For any event $A$, $$P(A)=\sum_{i=1}^{n}P(E_i)\,P(A\mid E_i).$$ Each term is "this cause occurred, and then $A$ happened". The sum covers every way $A$ can arise.
Bayes' theorem. The probability that cause $E_k$ was responsible, given that $A$ occurred, is $$P(E_k\mid A)=\frac{P(E_k)\,P(A\mid E_k)}{\sum_{i}P(E_i)\,P(A\mid E_i)}.$$ The numerator is one branch's contribution to the total; the denominator is the total. The posterior probabilities over the whole partition add to $1$, which is a free check on your arithmetic.
Prior, likelihood and posterior. $P(E_k)$ is the prior, what you believed before seeing the result. $P(A\mid E_k)$ is the likelihood, how well cause $E_k$ explains the result. $P(E_k\mid A)$ is the posterior. A cause with a small prior can still have a large posterior if its likelihood is very large, and the reverse is common in screening problems.
Also read: Prism, Dispersion and Total Internal Reflection for JEE
Three equivalent methods
Method 1: the formula. Write the priors, write the likelihoods, add the products for the denominator, divide. This is fast when there are two or three causes.
Method 2: the tree diagram. Draw the first stage as branches with their priors and the second stage as branches off each with the likelihoods. The probability of a path is the product along it. The paths that end in the observed result are the ones you keep; the posterior of a cause is its path divided by the sum of all kept paths. A tree makes the structure visible when the second stage depends on the first in a complicated way (for example, a transfer of balls between urns).
Method 3: a table of counts. Imagine a large number of repetitions, say $10{,}000$, and write how many land in each cell. For a condition with prevalence $2\%$, a test that is positive for $90\%$ of those who have it and for $4\%$ of those who do not:
| Test positive | Test negative | Total | |
|---|---|---|---|
| Has the condition | 180 | 20 | 200 |
| Does not | 392 | 9,408 | 9,800 |
| Total | 572 | 9,428 | 10,000 |
Among the $572$ positives, $180$ have the condition, so the posterior is $\dfrac{180}{572}=\dfrac{45}{143}\approx0.31$. No formula is used, and it shows why the result is lower than the $90\%$ many students expect: the group without the condition is so large that its small false-positive rate gives more positives than the true positives.
The table method is the most reliable under pressure. It also makes the "rare cause, imperfect test" pattern transparent.
The odds form of Bayes
If you care about a single cause $H$ against its complement, work with odds. Prior odds are $\dfrac{P(H)}{P(H')}$. The likelihood ratio is $\dfrac{P(A\mid H)}{P(A\mid H')}$. Then
$$\text{posterior odds}=\text{prior odds}\times\text{likelihood ratio}.$$
Convert back by $p=\dfrac{\text{odds}}{1+\text{odds}}$. The advantage is repeated evidence: each independent observation multiplies the odds by its own likelihood ratio, so two positive tests with ratio $r$ each multiply by $r^2$. This matters when a problem has a second test or a second draw and you would otherwise redo the whole calculation.
Question patterns that keep appearing
- Two-stage urns: one urn is chosen, a ball is drawn, and you ask about the urn.
- Transfer problems: balls move from one urn to another before the draw (a tree helps).
- Production and defects: several sources, different defect rates, a defective item found.
- Screening: rare condition, imperfect test, a positive result; sometimes a second test.
- Coins: a fair coin and a biased or two-headed coin; heads observed once or repeatedly.
- Dice choosing the next stage: the number rolled decides how many coins or which urn.
- Unknown composition: a bag of $n$ balls whose number of one colour is equally likely to be $0,1,\dots,n$.
- The three-door and three-box puzzles, where the modelling of how information is revealed decides the answer.
- Statement-style questions that give several derived probabilities and ask which are correct.
Hidden partitions and how information is revealed
Two points separate easy Bayes questions from hard ones.
The hidden partition may not be obvious. In "a die is thrown and then a coin is tossed as many times as the die shows", the partition is the six faces of the die. In "a bag contains $4$ balls, each equally likely to be white or black in any combination", the partition is the number of white balls, $0$ to $4$, each with prior $\tfrac15$, and a different model (each ball independently white with probability $\tfrac12$) would give different priors. The wording tells you which model is intended; read it twice.
The behaviour of whoever reveals information is part of the model. In the three-door puzzle the host knows where the prize is, always opens a door that hides no prize and was not picked, and chooses at random when two such doors exist. Each of those facts affects the likelihoods. If the host opened a door at random and it happened to show no prize, the likelihoods and the answer would change. A Bayes problem is only well posed once the way the observation was generated is stated, and an exam question will state it.
Worked examples
Example 1 (easy, single correct)
One of two coins is chosen at random: coin $A$ is fair, coin $B$ has heads on both sides. The chosen coin is tossed once and shows heads. The probability that it is coin $B$ is
(A) $\dfrac12$ (B) $\dfrac23$ (C) $\dfrac34$ (D) $\dfrac13$
Solution. The branches ending in heads: coin $A$ and heads, $\tfrac12\cdot\tfrac12=\tfrac14$; coin $B$ and heads, $\tfrac12\cdot1=\tfrac12$. The total is $\tfrac34$, so $P(B\mid H)=\dfrac{1/2}{3/4}=\dfrac23$.
Answer: (B). Option (A) is the prior, unchanged by the evidence.
Example 2 (easy, numerical value)
In the setting of Example 1 the same chosen coin is tossed twice and shows heads both times. If $p$ is the probability that it is coin $B$, find $5p$.
Solution. Coin $A$ gives two heads with probability $\tfrac14$, so its branch is $\tfrac12\cdot\tfrac14=\tfrac18$. Coin $B$ gives two heads with probability $1$, so its branch is $\tfrac12$. The total is $\tfrac58$ and $p=\dfrac{1/2}{5/8}=\dfrac45$. So $5p=4$.
Answer: 4. The posterior rose from $\tfrac23$ to $\tfrac45$ with the second head: more evidence for the biased coin. The odds form gives the same result: prior odds $1$, likelihood ratio $2$ per head, so after two heads the odds are $4$ and $p=\tfrac45$.
Example 3 (medium, single correct)
There are three boxes. Box I has two gold coins, box II has one gold and one silver coin, and box III has two silver coins. A box is chosen at random, a coin is drawn at random from it, and it is gold. The probability that the other coin in the same box is also gold is
(A) $\dfrac12$ (B) $\dfrac13$ (C) $\dfrac23$ (D) $\dfrac34$
Solution. The other coin is gold exactly when the box is I. The branches giving a gold coin: box I, $\tfrac13\cdot1=\tfrac13$; box II, $\tfrac13\cdot\tfrac12=\tfrac16$; box III, $0$. The total is $\tfrac12$ and $P(\text{box I}\mid\text{gold})=\dfrac{1/3}{1/2}=\dfrac23$.
Answer: (C). The tempting answer $\tfrac12$ treats the remaining coin as equally likely gold or silver after discarding box III, forgetting that box I offers two gold coins to be drawn while box II offers one.
Example 4 (medium, numerical value)
A bag contains $4$ balls, each of which is white or black, and the number of white balls is equally likely to be $0,1,2,3$ or $4$. Two balls are drawn together and both are white. If $p$ is the probability that all four balls are white, find $5p$.
Solution. Given $k$ white balls, the probability that two drawn together are both white is $\dfrac{\binom k2}{\binom42}=\dfrac{\binom k2}{6}$. The values for $k=0,1,2,3,4$ are $0,0,\tfrac16,\tfrac36,\tfrac66$. Each prior is $\tfrac15$, so the common factor cancels in Bayes. The sum of likelihoods is $\tfrac{0+0+1+3+6}{6}=\tfrac{10}6$, and the contribution of $k=4$ is $\tfrac66$. Then $p=\dfrac{6}{10}=\dfrac35$ and $5p=3$.
Answer: 3. The posteriors for $k=2,3,4$ are $\tfrac1{10},\tfrac3{10},\tfrac6{10}$, which add to $1$, a useful check.
Example 5 (medium, numerical value)
A fair die is thrown. If it shows $k$, a fair coin is tossed $k$ times. Find $16P(\text{exactly one head})$.
Solution. Given $k$ tosses, the probability of exactly one head is $\dfrac{k}{2^k}$. Then $$P(\text{exactly one head})=\frac16\sum_{k=1}^{6}\frac{k}{2^k}=\frac16\left(\frac12+\frac24+\frac38+\frac4{16}+\frac5{32}+\frac6{64}\right)=\frac16\cdot\frac{120}{64}=\frac5{16}.$$ (The six terms sum to $\tfrac{32+32+24+16+10+6}{64}=\tfrac{120}{64}=\tfrac{15}{8}$.) So $16P=5$.
Answer: 5. The sum was checked by exact fractions and it gives $\tfrac{15}8$.
Example 6 (medium, single correct)
In Example 5, given that exactly one head appeared, the probability that the die showed $3$ is
(A) $\dfrac15$ (B) $\dfrac16$ (C) $\dfrac38$ (D) $\dfrac3{16}$
Solution. The branch for the die showing $3$ is $\tfrac16\cdot\dfrac38$. The total is $\tfrac5{16}$. Then $P(k=3\mid\text{one head})=\dfrac{\tfrac16\cdot\tfrac38}{\tfrac5{16}}=\dfrac{1/16}{5/16}=\dfrac15$.
Answer: (A). Option (B) is the prior $\tfrac16$, and option (C) is the likelihood $P(\text{one head}\mid k=3)$ alone, which is a different quantity from the posterior.
Example 7 (medium, numerical value)
In a factory, $4\%$ of items are defective. An inspector passes a defective item with probability $0.10$ and passes a good item with probability $0.95$. If $p$ is the probability that an item that was passed is defective, find $229p$.
Solution. Branches that end in "passed": defective and passed, $0.04\times0.10=0.004$; good and passed, $0.96\times0.95=0.912$. The total is $0.916$, so $p=\dfrac{0.004}{0.916}=\dfrac{1}{229}$ and $229p=1$.
Answer: 1. Inspection reduced the defective rate among passed items from $4\%$ to about $0.44\%$.
Example 8 (medium, numerical value)
A condition affects $10\%$ of a group. A test is positive for $80\%$ of those who have it and for $10\%$ of those who do not. Use the odds form to find the probability that a person with a positive test has the condition, as $\dfrac mn$ in lowest terms, and give $n$.
Solution. Prior odds are $\tfrac{0.1}{0.9}=\tfrac19$. The likelihood ratio is $\tfrac{0.8}{0.1}=8$. Posterior odds are $\tfrac89$, so the probability is $\dfrac{8}{8+9}=\dfrac8{17}$. The denominator is $17$. A direct check: $0.1\times0.8=0.08$ and $0.9\times0.1=0.09$, and $\tfrac{0.08}{0.17}=\tfrac8{17}$.
Answer: 17. The odds form turned a three-line fraction calculation into a single multiplication.
Example 9 (hard, numerical value)
A condition affects $2\%$ of a population. A test is positive for $90\%$ of those who have it and for $4\%$ of those who do not. A person is tested twice with the same kind of test, and the two results are independent given the person's true state. Both results are positive. Find the probability that the person has the condition, correct to two decimal places.
Solution. Prior odds are $\tfrac{0.02}{0.98}=\tfrac1{49}$. Each positive test has likelihood ratio $\tfrac{0.90}{0.04}=22.5$, and two positives multiply the odds by $22.5^2=506.25$. The posterior odds are $\tfrac{506.25}{49}\approx10.332$, so $p=\dfrac{10.332}{11.332}\approx0.912$. In exact terms the value is $\dfrac{2025}{2221}$. To two decimal places, $0.91$.
Answer: 0.91. After one positive test the posterior is only $\tfrac{45}{143}\approx0.31$; the second test lifts it past $0.9$. The calculation assumes the two tests are independent given the true state, which a question must state.
Example 10 (hard, single correct)
In a game show there are three doors, with a prize behind exactly one. You choose door $1$. The host, who knows where the prize is, opens a door that you did not choose and that has no prize, choosing at random if there are two such doors. He opens door $3$. The probability that the prize is behind door $2$ is
(A) $\dfrac12$ (B) $\dfrac13$ (C) $\dfrac23$ (D) $\dfrac34$
Solution. Let $P_i$ be "prize behind door $i$", each with prior $\tfrac13$. The likelihood of "host opens door $3$": if $P_1$, the host may open door $2$ or $3$ and picks door $3$ with probability $\tfrac12$; if $P_2$, door $3$ is the only legal choice, so probability $1$; if $P_3$, the host never opens door $3$, so $0$. The branches are $\tfrac13\cdot\tfrac12=\tfrac16$, $\tfrac13\cdot1=\tfrac13$ and $0$. The total is $\tfrac12$. So $P(P_2\mid\text{door 3 opened})=\dfrac{1/3}{1/2}=\dfrac23$ and $P(P_1\mid\cdot)=\dfrac13$.
Answer: (C). Switching doubles the chance of winning. The answer depends on the host's rule, as noted earlier.
Example 11 (hard, multiple correct, Advanced style)
Three suppliers $S_1,S_2,S_3$ provide $25\%$, $35\%$ and $40\%$ of the items, and $5\%$, $4\%$ and $2\%$ of their items respectively are defective. An item is chosen at random. Which statements are correct?
(A) The probability that the item is defective is $0.0345$. (B) Given that the item is defective, it is most likely from $S_2$. (C) Given that the item is defective, the probability that it came from $S_3$ is $\tfrac{16}{69}$. (D) Given that the item is defective, the probability that it came from $S_1$ is $0.25$.
Solution. The branches are $0.25\times0.05=0.0125$, $0.35\times0.04=0.014$ and $0.40\times0.02=0.008$. Their sum is $0.0345$, so (A) holds. The posteriors are $\tfrac{0.0125}{0.0345}=\tfrac{25}{69}$, $\tfrac{0.014}{0.0345}=\tfrac{28}{69}$ and $\tfrac{0.008}{0.0345}=\tfrac{16}{69}$. The largest is $\tfrac{28}{69}$, from $S_2$, so (B) holds. (C) is the third posterior, so it holds. For (D) the posterior is $\tfrac{25}{69}\approx0.362$, not $0.25$: the prior $0.25$ has been confused with the posterior, so (D) fails.
Answer: (A), (B), (C). The posteriors $25+28+16=69$ over $69$ confirm the total.
Example 12 (hard, numerical value)
Urn I contains $4$ red and $2$ black balls, and urn II contains $3$ red and $3$ black balls. Two balls are drawn together from urn I and placed in urn II, and then one ball is drawn from urn II. It is red. If $q$ is the probability that both transferred balls were red, find $13q$.
Solution. Let $r$ be the number of red balls moved, with $P(r)=\dfrac{\binom4r\binom2{2-r}}{\binom62}$, giving $P(0)=\tfrac1{15}$, $P(1)=\tfrac8{15}$, $P(2)=\tfrac6{15}$. Urn II then holds $8$ balls with $3+r$ red, so the probability of drawing red is $\tfrac{3+r}{8}$: $\tfrac38$, $\tfrac48$, $\tfrac58$. The branches are $\tfrac1{15}\cdot\tfrac38=\tfrac{3}{120}$, $\tfrac8{15}\cdot\tfrac48=\tfrac{32}{120}$ and $\tfrac6{15}\cdot\tfrac58=\tfrac{30}{120}$. The total is $\tfrac{65}{120}=\tfrac{13}{24}$. Then $q=\dfrac{30/120}{65/120}=\dfrac{6}{13}$, so $13q=6$.
Answer: 6. Without the red draw the probability that both moved balls were red would be $\tfrac{6}{15}=0.4$; the observation raises it to $\tfrac6{13}\approx0.46$.
Common traps
- Mixing the posterior with the likelihood. $P(\text{one head}\mid k=3)$ is not $P(k=3\mid\text{one head})$. Likelihoods describe the second stage given the cause; posteriors go the other way.
- Forgetting the denominator. A Bayes answer is a ratio. Taking only one branch gives a joint probability, which is smaller than the posterior.
- Using priors that do not sum to $1$. If three machines make $50\%$, $30\%$ and $20\%$, those are the priors. A partition's probabilities must add to $1$.
- Ignoring a hidden stage. In transfer problems the number of red balls moved is itself random, and the later draw depends on it. Skipping that stage understates the problem.
- Treating the base rate as irrelevant. For a rare condition the number of false positives from the large healthy group can outnumber the true positives. Always include the prior.
- Assuming the evidence is independent without checking. Two tests are multiplied only when they are independent given the true state. A question that does not say so is not asking for the product.
- Dropping the host's rule. In door and box puzzles, the answer depends on how the information was generated. Write the likelihood of the observation under each hypothesis from the stated rule.
- Wrong sample space for unknown composition. "Each ball independently white or black" and "number of white balls equally likely $0$ to $4$" are different models with different priors. Use the one the question states.
- Adding posteriors across non-exclusive causes. The partition must be exclusive and exhaustive. If two causes can both occur, you need a different decomposition.
- Over-rounding. The posterior in Example 9 is $\tfrac{2025}{2221}\approx0.912$. Rounding the likelihood ratio or the prior early can shift the second decimal in a numerical-value answer. Keep fractions until the end.
- Sign of the effect. After a positive result, the posterior of the cause with the higher likelihood rises relative to its prior, and the other falls. If your posterior moved the wrong way, a likelihood is probably swapped.
A one-page recap
| Item | Result |
|---|---|
| Partition | exclusive, exhaustive causes $E_1,\dots,E_n$ |
| Total probability | $P(A)=\sum P(E_i)P(A\mid E_i)$ |
| Bayes | $P(E_k\mid A)=\dfrac{P(E_k)P(A\mid E_k)}{\sum P(E_i)P(A\mid E_i)}$ |
| Check | posteriors over the partition add to $1$ |
| Odds form | posterior odds $=$ prior odds $\times$ likelihood ratio |
| Two independent pieces of evidence | multiply the likelihood ratios |
| Table of counts | imagine $10{,}000$ cases and read the cells |
| Rare cause | many false positives can outnumber true positives |
| Puzzle problems | write the likelihood from the stated rule of revelation |
Also read: Prism, Dispersion, Total Internal Reflection in Telugu: JEE
How to practise this chapter
Use the three Probability chapter tests in order: Chapter Test 1, Chapter Test 2 and Chapter Test 3, each with 15 questions in 36 minutes. For every Bayes-type miss, redo it by the table-of-counts method; if the table method also gives the wrong answer, the problem is in the reading, not the algebra. The random variables Topic Drill (20 questions, 48 minutes) follows naturally, since expected values use the same total-probability idea. Read the book chapter next to the tests: English, Hindi and Telugu.
A seven-day plan, our suggestion:
| Day | Work |
|---|---|
| 1 | Partitions and total probability; Examples 5 and 7; write the partition for ten problems without solving them |
| 2 | Bayes by formula, then by tree; Examples 1, 3 and 6 |
| 3 | Table-of-counts method; redo Examples 7 and 9 as tables |
| 4 | Odds form and repeated evidence; Examples 2, 8 and 9 |
| 5 | Unknown composition and transfer problems; Examples 4 and 12 |
| 6 | Puzzle and statement-style problems; Examples 10 and 11; Chapter Tests 1 and 2 timed |
| 7 | Chapter Test 3 and the random variables drill; rewrite the recap from memory |
For mixed practice, JEE Main Mathematics Practice Test 1 combines this chapter with others and JEE Main Mock 1 adds timing. The mock, practice and chapter tests are part of the Pro Pass; the free 10-question JEE Main mini mock needs no sign-up. For planning see JEE Main Mathematics preparation strategy and recognising patterns in JEE Mathematics; for the next topic see binomial distribution and random variables.
Frequently asked questions
When do I use total probability and when Bayes' theorem?
Use total probability when the question asks for the probability of an observed result across several possible causes. Use Bayes' theorem when the result is given and the question asks about the cause. In many problems you do both: the denominator of Bayes is the total-probability calculation.
Why does a very accurate test still give a modest posterior for a rare condition?
The posterior depends on both the test and the base rate. If the condition is rare, the large healthy group produces many false positives even at a low false-positive rate, so a positive result is more often a false alarm than a true detection. Example 9 shows how a second independent result changes this.
Is a tree diagram or the formula faster?
For two or three causes with direct likelihoods, the formula is faster. For multi-stage problems, such as transfers between urns, a tree keeps the stages straight and prevents a missing branch.
What does the odds form add?
It makes repeated evidence easy: each independent observation multiplies the odds by its likelihood ratio, so there is no need to restart the calculation after a second test or a second toss. It also makes it clear how strongly an observation favours one cause over another.
How do I know the priors in a problem?
They are the probabilities of the causes before the observation: the shares of production for machines, the probability of choosing each urn, the prevalence of a condition. A question that says "chosen at random" among $n$ options gives equal priors $\tfrac1n$.
Do two observations always multiply together?
Only if they are independent given the cause, which is a modelling assumption. A question that wants the product will say that the results are independent for a given state, as in Example 9. If it does not say so, work from the information provided.
Can a posterior probability be smaller than the prior?
Yes. If the observation is less likely under a cause than under the others, the posterior of that cause falls. In Example 7 the posterior of "defective" fell from $4\%$ to under $0.5\%$ after the item was passed.

Comments (0)
No comments yet. Be the first to share your thoughts.