Skip to lesson content

Lesson 3 of 5

Probability · Lesson 3 of 5

Combining Cases and Deriving Bayes’ Rule

“Combine mutually exclusive cases, then reverse a conditional probability using Bayes’ rule.”

Learning Objectives

• Build a partition from disjoint, exhaustive positive-probability cases. • Derive total probability by decomposing an event into disjoint pieces. • Distinguish a forward probability from a reverse conditional probability. • Derive Bayes’ rule and interpret prior and posterior probabilities. • Use probability trees and case tables to organise a multi-stage model.

Different routes to the same observation

A white ball may have come from either of two bags. A construction job may finish on time whether a strike occurs or not. To calculate the probability of the final observation, we must include every possible route to it. The routes should cover all possibilities without counting any outcome twice.

Suppose bag I contains two white and three red balls, while bag II contains four white and five red balls. Choosing a bag and then drawing a ball is a two-stage experiment. Knowing the chosen bag makes the colour probability straightforward. Learning only that the ball is white creates a reverse question: which bag was more likely to have produced it? We first develop the case structure needed for both questions.

A partition organises all possible cases

A useful case split tells us that exactly one case occurs. Cases must not overlap, and no possible outcome may be left out. We also require each conditioning case to have positive probability so that the conditional probabilities used in our calculations are defined.

Definition
Partition of a sample space

Events form a partition for the total-probability calculation when they are pairwise disjoint, their union is , and for every . Pairwise disjoint means whenever . Exhaustive means their union contains every outcome.

An event and its complement make a two-case partition when both have positive probability. Two events can also split a sample space into the four regions , , , . Some regions might be empty or have zero probability; omit those when forming a positive-probability partition. A sample space can have many valid partitions: choose the one matching the information supplied.

Every outcome belongs to exactly one caseE1E2E3E4AA ∩ E1A ∩ E2A ∩ E3A ∩ E4Add the disjoint pieces of A; no piece is counted twice.
An event crossing several cases— Each piece of A belongs to one partition event. Their union is A.

Add the probability contributed by each case

The event we want may stretch across several cases. Within a particular case, use a conditional probability. To recover its contribution to the original experiment, multiply by the chance of reaching that case. Then add the contributions, because the cases are disjoint.

Since , intersection distributes to give . These pieces are disjoint because the partition events are disjoint. Therefore . Finally use multiplication on each piece: .

Theorem of total probabilityLaTeX
The form a partition. is the weight of case , and is the chance of within that case. Each product is a joint probability in the original sample space.

This is a weighted average of the case-specific probabilities. The weights add to one, so lies between the smallest and largest values of . An unweighted average works only when all cases are equally likely. Having several named cases does not make their probabilities equal.

Example — A construction job and a possible strike

Problem
A strike has probability . A job finishes on time with probability if there is a strike and if there is no strike. Find the overall on-time probability.

  1. 1.Let mean strike and mean on-time completion. The two cases are , with probabilities .
  2. 2.The strike-and-on-time route contributes . The no-strike-and-on-time route contributes .
  3. 3.Add the disjoint routes: . This lies between and , as a weighted average should.
Example — An urn changes after a first draw

Problem
An urn starts with five red and five black balls. Draw a ball, return it, add two more of its colour, and draw again. Find the probability that the second ball is red.

  1. 1.Partition by the first colour: and each have probability . After the first colour is known, there are balls in the urn.
  2. 2.Given a first red, seven of the are red. Given a first black, five of the are red.
  3. 3.Thus . The overall red probability remains one-half even though the second draw depends on the first. An unchanged marginal probability does not by itself establish independence.

Reverse the direction of the information

Total probability answers a forward question: how likely is an observation when the starting case is uncertain? Bayes’ rule answers a reverse question: after the observation, how likely is each starting case? We are conditioning the same joint probability in the other direction.

Suppose is our partition and an observed event has positive probability. By conditional probability, . The numerator is by multiplication. The denominator is the sum of these joint contributions by total probability. Combining these substitutions gives Bayes’ rule.

