What is Probability?
Probability measures how likely an event is to occur. It is always a value between 0 and 1: an impossible event has a probability of 0, and a certain event has a probability of 1. For example, the probability of rolling a 7 on a standard six-sided die is 0, while the probability of rolling a number less than 7 is 1.
What is the Law of Total Probability?
Sometimes we want to find the probability of an event A, but we cannot calculate it directly because we lack enough information. The law of total probability provides a way around this: instead of tackling A head-on, we break the problem into simpler pieces using a related event B.
The idea is to partition the sample space S into a set of mutually exclusive and exhaustive events
. "Mutually exclusive" means the events do not overlap, and "exhaustive" means they cover every possible outcome. We then express the probability of A as a weighted sum across these partitions.
The formula:
For any event A, if
form a partition of the sample space S, then:
This follows directly from the multiplication rule of conditional probability, which states that
.
In plain English: to find the overall probability of A, consider every possible "scenario"
, calculate the probability of A occurring within each scenario, and then add them all up — weighting each by how likely that scenario is.
Worked Examples
Example 1
Three boxes contain different numbers of light bulbs. The first box has 12 bulbs, of which 5 are dead. The second box has 8 bulbs, of which 3 are dead. The third box has 9 bulbs, of which 2 are dead. A box is chosen at random and a bulb is selected from it. Find the probability that the bulb is dead.
Solution
Since a box is chosen at random from 3 boxes, each box is equally likely:

The conditional probability of selecting a dead bulb from each box is:



Applying the law of total probability:



Finding a common denominator of 216:

The probability of selecting a dead bulb is
.
Example 2
Sam wants to travel to another city. The probability that he travels if it rains is 0.36, and the probability that he travels if it does not rain is 0.80. The probability of rain on that day is 0.30. Find the probability that Sam travels.
Solution
Let A be the event that Sam travels and B be the event that it rains.


The conditional probabilities are:


Since B and B' partition the sample space, we apply the law of total probability:



The probability that Sam travels is 0.668, or 66.8%.
Example 3
A class is divided into three groups. The first group has 15 students, of whom 8 are girls. The second group has 9 students, of whom 4 are girls. The third group has 12 students, of whom 7 are girls. A group is chosen at random and a student is selected. Find the probability that the student is a girl.
Solution
Each group is equally likely to be chosen:

The conditional probabilities are:



Applying the law of total probability:


Finding a common denominator of 540:

The probability of selecting a girl is
.
Example 4
There are four bags, each containing 50 balls. The first bag has 30 blue balls, the second has 45, the third has 35, and the fourth has 15. A bag is selected at random and a ball is drawn. Find the probability that the ball is blue.
Solution
Each bag is equally likely to be selected:

The conditional probabilities are:




Applying the law of total probability:


Finding a common denominator of 40:

The probability of selecting a blue ball is
.
Example 5
Alice wants to go on a trip. The probability she goes if her friend is also going is 0.90, and the probability she goes without her friend is 0.15. The probability that her friend is going is 0.65. Find the probability that Alice goes on the trip.
Solution
Let A be the event that Alice goes on the trip and B be the event that her friend goes.


The conditional probabilities are:


Applying the law of total probability:



The probability that Alice goes on the trip is 0.6375, or 63.75%.
Example 6
A factory has two machines, M1 and M2, that produce widgets. Machine M1 produces 60% of the total output and machine M2 produces the remaining 40%. The defect rate for M1 is 3% and for M2 it is 5%. A widget is selected at random. What is the probability that it is defective?
Solution
Let D be the event that a widget is defective.


Applying the law of total probability:



The probability that a randomly selected widget is defective is 0.038, or 3.8%.
Example 7
A student revises for an exam with probability 0.75. If the student revises, the probability of passing is 0.90. If the student does not revise, the probability of passing is 0.40. What is the probability that the student passes?
Solution
Let A be the event that the student passes and R be the event that the student revises.


Applying the law of total probability:



The probability that the student passes is 0.775, or 77.5%.
Example 8
There are two routes to school. Route X is taken 70% of the time and Route Y is taken 30% of the time. The probability of being late via Route X is 0.10 and via Route Y is 0.25. What is the probability that a student arrives late on a given day?
Solution
Let L be the event of arriving late.


Applying the law of total probability:



The probability of arriving late is 0.145, or 14.5%.
Example 9
A medical test is used to detect a disease that affects 2% of the population. The test correctly identifies a person with the disease 95% of the time (sensitivity) and correctly identifies a healthy person 90% of the time (specificity). A person is selected at random and tested. What is the probability that the test result is positive?
Solution
Let T be the event that the test is positive and D be the event that the person has the disease.


Note: the probability of a false positive is
.
Applying the law of total probability:



The probability of a positive test result is 0.117, or 11.7%. Notice that most positive results actually come from healthy people who received a false positive — an important insight that connects to Bayes' theorem.
Example 10
A jar contains 5 red, 3 green, and 2 yellow sweets. A sweet is drawn at random. If it is red, a biased coin with
is tossed. If it is green, a fair coin is tossed. If it is yellow, a biased coin with
is tossed. Find the probability that the coin lands on heads.
Solution
Total number of sweets = 5 + 3 + 2 = 10.

The conditional probabilities of heads are:

Applying the law of total probability:



The probability that the coin lands on heads is 0.56, or 56%.
Summarise with AI:








