Quick answer: If are mutually exclusive and exhaustive events (a partition) and A is any event, the law of total probability gives . Bayes' theorem then reverses the condition: . Use it when you know the result and want the probability of the cause.
This uses conditional probability and the multiplication theorem.
The two results
| Result | Formula | Answers |
|---|---|---|
| Total probability | "What is the overall chance of A?" | |
| Bayes' theorem | "Given A happened, which cause?" |
| Term | Meaning |
|---|---|
| Prior probability of each cause | |
| Likelihood of the result under each cause | |
| Posterior probability of the cause |
The posteriors add up to 1.
Method
Step 1: Identify the causes (they must form a partition) and the observed result A.
Step 2: Write the priors and likelihoods .
Step 3: Multiply each pair to get .
Step 4: Add them for , then divide the required product by .
A table keeps this organised:
| Cause | Prior | Likelihood | Product |
|---|---|---|---|
| Total | 1 |
Worked examples
Example 1: two bags
Bag I has 3 red and 2 black balls; Bag II has 2 red and 4 black. A bag is chosen at random and a ball drawn is red. Find the probability it came from Bag I.
Step 1: Priors each. Likelihoods: , .
Step 2: Products: and . Total .
Step 3: .
Example 2: three machines
Machines A, B, C make 50%, 30% and 20% of the items, with defect rates 1%, 2% and 3%. An item is defective. Find the probability it came from C.
| Machine | Prior | Defect rate | Product |
|---|---|---|---|
| A | 0.5 | 0.01 | 0.005 |
| B | 0.3 | 0.02 | 0.006 |
| C | 0.2 | 0.03 | 0.006 |
| Total | 0.017 |
.
Example 3: a medical test
A disease affects 1% of people. A test detects it 99% of the time and gives a false positive 5% of the time. A person tests positive. Find the probability they have the disease.
Step 1: Products: and .
Step 2: .
Step 3:
So even a positive result leaves only about a 17% chance, because the disease is rare.
Example 4: truth-telling
A speaks the truth 3 out of 4 times. A die is thrown and A reports a six. Find the probability that it really was a six.
Step 1: Six and truth: . Not six and lie: .
Step 2: .
(This assumes that when A lies, A reports a six; some versions spread the lie over the 5 other faces, which changes the answer.)
Summary table
| Idea | Key point |
|---|---|
| Partition | Causes must be mutually exclusive and exhaustive |
| Total probability | Sum of prior × likelihood |
| Bayes | One product ÷ the total |
| Posteriors | Add up to 1 |
| Rare causes | Can stay unlikely even after positive evidence |
Exam tips
- Always build the prior-likelihood-product table; it prevents most errors.
- Check that your priors add up to 1.
- Read truth-telling questions carefully to see how a lie is reported.
For more solved questions, see NIMCET probability and statistics: Bayes' theorem and distributions and the NIMCET Probability and Statistics chapter.
Common mistakes
- Using when the question asks for .
- Forgetting to divide by the total probability.
- Using causes that overlap or do not cover all cases.
- Mixing percentages and decimals in one calculation.
Frequently Asked Questions
What is Bayes' theorem?
P(Eᵢ | A) = P(Eᵢ)P(A | Eᵢ) / Σ P(Eⱼ)P(A | Eⱼ). It gives the probability of a cause given an observed result.
What is the law of total probability?
For a partition E₁, …, Eₙ, P(A) = Σ P(Eᵢ)P(A | Eᵢ).
When should Bayes' theorem be used?
When the outcome is known and the question asks for the probability of one of the possible causes.
What are prior and posterior probabilities?
The prior is the probability of a cause before the evidence; the posterior is its probability after the evidence is taken into account.
Do the posterior probabilities add up to 1?
Yes, because the causes form a partition.