Bayes’ ruleLaTeX
The observed event must satisfy . The numerator is the contribution from the requested case; the denominator includes the contributions from all cases.
Definition
Hypothesis, prior, and posterior

The partition events are possible hypotheses, or candidate cases. The prior probability describes a hypothesis before the observation. The posterior probability describes it after the observation. The likelihood describes how likely the observation is if that hypothesis holds.

Calling a hypothesis a cause is convenient in some stories, but the formula requires a probability model, not a claim about physical causation. It compares how much probability each case contributes to the observed event. A case with zero likelihood contributes nothing, even when its prior is positive.

Example — Which bag supplied a red ball?

Problem
Bag I has three red and four black balls; bag II has five red and six black balls. Choose a bag with probability each and draw one ball. Given a red ball, find the probability it came from bag II.

  1. 1.Let name the selected bags and mean red. The priors are both ; the likelihoods are and .
  2. 2.The joint red contributions are and . Their sum is .
  3. 3.The requested posterior is . It is slightly above because bag II has the slightly greater red proportion. The greater number of red balls alone is not the right comparison; the proportions matter.
Example — A gold coin and its partner

Problem
Three equally likely boxes contain gold-gold, silver-silver, and gold-silver. Choose a box, then choose either coin uniformly. If the selected coin is gold, find the probability that the other coin is also gold.

  1. 1.Use the three boxes as hypotheses with priors each. The likelihoods of a gold selection are .
  2. 2.The observed gold probability is . A gold partner means the first box was selected.
  3. 3.Bayes gives . Eliminating the all-silver box does not leave two equally likely boxes: the all-gold box supplies twice as much probability weight to the observation.
A likelihood is not a posterior

asks how likely the evidence is under a chosen case. asks how likely that case is after seeing the evidence. Reversing them discards the priors and the alternative explanations. Equal priors can cancel from a Bayes ratio, but unequal priors cannot be ignored.

A reliable organisation method

Organising the numbers before calculating is often more useful than memorising the formula. A table makes clear which quantities are given and which must be built. Write the requested posterior in symbols first so that the final numerator uses the right case.

CasePriorLikelihood of AJoint contribution
All casesPriors sum to 1Not added without weightsContributions sum to

For a forward probability, stop after adding the final column. For a posterior, divide the requested row of that column by its total. Check that all posterior probabilities are nonnegative and add to one. These checks follow directly from dividing the disjoint pieces of by the same positive .

Check your understanding

Choose disjoint, exhaustive cases before applying either theorem. Decide whether the question ends with an observation probability or asks for a case after an observation.

Quiz

Quick check

Which pair is a valid positive-probability partition?

Quick check

, , and the likelihoods of are . What is ?

Quick check

In Bayes’ rule, what does the denominator represent?

Quick check

The prior weights are and likelihoods are . Given the evidence, what is the posterior of the first case?

Quick check

After selecting a gold coin in the three-box example, why is the all-gold box more likely than the mixed box?

Quick check

Which quantity is a prior?

Practice Problems

Practice Problems
  1. Repeat the changing-urn calculation when the starting urn contains five red and five black balls and two matching-colour balls are added after the first draw. Explain why the first and second colours are still dependent.
  2. A route is chosen with probabilities and . Delay probabilities on those routes are and . Find the overall delay probability.
  3. For the preceding routes, a delay occurs. Find the probability that the second route was used.
  4. A box is chosen uniformly from three boxes with red proportions . Find the probability of drawing red and the posterior probability of the third box given red.
  5. Two cases have priors and equal likelihood for an observation. Calculate their posteriors and explain the result.
  6. An event and its complement have positive probabilities. Derive total probability for this two-case partition and explain why overlapping cases cannot simply be added.

The red probability is . Dependence is shown by .

Key Takeaways

Key Takeaways

• A partition supplies exactly one positive-probability case for every possible outcome. • Total probability adds the weighted contributions . • Bayes’ rule divides the requested case contribution by the total evidence probability. • A prior describes a case before evidence; a posterior describes it after evidence. • Keep every possible source of the evidence in the denominator, including cases with small priors.