Quantitative Aptitude · Probability
Bayes' Theorem for CA Foundation Quantitative Aptitude
Updated 1 October 2026 · Fact-checked
Bayes' theorem gives the probability of a cause after you see its effect. Split the sample space into causes, multiply each prior by its likelihood, add these products to get the total probability of the effect, then divide the product for your cause by that total.
Understand Bayes' Theorem
Many probability questions run backwards. You know how likely each cause is, and how likely the result is under each cause. But you see the result and must ask which cause produced it. Bayes' theorem handles this.
Start with prior probabilities. These are P(A₁), P(A₂), ... for causes (for example, machines or urns) before you see any result. The causes must be mutually exclusive and exhaustive: exactly one of them happens, so their priors add up to 1.
Next come likelihoods. P(B | Aᵢ) is the chance of the observed event B if cause Aᵢ is true. The total probability theorem adds up all the routes to B: P(B) = ΣP(Aᵢ) × P(B | Aᵢ). This answers 'what is the chance of B overall?'
Bayes' theorem answers the reverse question: 'given B happened, what is the chance it came through Aᵢ?' This is the posterior probability. It is the share of the total probability of B that travels through Aᵢ. The prior is revised in the light of new information.
So the difference is simple. Total probability goes from causes to effect and gives P(B). Bayes goes from effect to cause and gives P(Aᵢ | B). The denominator of Bayes is the total probability.
Key formulas to remember
- Conditional probability
- P(A | B) = P(A ∩ B) ÷ P(B)
- Valid when P(B) > 0.
- Multiplication rule
- P(A ∩ B) = P(A) × P(B | A)
- This gives each branch of a probability tree.
- Total probability theorem
- P(B) = P(A₁)P(B | A₁) + P(A₂)P(B | A₂) + ... + P(Aₙ)P(B | Aₙ)
- A₁ to Aₙ must be mutually exclusive and exhaustive.
- Bayes' theorem
- P(Aᵢ | B) = P(Aᵢ)P(B | Aᵢ) ÷ [P(A₁)P(B | A₁) + ... + P(Aₙ)P(B | Aₙ)]
- The denominator is P(B) from the total probability theorem. It needs P(B) > 0.
- Sum of posteriors
- P(A₁ | B) + P(A₂ | B) + ... + P(Aₙ | B) = 1
- Use this as a quick check on your answers.
How to solve Bayes' Theorem questions
Use this same method for every Bayes question, whether it is about machines, urns, bags or tests.
- 1Identify the causes. These are the groups or stages that happen first. Name them A₁, A₂, and so on, and check that their probabilities add to 1.
- 2Identify the observed event B. This is what you are told has happened, such as 'the item is defective'.
- 3Write each prior P(Aᵢ) and each likelihood P(B | Aᵢ) from the data. Convert percentages to decimals or fractions.
- 4Multiply prior by likelihood for every cause. These are the branch values P(Aᵢ ∩ B).
- 5Add all branch values. This sum is P(B), the total probability.
- 6If the question asks for P(B), stop here. If it asks 'given B, probability of cause Aᵢ', divide the branch value of Aᵢ by P(B).
- 7Check that the answer is between 0 and 1, and that all posteriors would add to 1.
Quickest way: Branch-product table with option elimination
When to use it: Use this for any three-cause or two-cause question where the data is given in percentages or simple fractions.
- Write the causes in one row and put the prior × likelihood product under each. Use whole numbers by scaling, for example 50 × 2 = 100 instead of 0.5 × 0.02.
- Add the products. The total is your denominator.
- The answer is your cause's product over the total. Leave it as a fraction and compare with the options.
- Eliminate quickly. A posterior cannot exceed 1, and it must be at least as large as the cause's share of the total.
- If the question gives many decimals and the options are close, cross-multiply to confirm. If it will take over two minutes, skip it, since a wrong answer costs 0.25.
Common mistakes in Bayes' Theorem
Giving P(B | A) when the question asks for P(A | B)
The wording 'given that' is easy to misread, so the direction of the condition gets reversed.
Fix: Mark the event after 'given' as the one you already know happened. If that is the result, you need Bayes' theorem and a division by P(B).
Forgetting the denominator and giving only prior × likelihood
Students stop after the first product because it looks like a finished probability.
Fix: Always compute the sum of all branch products. The posterior is one branch divided by that sum.
Using priors that do not add to 1
The causes are not exhaustive, or a percentage was misread, for example 50%, 30%, 10%.
Fix: Add the priors before starting. If they do not total 1, re-read the question or find the missing cause.
Treating likelihoods as if they must add to 1
Students confuse P(B | Aᵢ) across causes with P(B | A) and P(Bᶜ | A).
Fix: Only the priors, and the posteriors, add to 1 across causes. Likelihoods for different causes need not add to 1.
Assuming a very accurate test means a high posterior
Students ignore the small prior of a rare condition.
Fix: Compute the full table. When the prior is small, false positives from the large healthy group can outnumber true positives.
Dividing by the wrong total, such as only the defective items of two machines
One cause is left out of the denominator.
Fix: The denominator must include every cause, including the one you are asked about.
Worked examples
Example 1
Machines A, B and C produce 50%, 30% and 20% of the items in a factory. Their defect rates are 2%, 3% and 5% respectively. An item is picked at random and found defective. What is the probability that it was made by A? Options: (a) 9/29 (b) 10/29 (c) 1/2 (d) 19/29
Show the solution
- Priors: P(A) = 0.5, P(B) = 0.3, P(C) = 0.2. These add to 1.
- Branch products, with D as 'defective': A: 0.5 × 0.02 = 0.010. B: 0.3 × 0.03 = 0.009. C: 0.2 × 0.05 = 0.010.
- P(D) = 0.010 + 0.009 + 0.010 = 0.029.
- P(A | D) = 0.010 ÷ 0.029 = 10/29.
Answer: (b) 10/29
Example 2
Urn I has 3 red and 2 black balls. Urn II has 2 red and 4 black balls. One urn is chosen at random and a ball is drawn from it. What is the probability that the ball is red? Options: (a) 1/2 (b) 7/15 (c) 8/15 (d) 2/5
Show the solution
- Each urn is chosen with probability 1/2.
- P(red | Urn I) = 3/5 and P(red | Urn II) = 2/6 = 1/3.
- P(red) = (1/2)(3/5) + (1/2)(1/3) = 3/10 + 1/6.
- Common denominator 30: 9/30 + 5/30 = 14/30 = 7/15.
Answer: (b) 7/15
Example 3
1% of a population has a disease. A test is positive for 95% of people who have the disease and also positive for 5% of people who do not. A person tests positive. What is the probability that the person has the disease? Options: (a) 19/20 (b) 1/2 (c) 19/118 (d) 1/20
Show the solution
- Causes: Disease with prior 0.01, No disease with prior 0.99.
- Likelihoods of a positive test: 0.95 and 0.05.
- Branch products: Disease: 0.01 × 0.95 = 0.0095. No disease: 0.99 × 0.05 = 0.0495.
- P(positive) = 0.0095 + 0.0495 = 0.0590.
- P(Disease | positive) = 0.0095 ÷ 0.0590 = 95/590 = 19/118, about 0.16.
Answer: (c) 19/118
Exam tips
- Look for the phrase 'given that' or 'found to be'. It tells you the question wants a posterior probability, not a simple probability.
- Scale percentages to whole numbers before multiplying. This reduces decimal slips and makes fractions easier to compare with the options.
- If the question asks for the overall chance of an outcome, it is only total probability. Do not divide again.
- In a multi-part question set, the denominator from the first part is often reused in the second. Keep it handy.
- Because of negative marking, skip a question with four or more causes and messy decimals until you have finished the easier ones.
Practice questions from Probability
- In a financial institution, the probability that a loan application is approved by the manager is 0.7. If the application is approved by the…
- Ravi estimates that a venture will give a profit of Rs 50,000 with probability 0.3, a profit of Rs 20,000 with probability 0.5, and a loss o…
- A box holds 5 red and 4 white balls. Three balls are drawn at random one after another without replacement. What is the probability that exa…
- A manufacturing plant in Delhi produces widgets with a defect rate of 2%. Three widgets are selected at random and inspected. What is the pr…
- In a city, the probability that a randomly selected household has internet is 0.6 and that it has a television is 0.8. If these events are i…
Bayes' Theorem: frequently asked questions
What is the difference between the total probability theorem and Bayes' theorem?
The total probability theorem finds the overall chance of an event B by adding the contribution of every cause. Bayes' theorem uses that total to find the chance that a particular cause produced B. Total probability gives P(B). Bayes gives P(Aᵢ | B).
When can I use Bayes' theorem?
Use it when the causes are mutually exclusive and exhaustive, the priors are known, and you know the likelihood of the observed event under each cause. The observed event must have a non-zero probability.
Do I need to draw a tree diagram for every question?
Not always. A table of prior × likelihood for each cause is faster and gives the same numbers. Use a tree only if the question has two or more stages and you feel unsure.
Can a posterior probability be smaller than the prior?
Yes. If the observed event is less likely under a cause than under the others, seeing it lowers that cause's probability. If it is more likely, the probability goes up.