Bayes’ theorem reverses a conditional probability: it lets you find P(cause | effect) when you only know P(effect | cause). The setup is always the same — an outcome can arise from two or more sources, and after seeing the outcome you want to know which source it most likely came from. First find the overall probability of the outcome using the total-probability rule P(A) = P(B)·P(A|B) + P(B′)·P(A|B′), then divide the path you care about by that total: P(B|A) = P(B)·P(A|B)/P(A). A tree diagram makes this painless — branch on the source, multiply along each branch to the outcome, then take "the favourable branch over the sum of all branches". The classic CAT framing is two bags or two machines, a ball or item is drawn, and you must work backwards to which bag or machine it came from.
✅ Solved examples
1. Bag A has 3 red and 2 blue; Bag B has 1 red and 4 blue. A bag is chosen at random and a red ball is drawn. Find the probability it came from Bag A.
2. A test is 90% accurate for a disease affecting 1% of people, with a 10% false-positive rate. Given a positive result, find the probability the person has the disease.
4. Box 1 has 2 white and 3 black balls; Box 2 has 4 white and 1 black. A box is picked at random and a white ball is drawn. Find the probability it came from Box 2.
Vidaara uses essential cookies to run the site and, with your consent, optional cookies to understand how learners use Vidaara so we can improve it. We never sell your data. Read our Cookie Policy and Privacy Policy.