Fundamentals of Business Mathematics and Statistics · Probability
Bayes' Theorem: Method and Solved Problems
Updated 10 October 2026 · Fact-checked
Bayes' theorem revises the probability of a cause after you see an effect. Find each cause's prior probability and its likelihood of the effect. Total probability gives P(B) = Σ P(Aᵢ) × P(B | Aᵢ). Then P(Aᵢ | B) = P(Aᵢ) × P(B | Aᵢ) ÷ P(B).
Understand Bayes' Theorem
Start with a simple idea. Before you see any evidence, you have a belief about how likely something is. This is the prior probability. For example, a factory has three machines, and you know what share of items each machine makes. The prior chance that a random item came from Machine 1 is just its share.
Now you get new information. You pick an item and find it is defective. Machine 1 may now look more or less likely than before. The revised probability is the posterior probability, written P(A | B): the chance of the cause A given that the effect B has happened.
To get there you need total probability. If the causes A₁, A₂, ..., Aₙ are mutually exclusive and together cover every possibility, then the effect B can happen through any one of them. Add up each route: P(B) = Σ P(Aᵢ) × P(B | Aᵢ). This is the overall chance of the effect.
Bayes' theorem then asks what fraction of that total came through one particular route. That fraction is P(Aᵢ) × P(B | Aᵢ) ÷ P(B). Think of it as: this route's share divided by the total of all routes.
A tree diagram helps. The first branches are the causes with prior probabilities. The second branches are the effect or no effect with conditional probabilities. Multiply along a path to get a joint probability. Add the paths that end in B to get P(B). Divide the path you want by that sum.
Key formulas to remember
- Conditional probability
- P(A | B) = P(A ∩ B) ÷ P(B)
- Valid when P(B) > 0. This is the base of Bayes' theorem.
- Multiplication rule
- P(A ∩ B) = P(A) × P(B | A)
- Gives the joint probability along a tree path.
- Total probability theorem
- P(B) = Σ P(Aᵢ) × P(B | Aᵢ)
- A₁ to Aₙ must be mutually exclusive and exhaustive, so their priors add up to 1.
- Bayes' theorem
- P(Aᵢ | B) = P(Aᵢ) × P(B | Aᵢ) ÷ Σ P(Aⱼ) × P(B | Aⱼ)
- Use when B has already happened and you need the probability of a cause Aᵢ. Needs P(B) > 0.
- Check on posteriors
- Σ P(Aᵢ | B) = 1
- The posterior probabilities of all causes must add up to 1. Use this to check your work.
How to solve Bayes' Theorem questions
Use this method for any Bayes' theorem question. It works for machines, factories, insurance, tests and similar problems.
- 1Identify the causes (A₁, A₂, ...) and the effect (B) that has been observed. The question usually says 'given that' or 'it is found that'.
- 2Write the prior probabilities P(Aᵢ) and check that they add up to 1.
- 3Write the likelihoods P(B | Aᵢ) for each cause. Read carefully: these are the chance of the effect given each cause.
- 4Multiply to get P(Aᵢ) × P(B | Aᵢ) for every cause.
- 5Add these products to get P(B), the total probability.
- 6Divide the product of the cause you want by P(B). This is the posterior P(Aᵢ | B).
- 7Check that it lies between 0 and 1 and that all posteriors would add up to 1.
Quickest way: Table of products and share
When to use it: Use this in the exam for any question with two or three causes and numbers given as percentages or simple fractions.
- Write the priors and likelihoods in a small list, one line per cause.
- Multiply each pair. Keep the products as whole numbers by using percentages or a common denominator.
- The answer is the wanted product divided by the sum of all products.
- You do not need to compute P(B) separately: it is the sum of the products.
- Match your answer with the options. Eliminate any option larger than 1 or any that goes the wrong way: a cause with a higher prior and higher likelihood must get a higher posterior.
Common mistakes in Bayes' Theorem
Using P(B | A) as the answer when the question asks for P(A | B).
The two look alike and the wording 'given that' is easy to misread.
Fix: Underline the event that has already happened. That event goes after the bar in the required probability.
Dividing by the prior probability or by the likelihood instead of by total P(B).
Students remember a fraction but not what goes in the denominator.
Fix: The denominator is always the sum of the products of prior and likelihood over all causes.
Leaving out one cause when computing P(B).
In a long question a machine or a group gets skipped.
Fix: Count the causes and check that the priors add up to 1 before you start.
Using the proportion of defective items as the prior.
Students mix up the share of production with the defect rate.
Fix: The share of production is the prior. The defect rate is the likelihood.
Applying Bayes' theorem to causes that overlap.
The formula is memorised without its condition.
Fix: Use it only when the causes are mutually exclusive and exhaustive.
Worked examples
Example 1
A factory has three machines. Machine A makes 50% of the items, Machine B makes 30% and Machine C makes 20%. The 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 Machine A?
Show the solution
- Priors: P(A) = 0.50, P(B) = 0.30, P(C) = 0.20. They add up to 1.
- Likelihoods of a defect: 0.02, 0.03, 0.05.
- Products: A: 0.50 × 0.02 = 0.010. B: 0.30 × 0.03 = 0.009. C: 0.20 × 0.05 = 0.010.
- Total probability of a defect: 0.010 + 0.009 + 0.010 = 0.029.
- P(A | defective) = 0.010 ÷ 0.029 = 10/29.
Answer: 10/29 (about 0.345)
Example 2
In a town, 1% of people have a certain disease. A test shows positive for 90% of people who have the disease and also for 10% of people who do not. A person tested is found positive. What is the probability that the person actually has the disease?
Show the solution
- Causes: D (has the disease) and not D. P(D) = 0.01 and P(not D) = 0.99.
- Likelihoods of a positive result: P(+ | D) = 0.90 and P(+ | not D) = 0.10.
- Products: 0.01 × 0.90 = 0.009 and 0.99 × 0.10 = 0.099.
- P(+) = 0.009 + 0.099 = 0.108.
- P(D | +) = 0.009 ÷ 0.108 = 9/108 = 1/12.
Answer: 1/12 (about 0.083)
Exam tips
- Read the last line first. If it says 'given that' or 'found to be', it is a Bayes question.
- Convert all data to percentages or whole numbers before multiplying. It avoids decimal errors.
- Keep the denominator ready: it is the sum of all products, so your work for total probability doubles as the denominator.
- Expect questions where the posterior is small even though the test is accurate. Do not guess from intuition. Calculate.
- With no negative marking, always mark an answer. Eliminate options above 1 and those that go against the direction of the data.
Practice questions from Probability
- A card is drawn at random from a well-shuffled pack of 52 cards. What is the probability that it is a king or a heart?
- In a bank branch in Jaipur, 70% of loan applicants are salaried and 30% are self-employed. The probability of default is 2% for salaried and…
- Box 1 holds 3 red and 2 black balls. Box 2 holds 1 red and 4 black balls. A box is chosen with probability 1/3 for Box 1 and 2/3 for Box 2. …
- A fair die is thrown once. Rohan receives Rs 10 times the number shown if the number is even, and pays Rs 6 if the number is odd. What is hi…
- In a batch of 60 invoices at a Pune firm, 25 have errors in the GST amount, 20 have errors in the date, and 10 have errors in both. If one i…
Bayes' Theorem in other exams
The same ground in other exams, if you are preparing for more than one or want another angle on it.
Bayes' Theorem: frequently asked questions
What is the difference between prior and posterior probability?
The prior probability is your estimate of a cause before new information. The posterior probability is the revised estimate after you learn that the effect has happened. Bayes' theorem converts one into the other.
When do I use total probability and when do I use Bayes' theorem?
Use total probability to find the chance of the effect, P(B), by adding all routes. Use Bayes' theorem when the effect has already happened and you need the chance of a particular cause. Bayes' theorem uses total probability in its denominator.
Do I need to draw a tree diagram in the exam?
No, the paper is objective and only the final option counts. A quick tree or a list of products helps you avoid errors. A list of prior times likelihood for each cause is usually faster.
Can the posterior probabilities be greater than 1?
No. Each posterior lies between 0 and 1, and the posteriors of all the causes add up to 1. If your answer is more than 1, the denominator is wrong, usually because a cause was left out.