Partitioning a sample space
Understanding sample spaces and partitions
A sample space is the set of all possible outcomes of a random experiment. Before you can apply the Law of Total Probability, you need to split that sample space into pieces called a partition.
A partition has two requirements:
- Mutually exclusive: The subsets can't overlap. No outcome belongs to more than one subset.
- Exhaustive: The subsets cover everything. Every possible outcome falls into exactly one subset.
Put formally, if form a partition of sample space , then:
- for all (no overlap)
- (full coverage)
A quick example: suppose a factory has three production lines. Every product comes from exactly one line, and together the lines produce all the output. Those three lines form a partition of the sample space of "all products."
Visualizing and applying partitions
Two tools help you see partitions clearly:
- Venn diagrams show the sample space as a rectangle divided into non-overlapping regions, one per partition element.
- Tree diagrams lay out the partition as the first set of branches, then show how a target event can occur within each branch.
Proper partitioning matters because it guarantees you don't miss any outcomes and don't count any outcome twice. That's exactly what the Law of Total Probability depends on.
Law of total probability

Formula and concepts
Sometimes you want but can't compute it directly. The Law of Total Probability lets you calculate it indirectly by going through a partition.
The idea: figure out how likely is within each piece of the partition, weight each piece by how likely that piece is, then add everything up.
where form a partition of the sample space.
For the simple two-partition case (an event and its complement ):
This formula works because each term equals by the multiplication rule, and since the partition the space, the pieces are disjoint and their union is .
Application and problem-solving
Here's a step-by-step process for using the law:
- Identify the target event whose probability you need.
- Choose a partition that breaks the problem into simpler scenarios. Confirm the pieces are mutually exclusive and exhaustive.
- Find for each partition element. These should be given or straightforward to calculate.
- Find for each partition element. These conditional probabilities are usually easier to determine than directly.
- Multiply and sum: compute for each , then add the results.
Worked example: A company buys chips from two suppliers. Supplier 1 provides 70% of chips and has a 5% defect rate. Supplier 2 provides 30% of chips and has a 10% defect rate. What's the probability a randomly chosen chip is defective?
- Partition: = from Supplier 1, = from Supplier 2
- ,
- ,
So 6.5% of all chips are defective. A tree diagram makes problems like this especially clean to organize.
Calculating probabilities of multiple events

Problem-solving strategies
When problems involve several interrelated events, the same core approach applies, but keeping your work organized becomes more important.
- Draw a tree diagram with the partition as the first branches and the target event as the second branches. Write probabilities on every branch.
- Use a table if you prefer: rows for each , columns for , , and their product. The final answer is the sum of the product column.
- Check your partition before computing. If the values don't sum to 1, something is off.
- Watch for hidden partitions. Sometimes the problem describes categories without explicitly calling them a partition (age groups, regions, machine types). Recognizing these is half the battle.
Applications and examples
The Law of Total Probability shows up across many fields:
- Medical diagnosis: The probability that a person has a disease can be computed by partitioning by test result (positive vs. negative) or by risk group (high-risk vs. low-risk).
- Manufacturing quality control: The defective-chip example above is a classic case. Each production line or supplier forms a partition element.
- Insurance: The probability of a claim can be broken down by policyholder category (age bracket, driving record, etc.), where each category has a different claim rate.
- Decision-making under uncertainty: Investment outcomes can be partitioned by economic scenarios (recession, stable growth, boom), each with different probabilities and conditional returns.
Recognizing applications of the law of total probability
Suitable scenarios
Not every probability problem calls for this law. Look for these signals:
- You need but can't compute it directly.
- The problem naturally breaks into distinct, non-overlapping scenarios or groups.
- Conditional probabilities are given or easy to estimate, while the overall is not.
- The problem describes a multi-stage process where the first stage creates a natural partition (choose a supplier, then check for defects).
- Data is stratified into groups (age brackets, regions, product lines), and you need an overall probability that accounts for all groups.
Practical examples
- Clinical trials: Probability of a drug working, partitioned by patient subgroups (age, severity of condition), each with different response rates.
- Telecommunications: Probability of network congestion, partitioned by time-of-day usage patterns (peak, off-peak).
- Marketing: Probability of a customer making a purchase, partitioned by which advertising channel reached them (social media, email, TV).
- Environmental science: Probability of exceeding a pollution threshold, partitioned by emission source type.
In each case, the pattern is the same: you can't easily find the overall probability, but you can find it within each subgroup, and you know how large each subgroup is. That's the Law of Total Probability at work.