←
Class 12 Mathematics
13. Probability · 13 / 13
⌕
Chapter 13 of 13

13. Probability

8 sections · 14,187 words

13.1 Chapter Opener: Introduction and Random Experiments

1,583 words · 7 min read

Chapter 13

Probability

Big idea: probability measures how likely something is. When you learn new information, the chances change. This chapter shows exactly how, and how to turn a "what is the chance of the clue?" into a "what is the chance of the cause?".

A weather report says rain is likely tomorrow. A test paper has four choices for each question. A bag holds coloured balls you cannot see. All three situations ask the same kind of question: out of everything that could happen, how much belongs to the event you care about? This chapter answers that question, and then goes further. It shows what happens to the answer when part of the story is already known.

  • 13.1 fixes the basic language: experiment, sample space, event, and the rule P(E)=n(E)/n(S)P(E) = n(E)/n(S).
  • 13.2 asks what changes when a clue arrives: conditional probability, the chance of EE given FF.
  • 13.3 chains chances together: the multiplication rule for "EE and then FF".
  • 13.4 studies events that do not affect each other: independent events, and what happens when trials repeat.

Read with a pencil. Every worked example shows each fraction being built and simplified, and every figure is followed by a short walkthrough that tells you how to read it. When a section ends with a quick check, cover the answers and try first.

Imagine a box of small balls, all the same size and well mixed. You close your eyes and pick one. If 55 of the 3636 balls are marked with a star, you feel that the chance of picking a starred ball is 55 out of 3636. Probability makes this feeling exact. An experiment is any action whose result is not known in advance, such as rolling dice or drawing a ball. Each possible result is an outcome. The set of all outcomes is the sample space, written SS. An event EE is a collection of outcomes, that is, a subset of SS. When all outcomes are equally likely,

P(E)=n(E)n(S)P(E) = \frac{n(E)}{n(S)}

where n(E)n(E) is the number of outcomes in EE and n(S)n(S) the number in SS. Read it as "favourable over total". The symbol P(E)P(E) is read "the probability of EE".

Roll two dice, one after the other. There are 6×6=366 \times 6 = 36 equally likely outcomes, from (1,1)(1, 1) to (6,6)(6, 6). Let EE be the event "the sum is 88". The outcomes are (2,6),(3,5),(4,4),(5,3),(6,2)(2, 6), (3, 5), (4, 4), (5, 3), (6, 2), so n(E)=5n(E) = 5 and

P(E)=536≈0.1389.P(E) = \frac{5}{36} \approx 0.1389.

The 36 outcomes of two dice. The 5 orange outcomes have sum 8, so P(sum is 8) = 5/36.

Read the figure like a map. The horizontal direction is the first die and the vertical direction is the second die, so each dot is one ordered pair. The five orange dots form a short diagonal because raising the first die by one forces the second die down by one to keep the sum at 8. Five orange dots out of 36 in total give the probability 5/36. Every classical probability is one such fraction: count the coloured dots, count all the dots, divide.

  • [Concept] 0≤P(E)≤10 \le P(E) \le 1, with P(S)=1P(S) = 1 and P(∅)=0P(\varnothing) = 0. A probability is never negative and never above 11. The whole sample space has probability 11, and the impossible event ∅\varnothing has probability 00.
  • [Board Standard] Complement: P(E′)=1−P(E)P(E') = 1 - P(E), where E′E' means "EE does not happen". Here P(E′)=1−536=3136P(E') = 1 - \frac{5}{36} = \frac{31}{36}. Counting directly, 3131 of the 3636 outcomes do not sum to 88, which agrees.
  • [HOTS] Addition rule: P(E∪G)=P(E)+P(G)−P(E∩G)P(E \cup G) = P(E) + P(G) - P(E \cap G), where E∪GE \cup G means "EE or GG (or both)" and E∩GE \cap G means "EE and GG". The subtraction removes the double counting of outcomes that lie in both events.

Check the addition rule. Let GG be "the first die shows 33". Then P(G)=16P(G) = \frac{1}{6}, and "both" happens only for (3,5)(3, 5), so P(E∩G)=136P(E \cap G) = \frac{1}{36}. So P(E∪G)=536+16−136=518P(E \cup G) = \frac{5}{36} + \frac{1}{6} - \frac{1}{36} = \frac{5}{18}. Counting the outcomes directly gives the same answer, 518\frac{5}{18}. The table below shows where the subtraction comes from: the single outcome (3,5)(3, 5) sits in the top-left cell and is counted in both the first row and the first column.

first die \ outcomesum is 88 (55)sum is not 88 (3131)row total
shows 33 (66)1566
does not show 33 (3030)4263030
column total5531313636

Read the table by rows and columns. Each row is a statement about the first die, each column a statement about the sum, and each cell counts outcomes satisfying both. Adding the whole first row and the whole first column counts the top-left cell twice, so the addition rule subtracts it once. This kind of two-way table is called a contingency table, and you will meet it again in every section of this chapter.

Suppose someone tells you a clue about the outcome: "at least one die shows a 66". The clue rules out many outcomes. Do the chances of other events change? Yes, and in this chapter you will learn how to calculate the new chances. You will meet:

  • [Concept] conditional probability: the chance of an event when you already know another event has happened;
  • [Board Standard] the multiplication rule: finding the chance that two or more events all happen;
  • [Board Standard] independent events: events that do not affect each other;
  • [HOTS] the theorem of total probability and Bayes' theorem: combining several possible causes, and working backwards from an effect to its cause.

⚡ Quick Check Flashcards3 questions

Try these on your own, then check. Each one is a plain "favourable over total" count.

Question 1
[Concept] Two dice are rolled. Find the probability that the sum is 99.
Try answering before revealing!
Question 2
[Board Standard] Two dice are rolled. Find the probability that the first die shows 66.
Try answering before revealing!
Question 3
[HOTS] Two dice are rolled. Find the probability that the sum is 77 or 1111.
Try answering before revealing!

Probability grew out of questions about games of chance, and it took several centuries to become a full branch of mathematics. Each step below answered a practical question: how to count chances, how to split a prize fairly, how to learn from evidence, and finally how to write the rules down exactly.

  • Early traces. Written remarks about the chances in dice games appear as early as the 15th century, for example in a commentary on Dante’s Divine Comedy. Players already suspected that some totals come up more often than others.
  • Girolamo Cardano (1501–1576) wrote a book on games of chance in which he counted the favourable cases for the totals of two dice. It was published after his death, in 1663: counting cases, the same skill this chapter practises, was the first method of the subject.
  • Galileo Galilei (1564–1642) explained why, with three dice, a total of 1010 comes up more often than a total of 99. We can check his reasoning: out of 216 equally likely outcomes, there are 2727 ways to make 1010 and only 2525 ways to make 99. Six of the apparent combinations split into different numbers of orders, and counting orders settles it.
  • 1654: the birth of the theory. Blaise Pascal (1623–1662) and Pierre de Fermat (1601–1665) exchanged letters about a question on how to divide the stakes of an unfinished game fairly. Pascal used algebra and Fermat used counting of combinations. Their correspondence is generally seen as the true beginning of probability theory: fair division led to expected value.
  • Christiaan Huygens (1629–1695) heard about their work and wrote the first printed book on probability, published in 1657. It spread the new ideas across Europe.
  • Jacob Bernoulli (1654–1705) wrote Ars Conjectandi ("The Art of Conjecturing"), published after his death in 1713. It contains the first form of the law of large numbers, which says frequencies settle near probabilities in many trials, and the study of what we now call the binomial distribution: the repeated-trials pattern of Section 13.4.
  • Thomas Bayes (died 1761) worked out how to reverse a conditional probability: from the chance of the evidence given each cause to the chance of each cause given the evidence. His essay was published after his death, in 1763. The rule you learned in Section 13.5 carries his name, and it now powers medical testing, spam filters and machine learning.
  • Andrey Kolmogorov (1903–1987) gave probability a firm logical foundation in 1933. He treated probability as a function on sets, with a few simple rules (axioms) from which all the rest follows: non-negativity, total probability 11, and addition over disjoint events. Every rule in this chapter descends from those three.

13.2 Conditional Probability and Its Properties

2,799 words · 13 min read

Imagine a quiz where each question has four choices. Before you read the question, every choice looks equally likely. Then the teacher says: "the answer is not choice D." Suddenly three choices remain, and each has a better chance than before. A clue changes what is possible. Here is the same idea with dice. Roll two dice, and suppose you are told: "at least one die shows a 66". Call this clue event FF. Now only the outcomes with a 66 are still possible. There are 11$ of them. The sum is 88 (event EE) in only 2$ of these: (2,6)(2, 6) and (6,2)(6, 2). So, given FF, the chance of EE is 211\frac{2}{11}. Before the clue it was 536\frac{5}{36}.

Given the clue F, only the 11 coloured outcomes remain. Two of them (orange) have sum 8, so P(E given F) = 2/11.

Read the figure by colour. Grey dots are ruled out by the clue, so ignore them completely. Teal dots are the new world: eleven outcomes with at least one 6, forming the top row and the right-hand column. Orange dots are the overlap: they satisfy the clue and have sum 8. Two orange dots among eleven coloured dots give 2/11. A conditional probability is an ordinary probability computed inside the coloured region only.

We write this as P(E∣F)P(E \mid F), read "the probability of EE given FF". The vertical bar means "given that we know". We can calculate it in two equivalent ways:

  • [Board Standard] Shrink the sample space. Count only the outcomes in FF: P(E∣F)=n(E∩F)n(F)=211P(E \mid F) = \dfrac{n(E \cap F)}{n(F)} = \dfrac{2}{11}. Cross out everything outside FF and count what is left.
  • [HOTS] Use probabilities. Divide the chance of "both" by the chance of the clue:

P(E∣F)=P(E∩F)P(F),P(F)≠0.P(E \mid F) = \frac{P(E \cap F)}{P(F)}, \qquad P(F) \ne 0.

Check: P(E∩F)=118P(E \cap F) = \frac{1}{18} and P(F)=1136P(F) = \frac{11}{36}, so P(E∣F)=118÷1136=211P(E \mid F) = \frac{1}{18} \div \frac{11}{36} = \frac{2}{11}, the same as before. The condition P(F)≠0P(F) \ne 0 is needed because you cannot be given a clue that can never happen. Why do the two methods agree? Dividing the top and bottom of n(E∩F)n(F)\frac{n(E \cap F)}{n(F)} by n(S)n(S) turns counts into probabilities, and n(S)n(S) cancels. So shrinking the sample space and dividing probabilities are the same step written two ways.

F: the clue (11 outcomes)E and F: 2F only: 9outside F: 25 ruled out
The clue F becomes the new sample space: 11 outcomes. Only the 2 orange outcomes inside it also belong to E, so P(E given F) = 2/11.

Read the schematic as a picture of the shrinking. The big rectangle is the clue F with its 11 outcomes: your new sample space. The orange ellipse inside holds the 2 outcomes also in E; the rest holds the 9 of F that miss E. The conditional probability is the orange part over the whole rectangle: 2/11.

A bag holds 55 red and 33 blue balls. Two balls are drawn one after the other, without putting the first back. Given that the first ball is red, what is the chance that the second is red too? After a red ball is removed, 77 balls are left, and 44 of them are red. So the answer is 47\frac{4}{7}. The computer listed all 8×7=568 \times 7 = 56 ordered draws and agrees: 47\frac{4}{7}. In words: the first draw changes the bag, and the second draw sees the changed bag.

first \ secondred secondblue secondrow total
red first20153535
blue first1562121
column total353521215656

Read this contingency table one row at a time. The first row fixes the clue "first ball red": 35 ordered draws, of which 20 have a red second ball. So P(second red∣first red)=2035=47P(\text{second red} \mid \text{first red}) = \frac{20}{35} = \frac{4}{7}. The second row gives a bonus result the same way: given a blue first ball, the chance the second is red is 1521=57\frac{15}{21} = \frac{5}{7}, because all 55 red balls are still in the bag. Each row of a contingency table is one conditional probability.

A card is drawn from a standard deck of 52. A face card means a jack, queen or king. There are 12 face cards, 26 red cards and 13 cards of each suit.

  • [Concept] Given that it is a face card (jack, queen or king; 1212 cards), the chance that it is a king is 412=13\frac{4}{12} = \frac{1}{3}. The four kings sit inside the twelve face cards.
  • [Board Standard] Given that the card is red, the chance that it is a heart is 12\frac{1}{2}. Half of the 2626 red cards are hearts.
  • [HOTS] Given that the card is a heart, the chance that it is red is 11. A heart is always red, so the clue settles the question completely.

Notice the pattern across the three items: the clue selects a smaller group, and the answer counts how much of the event lies inside that group. When the event lies fully inside the clue, as in the third item, the answer is 1.

Common mistake: mixing up P(E∣F)P(E \mid F) and P(F∣E)P(F \mid E). They are usually different. In the dice example, P(E∣F)=211P(E \mid F) = \frac{2}{11} but P(F∣E)=25P(F \mid E) = \frac{2}{5} (of the 55 outcomes with sum 88, two contain a 66). The condition is always the event after the bar. Ask yourself: "which event is known?" That event goes after the bar.
In simple words: conditional probability asks, "among only the outcomes that fit the clue, what fraction also fit the event?" First shrink, then count.

⚡ Quick Check Flashcards5 questions

Pause and test yourself with these. For each one, name the clue, shrink the sample space, and count.

Question 1
[Concept] Toss a fair coin 33 times. Given that the first toss is heads, what is the chance of at least 22 heads in total?
Try answering before revealing!
Question 2
[Board Standard] Roll a die. Given that the number is even, what is the chance it is 66?
Try answering before revealing!
Question 3
[Board Standard] Draw a card from a deck. Given that it is a spade, what is the chance it is an ace?
Try answering before revealing!
Question 4
[HOTS] A bag has 44 red and 66 blue balls. Two are drawn without replacement. Given that the first is blue, what is the chance the second is blue?
Try answering before revealing!
Question 5
[HOTS] Use the red-and-blue bag table above. Given that the first ball is blue, what is the chance the second ball is red? Read it from the row, then confirm with the fraction.
Try answering before revealing!

Once the clue FF is known, FF acts like a new sample space. So conditional probabilities follow the same rules as ordinary probabilities, with FF playing the role of SS. In symbols, P(⋅∣F)P(\cdot \mid F) obeys every rule that P(⋅)P(\cdot) obeys. The examples below use one card drawn from a deck, with the clue FF: "the card is red" (2626 cards). Let EE be "the card is a king" and GG "the card is a heart". Every value was found by counting.

  • [Concept] Property 1. 0≤P(E∣F)≤10 \le P(E \mid F) \le 1, and P(F∣F)=P(S∣F)=1P(F \mid F) = P(S \mid F) = 1. Example: P(E∣F)=113P(E \mid F) = \frac{1}{13}, and P(F∣F)=1P(F \mid F) = 1. Knowing FF makes FF certain.
  • [Board Standard] Property 2 (addition rule). P((E∪G)∣F)=P(E∣F)+P(G∣F)−P((E∩G)∣F)P\big((E \cup G) \mid F\big) = P(E \mid F) + P(G \mid F) - P\big((E \cap G) \mid F\big). Example: P(E∣F)=113P(E \mid F) = \frac{1}{13}, P(G∣F)=12P(G \mid F) = \frac{1}{2}, and P((E∩G)∣F)=126P\big((E \cap G) \mid F\big) = \frac{1}{26} (only the king of hearts). So the right side is 113+12−126=713\frac{1}{13} + \frac{1}{2} - \frac{1}{26} = \frac{7}{13}. Counting the red cards that are kings or hearts (13+1=1413 + 1 = 14 out of 2626) gives 713\frac{7}{13}.
  • [Board Standard] Property 3 (complement). P(E′∣F)=1−P(E∣F)P(E' \mid F) = 1 - P(E \mid F). Example: the chance that a red card is not a king is 1−113=12131 - \frac{1}{13} = \frac{12}{13}, and counting (2424 out of 2626) gives 1213\frac{12}{13}.
  • [HOTS] Property 4 (disjoint events). If EE and AA cannot happen together, then P((E∪A)∣F)=P(E∣F)+P(A∣F)P\big((E \cup A) \mid F\big) = P(E \mid F) + P(A \mid F). Example: let AA be "the card is an ace". Kings and aces are disjoint, so P((E∪A)∣F)=113+113=213P\big((E \cup A) \mid F\big) = \frac{1}{13} + \frac{1}{13} = \frac{2}{13}. The computer confirms 213\frac{2}{13} by counting.
event (given red)kings (22)hearts (1313)king of hearts (11)kings or hearts (1414)
share of 2626 red cards113\frac{1}{13}12\frac{1}{2}126\frac{1}{26}713\frac{7}{13}

Read the table as one row of shares. Every entry divides by the same 26 red cards, which is exactly the shrinking step of conditional probability. The last column checks Property 2 in numbers: 2/26 + 13/26 - 1/26 = 14/26, because the king of hearts is counted in both middle columns.

Common mistake: the properties apply to the event before the bar. The clue after the bar stays the same. For example, P(E∣F)+P(E∣F′)P(E \mid F) + P(E \mid F') is not 11. The correct statement is P(E∣F)+P(E′∣F)=1P(E \mid F) + P(E' \mid F) = 1. The complement flips the event, never the clue.
Why it works: P(E′∣F)=P(E′∩F)P(F)P(E' \mid F) = \dfrac{P(E' \cap F)}{P(F)}. The red cards that are not kings, together with the red kings, make up all the red cards, so the two fractions add up to P(F)P(F)=1\dfrac{P(F)}{P(F)} = 1. One clue, two complementary events, one whole.

⚡ Quick Check Flashcards2 questions

One more check before you move on. Both parts use the same clue, so Property 3 connects them.

Question 1
[Board Standard] For a card drawn from a deck, find the chance that it is a jack, queen or king given that it is red, and the chance that it is not one of these, given that it is red. What do the two add up to?
Try answering before revealing!
Question 2
[HOTS] Given that a drawn card is red, find the chance that it is a king or an ace. Which property did you use?
Try answering before revealing!

⚡ Quick Check Flashcards18 questions
Question 1
[Concept] Two dice are rolled. Find the probability that the sum is 1010, given that the first die shows 55.
Try answering before revealing!
Question 2
[Concept] Two dice are rolled. Find the probability that the sum is 77, given that the two dice show different numbers.
Try answering before revealing!
Question 3
[Concept] A card is drawn from a deck. Given that it is black (a spade or a club), find (a) the probability that it is a spade, (b) the probability that it is a king.
Try answering before revealing!
Question 4
[Concept] A fair coin is tossed 33 times. Find the probability of exactly 22 heads, given that at least one toss is heads.
Try answering before revealing!
Question 5
[Concept] A bag has 66 red and 44 blue balls. Two are drawn one after the other without replacement. Find the probability that both are red, given that at least one is red.
Try answering before revealing!
Question 6
[Concept] Two dice are rolled. Find the probability that the sum is 99 or more, given that the first die shows 44.
Try answering before revealing!
Question 7
[Board Standard] Two dice are rolled. Let EE be "the first die shows 66" and FF "the sum is 99 or more". Calculate P(E∣F)P(E \mid F) and P(F∣E)P(F \mid E) and show that they are different.
Try answering before revealing!
Question 8
[Board Standard] A box holds 2020 items, of which 55 are faulty. Two items are checked one after the other without replacement. Given that the first is faulty, what is the probability that the second is also faulty?
Try answering before revealing!
Question 9
[Board Standard] A fair coin is tossed 33 times. Given that at least one toss is heads, find the probability that all three tosses are the same.
Try answering before revealing!
Question 10
[Board Standard] A die is rolled. Given that the number is more than 33, find the probability that it is odd.
Try answering before revealing!
Question 11
[Board Standard] A card is drawn from a deck. Given that it is red, find the probability that it is a face card (jack, queen or king).
Try answering before revealing!
Question 12
[Board Standard] A bag has 22 red and 33 blue balls. Two balls are drawn one after the other without replacement. Given that the first is red, find the probability that the second is blue.
Try answering before revealing!
Question 13
[Board Standard] Two dice are rolled. Given that the first die shows 11 or 22, find the probability that the sum is 44 or less.
Try answering before revealing!
Question 14
[HOTS] Two dice are rolled. Given that the sum is 55 or less, find the probability that both dice show the same number.
Try answering before revealing!
Question 15
[HOTS] A card is drawn from a deck. Given that it is red, find the probability that it is a number card from 22 to 1010.
Try answering before revealing!
Question 16
[HOTS] A fair coin is tossed twice. Given that at least one toss is heads, find the probability that both tosses are heads.
Try answering before revealing!
Question 17
[HOTS] A bag has 33 red and 22 blue balls. Two balls are drawn one after the other without replacement. Find the probability that both balls have the same colour.
Try answering before revealing!
Question 18
[HOTS] Two dice are rolled. Let EE be "the sum is 66" and FF "the first die shows 22". Find P(E∣F)P(E \mid F) and P(F∣E)P(F \mid E).
Try answering before revealing!

13.3 Multiplication Theorem on Probability and Independent Events

3,435 words · 16 min read

Sometimes you want the chance that two things both happen: first EE, then FF. A quality checker tests an item twice. A card player needs two aces in a row. Rearranging the definition P(F∣E)=P(E∩F)P(E)P(F \mid E) = \dfrac{P(E \cap F)}{P(E)} gives the multiplication theorem:

P(E∩F)=P(E) P(F∣E),P(E)≠0.P(E \cap F) = P(E)\,P(F \mid E), \qquad P(E) \ne 0.

In words: the chance of "EE and then FF" is the chance of EE, times the chance of FF once EE has happened. Reversing the roles gives P(E∩F)=P(F) P(E∣F)P(E \cap F) = P(F)\,P(E \mid F) as well. The second factor is where the work lies: you must recompute the chance of the second event inside the changed situation.

A bag has 55 red and 33 blue balls. Two balls are drawn without replacement. Find the chance that both are red. The first is red with chance 58\frac{5}{8}. Given that, the second is red with chance 47\frac{4}{7}. So

P(both red)=58×47=514.(5×4=20,  8×7=56,  2056=514.)P(\text{both red}) = \frac{5}{8} \times \frac{4}{7} = \frac{5}{14}. \qquad (5 \times 4 = 20, \; 8 \times 7 = 56, \; \frac{20}{56} = \frac{5}{14}.)

Listing all 5656 ordered draws by computer gives the same 514\frac{5}{14}. Notice that both fractions are needed: the first describes the full bag, the second the bag after one red ball has left.

startR, 5/8B, 3/8R, 4/7B, 3/7R, 5/7B, 2/7RR: 5/14RB: 15/56BR: 15/56BB: 3/28
Each path probability is the product of its branch probabilities: 5/14, 15/56, 15/56 and 3/28. The four paths cover every outcome, so they add to 1.

Read the tree from left to right. The start dot splits into the two possible first draws, with branch chances 5/85/8 and 3/83/8. Each first draw splits again into the two possible second draws, with chances recomputed for the smaller bag: after a red first ball the second is red with chance 4/74/7, but after a blue first ball it is red with chance 5/75/7. 514\frac{5}{14} at the top leaf is the product 58×47\frac{5}{8} \times \frac{4}{7} along its path. To find the chance of a path, multiply along its branches; to find the chance of an effect, add the paths that lead to it.

The rule extends to more events: P(E∩F∩G)=P(E) P(F∣E) P(G∣E∩F)P(E \cap F \cap G) = P(E)\,P(F \mid E)\,P(G \mid E \cap F). Each new factor conditions on everything before it. A bag has 44 red and 66 blue balls. Three balls are drawn without replacement. Find the chance of "red, then blue, then red". Multiply step by step: 410\frac{4}{10} for the first, then 69\frac{6}{9} from the smaller bag, then 38\frac{3}{8} from the still smaller bag. So P=410×69×38=110P = \frac{4}{10} \times \frac{6}{9} \times \frac{3}{8} = \frac{1}{10}. Every time a ball is removed, the numbers in the next fraction change: 1010 to 99 to 88 on the bottom, and the reds drop only when a red ball actually leaves. Listing all 720720 ordered draws agrees: 110\frac{1}{10}.

Two cards are drawn from a deck without replacement. The chance that both are aces is 452×351=1221\frac{4}{52} \times \frac{3}{51} = \frac{1}{221}. The computer listed all 52×51=265252 \times 51 = 2652 ordered pairs and agrees: 1221\frac{1}{221}.

If the first ball is put back before the second draw, the bag is the same each time. For the bag in Example 1, P(both red)=58×58=2564≈0.3906P(\text{both red}) = \frac{5}{8} \times \frac{5}{8} = \frac{25}{64} \approx 0.3906. This is larger than 514≈0.3571\frac{5}{14} \approx 0.3571 from Example 1, because a red ball is still available to be drawn again. The table below compares the two situations for the same bag.

two drawsboth redboth bluemixed (one each)
without replacement514\frac{5}{14}328\frac{3}{28}1528\frac{15}{28}
with replacement2564\frac{25}{64}964\frac{9}{64}1532\frac{15}{32}

Read the table across each row. Without replacement the mixed case is 1528\frac{15}{28}, found by subtracting both-red and both-blue from 11. With replacement it is 1532\frac{15}{32}. Replacement always raises the chance of repeats, because nothing is ever used up. This table also checks that each row adds to 11, as the three columns form a partition of the two draws.

Common mistake: forgetting to change the second fraction when the first item is not replaced. "58×58\frac{5}{8} \times \frac{5}{8}" is the answer with replacement. Without replacement the second fraction is 47\frac{4}{7}. Always ask: did the first event change the bag, deck or crowd?
Drawing a tree helps. Each branch has a probability. Multiply along a path for "and", and add paths for "or". The tree diagram in this section shows this for two draws; Section 13.5.2 grows a bigger tree for three bags.

⚡ Quick Check Flashcards5 questions

Practise the multiplication rule on these. Write each factor before you multiply.

Question 1
[Concept] Three cards are drawn from a deck without replacement. Find the chance that all three are hearts.
Try answering before revealing!
Question 2
[Board Standard] A bag has 66 red and 44 blue balls. Two balls are drawn without replacement. Find the chance of red first and blue second.
Try answering before revealing!
Question 3
[Board Standard] A die is rolled twice. Find the chance that the first roll is even and the second roll is more than 44.
Try answering before revealing!
Question 4
[HOTS] A fair coin is tossed three times. Find the chance of three heads.
Try answering before revealing!
Question 5
[HOTS] A bag has 55 red and 33 blue balls. Find the chance both balls are blue (a) without replacement, (b) with replacement.
Try answering before revealing!

Sometimes a clue does not change the chances. Toss a coin and roll a die. Knowing that the coin shows heads tells you nothing about the die, because the two objects do not interact. We say these events are independent. Two events are independent when knowing one has happened does not change the chance of the other:

P(E∣F)=P(E).P(E \mid F) = P(E).

Putting this into the multiplication theorem gives the working test for independence, which avoids conditional probabilities entirely:

P(E∩F)=P(E) P(F).P(E \cap F) = P(E)\,P(F).

(If P(E)≠0P(E) \ne 0 and P(F)≠0P(F) \ne 0, the two statements are equivalent: each follows from the other by multiplying or dividing by P(F)P(F). The non-zero condition matters, because P(E∣F)P(E \mid F) is undefined when P(F)=0P(F) = 0.) Events that are not independent are called dependent.

Roll two dice. Let EE be "the first die is even" and FF "the sum is 77". Then P(E)=12P(E) = \frac{1}{2}, P(F)=16P(F) = \frac{1}{6}, and E∩FE \cap F has three outcomes, (2,5),(4,3),(6,1)(2, 5), (4, 3), (6, 1), so P(E∩F)=112P(E \cap F) = \frac{1}{12}. And 12×16=112\frac{1}{2} \times \frac{1}{6} = \frac{1}{12}. The two are equal, so EE and FF are independent, even though both are about the same dice. Whatever the first die shows, there is always exactly one second-die number that makes the sum 77: if the first die is even, that partner is odd, and there are three such pairs out of eighteen even-first outcomes, which is the same share as 66 out of 3636.

E = first die even (3 columns of the grid). F = sum is 7 (a diagonal). Half of the diagonal lies in E, and E is half of the grid: that is independence.

Read the figure as shares, not counts. The teal columns (E) cover exactly half the grid. The purple-and-orange diagonal (F) has six dots, and exactly half of them, the three orange ones, lie inside the teal columns. So knowing F leaves the share of E at one half, and knowing E leaves the share of F at 6/36 = 1/6. Equal shares in both directions is what independence looks like.

Keep EE = "the first die is even" but let F′F' now be "the sum is 88". Then P(E)=12P(E) = \frac{1}{2}, P(F′)=536P(F') = \frac{5}{36}, and P(E∩F′)=112P(E \cap F') = \frac{1}{12} (the outcomes (2,6),(4,4),(6,2)(2, 6), (4, 4), (6, 2)). But 12×536=572\frac{1}{2} \times \frac{5}{36} = \frac{5}{72}, which is not 112\frac{1}{12}. So these events are dependent: an even first die makes a sum of 88 more likely (33 of the 55 ways to make 88 start with an even number, which is more than half). The same first event can be independent of one sum and dependent on another.

Toss a coin and roll a die (1212 outcomes). Let AA be "heads" and BB "the die is even". Then P(A)=12P(A) = \frac{1}{2}, P(B)=12P(B) = \frac{1}{2}, P(A∩B)=14P(A \cap B) = \frac{1}{4}, and 12×12=14\frac{1}{2} \times \frac{1}{2} = \frac{1}{4}. Independent, as expected for two separate objects that cannot influence each other.

In a deck of cards, "the card is a king" and "the card is a heart" are also independent: P(king)=113P(\text{king}) = \frac{1}{13}, P(heart)=14P(\text{heart}) = \frac{1}{4}, and P(king of hearts)=152=113×14P(\text{king of hearts}) = \frac{1}{52} = \frac{1}{13} \times \frac{1}{4}. Here independence is a numerical fact about the deck, not about physical separation.

Two events are mutually exclusive if they cannot happen together, so P(E∩F)=0P(E \cap F) = 0. If both have non-zero probability, then P(E) P(F)≠0P(E)\,P(F) \ne 0, so they cannot be independent. Example: "the card is an ace" and "the card is a face card" are exclusive. The chance of both is 0, but the product 452×1251\frac{4}{52} \times \frac{12}{51}... more exactly 452×1252\frac{4}{52} \times \frac{12}{52} is not zero. Knowing the card is an ace tells you for certain it is not a face card, so the events are very dependent. Exclusive events with non-zero probability are always dependent: the occurrence of one rules out the other completely.

If EE and FF are independent, so are EE and F′F' (and E′E' and FF, and E′E' and F′F'). In Example 1, the event "the sum is not 77" is also independent of "the first die is even": the computer confirms it. This matches common sense: if a clue about FF does not help, a clue about "not FF" does not help either. You will prove this pattern in an exercise.

Three events A,B,CA, B, C are mutually independent only if every pair is independent and P(A∩B∩C)=P(A) P(B) P(C)P(A \cap B \cap C) = P(A)\,P(B)\,P(C). Pairwise independence is not enough. Toss two coins. Let AA = "first is heads", BB = "second is heads", CC = "the two coins match". Each pair is independent (each pair has probability 14=12×12\frac{1}{4} = \frac{1}{2} \times \frac{1}{2}). But P(A∩B∩C)=14P(A \cap B \cap C) = \frac{1}{4}, while P(A) P(B) P(C)=18P(A)\,P(B)\,P(C) = \frac{1}{8}. So the three events are not mutually independent: knowing AA and BB both happened settles CC for certain.

Toss a fair coin 44 times. The tosses are independent, each with chance 12\frac{1}{2} of heads. What is the chance of exactly 22 heads? One order, say HHTT, has chance 12×12×12×12=116\frac{1}{2} \times \frac{1}{2} \times \frac{1}{2} \times \frac{1}{2} = \frac{1}{16} by the multiplication rule. But HHTT is not the only order: the computer counts 66 orders with exactly 22 heads (HHTT, HTHT, HTTH, THHT, THTH, TTHH), and the orders are disjoint. So P(exactly 2)=6×116=38P(\text{exactly } 2) = 6 \times \frac{1}{16} = \frac{3}{8}, and counting all 1616 outcomes agrees: 38\frac{3}{8}. This pattern, a count of orders times the chance of one order, is called the binomial distribution: it describes the number of successes in a fixed number of independent trials.

Four tosses, p = 1/2: the middle outcome (2 heads) is most likely at 3/8, and the two ends are rarest at 1/16 each.

Read the bars from left to right as 0,1,2,3,40, 1, 2, 3, 4 heads. The heights are 116\frac{1}{16}, 14\frac{1}{4}, 38\frac{3}{8}, 14\frac{1}{4} and 116\frac{1}{16}, and they add to 11. The middle bar is tallest because there are 6 orders with 22 heads but only 11 order each with 00 or 44 heads: with a fair coin every order is equally likely, so the outcome with the most orders wins. The symmetry comes from heads and tails trading places. Section 13.5 will reuse this "orders times one-order chance" idea when trials have unequal chances.

Common mistake: saying events are independent because they "look unrelated", or dependent because they are "about the same thing". Always test P(E∩F)=P(E) P(F)P(E \cap F) = P(E)\,P(F). Example 1 (both about the same dice, yet independent) shows why looks deceive.

⚡ Quick Check Flashcards5 questions

Test the independence test on these. Compute both sides every time; never guess from the story.

Question 1
[Concept] Two dice are rolled. Are "the first die shows 33 or 44" and "the sum is 77" independent?
Try answering before revealing!
Question 2
[Board Standard] A card is drawn. Are "it is a heart" and "it is a face card" independent?
Try answering before revealing!
Question 3
[Board Standard] A coin is tossed 33 times. Are "at least two heads" and "the first toss is heads" independent?
Try answering before revealing!
Question 4
[HOTS] A fair coin is tossed 44 times. Find the chance of exactly 33 heads. How many orders give 33 heads?
Try answering before revealing!
Question 5
[HOTS] A die is rolled twice. Find the chance that neither roll shows a 66. Write it as a product and explain why the product rule for independent events applies.
Try answering before revealing!

⚡ Quick Check Flashcards18 questions
Question 1
[Concept] Two dice are rolled. Are the events "the first die is odd" and "the sum is 88" independent?
Try answering before revealing!
Question 2
[Concept] Two dice are rolled. Are "the first die shows 33 or 44" and "the sum is 77" independent?
Try answering before revealing!
Question 3
[Concept] A card is drawn from a deck. Are "the card is a heart" and "the card is a face card" independent?
Try answering before revealing!
Question 4
[Concept] A fair coin is tossed 33 times. Are "at least two heads" and "the first toss is heads" independent?
Try answering before revealing!
Question 5
[Concept] A coin is tossed and a die is rolled. Find the probability of heads and a number greater than 44.
Try answering before revealing!
Question 6
[Concept] EE and FF are independent events with P(E)=13P(E) = \frac{1}{3} and P(F)=14P(F) = \frac{1}{4}. Find P(E∩F)P(E \cap F), P(E∪F)P(E \cup F), and the probability that neither happens.
Try answering before revealing!
Question 7
[Board Standard] A machine has 33 independent parts, and each works with probability 910\frac{9}{10}. Find the probability that (a) all three work, (b) at least one works.
Try answering before revealing!
Question 8
[Board Standard] A die is rolled once. Let EE be "the number is 11" and FF "the number is 22". Are EE and FF mutually exclusive? Are they independent?
Try answering before revealing!
Question 9
[Board Standard] A coin is tossed and a die is rolled. Find the probability of tails and a number greater than 44. Are the two events independent?
Try answering before revealing!
Question 10
[Board Standard] EE and FF are independent with P(E)=12P(E) = \frac{1}{2} and P(F)=13P(F) = \frac{1}{3}. Find P(E∩F)P(E \cap F), P(E∪F)P(E \cup F) and P(neither)P(\text{neither}).
Try answering before revealing!
Question 11
[Board Standard] Two dice are rolled. Are "the sum is 99" and "the first die is odd" independent?
Try answering before revealing!
Question 12
[Board Standard] Two dice are rolled. Are "the sum is 1010" and "the first die is even" independent?
Try answering before revealing!
Question 13
[Board Standard] A card is drawn from a deck. Are "the card is a queen" and "the card is black" independent?
Try answering before revealing!
Question 14
[HOTS] A card is drawn from a deck. Are "the card is an ace" and "the card is red" independent?
Try answering before revealing!
Question 15
[HOTS] A fair coin is tossed 33 times. Are "exactly two heads" and "the first toss is heads" independent?
Try answering before revealing!
Question 16
[HOTS] A machine has 44 independent parts, each working with probability 910\frac{9}{10}. Find the probability that (a) all four work, (b) at least one fails.
Try answering before revealing!
Question 17
[HOTS] EE and FF are independent with P(E)=25P(E) = \frac{2}{5} and P(F)=35P(F) = \frac{3}{5}. Find the probability that both happen, and the probability that exactly one happens.
Try answering before revealing!
Question 18
[HOTS] Two dice are rolled. Let EE be "the first die is 11 or 22" and FF "the sum is 1010 or more". Show that EE and FF are dependent by comparing P(E∩F)P(E \cap F) with the product.
Try answering before revealing!

13.4 Partition of Sample Space and Theorem of Total Probability

2,731 words · 12 min read

Before Bayes’ theorem can run, the possible causes must be sorted into a clean list. A set of events E1,E2,…,EnE_1, E_2, \dots, E_n is a partition of the sample space SS if:

  • [Concept] the events are complete: together they cover all of SS, that is E1∪E2∪⋯∪En=SE_1 \cup E_2 \cup \dots \cup E_n = S; no outcome is left homeless;
  • [Board Standard] the events are separate: no two of them can happen together, that is Ei∩Ej=∅E_i \cap E_j = \varnothing for i≠ji \ne j; no outcome is double-booked;
  • [HOTS] each event is possible: P(Ei)>0P(E_i) > 0 for every ii; empty cases are not allowed, because conditioning on them is meaningless.

In other words, every outcome belongs to exactly one of the events. Think of cutting a cake into slices: the slices do not overlap and together they make the whole cake. A partition is the cake-cutting of probability: it turns one big question into several small non-overlapping ones.

65/18= 65/36 67/12every outcome in exactly one slice
One bar, three slices, no gaps and no overlaps: every sum of two dice falls in exactly one slice, with shares 5/18, 5/36 and 7/12.

Read the bar as the whole sample space of two dice. The left slice holds sums below 6, the thin middle slice holds exactly 6, and the right slice holds sums above 6. The slice widths match the shares 5/18, 5/36 and 7/12, which add to 1. No sum belongs to two slices and no sum is missing: that is what a partition looks like.

  • [Concept] Roll two dice. "the sum is less than 66", "the sum is 66", and "the sum is more than 66" form a partition. Their probabilities are 518\frac{5}{18}, 536\frac{5}{36} and 712\frac{7}{12}, and they add up to 1.
  • [Board Standard] "The first die is even" and "the first die is odd" form a partition: every roll has an even or an odd first die, never both.
  • [Board Standard] In a deck of cards, the four suits form a partition. So do "aces" (113\frac{1}{13} of the deck), "face cards" (313\frac{3}{13}) and "number cards from 22 to 1010" (913\frac{9}{13}).
  • [HOTS] Any event EE with 0<P(E)<10 < P(E) < 1, together with its complement E′E', forms a partition. (Checked for EE = "the sum is 88".) This two-case partition is the workhorse of Bayes’ theorem: "the cause happened" versus "it did not".

The probabilities of the events in a partition always add to 11, because every outcome is counted exactly once. This is why priors in Bayes’ theorem must add to 11: they are the shares of a partition.

Each failure below breaks exactly one of the three conditions. Naming the broken condition is the skill being tested.

  • [Concept] "The first die is less than 44" and "the second die is less than 44". These overlap: (1,2)(1, 2) is in both. They also do not cover everything: (5,5)(5, 5) is in neither. Two conditions broken at once.
  • [Board Standard] "The sum is 77" and "the sum is 88". They are separate, but they do not cover all outcomes (for example the sum 55 is missing). Completeness fails.
  • [HOTS] "The first die is less than 77" and "the first die is more than 99". The second event is impossible, so it is not allowed in a partition. Possibility fails.
Common mistake: checking only one of the conditions. A partition needs all of them: complete, separate, and possible. "Separate" alone is not enough, and "complete" alone is not enough.

⚡ Quick Check Flashcards3 questions

Decide each case by testing all three conditions, and say which condition fails when the answer is no.

Question 1
[Concept] "the first die is 11 or 22", "the first die is 33 or 44", "the first die is 55 or 66";
Try answering before revealing!
Question 2
[Board Standard] "the sum is at most 77", "the sum is at least 77";
Try answering before revealing!
Question 3
[HOTS] "the sum is even", "the sum is odd".
Try answering before revealing!

Let E1,E2,…,EnE_1, E_2, \dots, E_n be a partition of SS, with P(Ei)>0P(E_i) > 0 for each ii, and let AA be any event. Because the EiE_i are complete and separate, the event AA splits into separate pieces A∩E1,A∩E2,…A \cap E_1, A \cap E_2, \dots: the part of AA that came through each cause. Adding their probabilities and using the multiplication theorem on each piece gives the theorem of total probability:

P(A)=P(E1) P(A∣E1)+P(E2) P(A∣E2)+⋯+P(En) P(A∣En).P(A) = P(E_1)\,P(A \mid E_1) + P(E_2)\,P(A \mid E_2) + \dots + P(E_n)\,P(A \mid E_n).

In words: the chance of AA is a weighted average of its chance in each case. If a cause were missing, its piece would never be added; if two causes overlapped, their shared piece would be counted twice.

There are three bags, each holding 55 balls. Bag AA has 33 red and 22 blue. Bag BB has 11 red and 44 blue. Bag CC has 44 red and 11 blue. One bag is chosen at random and one ball is drawn from it. What is the chance that the ball is red?

The three bags are a partition, each with chance 13\frac{1}{3}. The chance of red inside each bag is 35\frac{3}{5}, 15\frac{1}{5}, 45\frac{4}{5}. So

P(red)=13⋅35+13⋅15+13⋅45=15+115+415=815.(15=315,  115,  415=415    sum 815.)P(\text{red}) = \frac{1}{3} \cdot \frac{3}{5} + \frac{1}{3} \cdot \frac{1}{5} + \frac{1}{3} \cdot \frac{4}{5} = \frac{1}{5} + \frac{1}{15} + \frac{4}{15} = \frac{8}{15}. \qquad \left(\frac{1}{5} = \frac{3}{15}, \; \frac{1}{15}, \; \frac{4}{15} = \frac{4}{15}\;\; \text{sum } \frac{8}{15}.\right)

Listing all 1515 balls (each equally likely to be the one drawn) gives 815\frac{8}{15} as well: count the 88 red balls directly. The joint table collects the same calculation in the shape you will reuse for every Bayes problem.

bagshare P(bag)P(\text{bag})red rate P(red∣bag)P(\text{red} \mid \text{bag})joint P(bag and red)P(\text{bag and red})
AA13\frac{1}{3}35\frac{3}{5}15\frac{1}{5}
BB13\frac{1}{3}15\frac{1}{5}115\frac{1}{15}
CC13\frac{1}{3}45\frac{4}{5}415\frac{4}{15}
total815\frac{8}{15}

Read the table down the last column: each joint entry is its row share times its row red rate, and the total at the foot is exactly the total-probability sum. The three joint entries 1/5, 1/15 and 4/15 are the three red paths of the tree below.

Each path probability is found by multiplying along the branches. The three red paths (1/5, 1/15, 4/15) add up to 8/15 = P(red).

Read the tree as paths. The first fork chooses the bag, each with chance 1/3. The second fork draws the ball, with chances that depend on the bag: bag A gives red with 3/5 while bag B gives red with only 1/5. To find the chance of a path, multiply along its branches: 1/3 times 3/5 is 1/5 for the top red path. To find the chance of red, add the three red paths: 1/5 + 1/15 + 4/15 = 8/15. The tree and the table are the same calculation drawn two ways.

Now we can answer the reverse question. If we know the ball is red, how likely is it that it came from bag CC? Start from the definition of conditional probability, and use the multiplication theorem on the top and total probability on the bottom:

P(Ei∣A)=P(Ei∩A)P(A)=P(Ei) P(A∣Ei)∑j=1nP(Ej) P(A∣Ej).P(E_i \mid A) = \frac{P(E_i \cap A)}{P(A)} = \frac{P(E_i)\,P(A \mid E_i)}{\sum_{j=1}^{n} P(E_j)\,P(A \mid E_j)}.

This is Bayes’ theorem. The numerator is the chance of the path through EiE_i to AA, computed by the multiplication rule. The denominator is the chance of all paths to AA, computed by total probability. So Bayes’ theorem says: the new chance of a cause is its share of all the paths that lead to the effect. The old chances P(Ei)P(E_i) are called priors; the new chances P(Ei∣A)P(E_i \mid A) are called posteriors.

For the bags: P(C∣red)=415815=12P(C \mid \text{red}) = \dfrac{\frac{4}{15}}{\frac{8}{15}} = \frac{1}{2}. Divide numerator and denominator by their common structure: 415÷815=48=12\frac{4}{15} \div \frac{8}{15} = \frac{4}{8} = \frac{1}{2}. In the same way P(A∣red)=15815=38P(A \mid \text{red}) = \dfrac{\frac{1}{5}}{\frac{8}{15}} = \frac{3}{8} and P(B∣red)=115815=18P(B \mid \text{red}) = \dfrac{\frac{1}{15}}{\frac{8}{15}} = \frac{1}{8}. These three add up to 11, as they must, because the ball came from exactly one bag. Direct counting among the 88 red balls out of 1515 confirms the value for CC: 12\frac{1}{2}. Notice that bag CC started with chance 13\frac{1}{3} and, after seeing a red ball, its chance rose to 12\frac{1}{2}: red balls point at bag CC because it holds the most red.

A factory has three machines. Machine 11 makes half of all items (12\frac{1}{2}), machine 22 makes 310\frac{3}{10} and machine 33 makes 15\frac{1}{5}. The fractions of defective items are 150\frac{1}{50}, 120\frac{1}{20} and 110\frac{1}{10}. An item is chosen at random and is found to be defective. Which machine most likely made it? The trap answer is machine 11, which makes the most items. The correct answer needs Bayes’ theorem, because machine 33 is far more likely to make a defective one.

MachineShare P(Mi)P(M_i)Defective rate P(D∣Mi)P(D \mid M_i)ProductAfter the check P(Mi∣D)P(M_i \mid D)
1112\frac{1}{2}150\frac{1}{50}1100\frac{1}{100}29\frac{2}{9} ≈0.222\approx 0.222
22310\frac{3}{10}120\frac{1}{20}3200\frac{3}{200}13\frac{1}{3} ≈0.333\approx 0.333
3315\frac{1}{5}110\frac{1}{10}150\frac{1}{50}49\frac{4}{9} ≈0.444\approx 0.444

Read the products as paths: 12×150=1100\frac{1}{2} \times \frac{1}{50} = \frac{1}{100}, 310×120=3200\frac{3}{10} \times \frac{1}{20} = \frac{3}{200} and 15×110=150\frac{1}{5} \times \frac{1}{10} = \frac{1}{50}. The products add up to P(D)=9200P(D) = \frac{9}{200}, that is 4.5% of all items are defective. Dividing each product by this total gives the last column: 29\frac{2}{9}, 13\frac{1}{3} and 49\frac{4}{9}. Machine 33 makes the fewest items, but it makes the most defective ones, so it is the most likely source. The denominator is shared: compute the total once, then divide each path by it.

startM1 1/2M2 3/10M3 1/51/5049/501/2019/201/109/10D: 1/100ok: 49/100D: 3/200ok: 57/200D: 1/50ok: 9/50
The machine tree: branch chances, then path products. The three defective paths (1/100, 3/200, 1/50) add to 9/200.

Read this tree the same way as the bags tree. The first fork splits items by machine; each machine forks into a defective branch (D) and a good one (ok). The three D leaves carry 1/100, 3/200 and 1/50, adding to 9/200. Dividing the M3 leaf 1/50 by 9/200 gives 4/9: the tallest teal bar below.

Before the test (grey) and after finding a defective item (teal). Machine 3 makes the fewest items but has the highest defect rate, so it is the most likely source of a defective one.

Read the bars in pairs. Grey is each machine’s share of all items: machine 1 dominates at 0.50. Teal is its share among defective items: machine 3 now leads at about 0.44 while machine 1 drops to about 0.22. The evidence shifts belief from the biggest producer to the worst one.

Suppose 1%1\% of the components in a batch are faulty. A test flags 95%95\% of faulty components, but it also flags 4%4\% of good ones by mistake. A component is flagged. What is the chance that it is really faulty? Most people guess about 95%95\%. They confuse the test’s hit rate with the answer. Count in a batch of 10 00010\,000:

  • [Concept] Faulty components: 100100. The test flags 9595 of them (100×1920=95100 \times \frac{19}{20} = 95).
  • [Board Standard] Good components: 9 9009\,900. The test flags 396396 of them by mistake (9 900×125=3969\,900 \times \frac{1}{25} = 396).
  • [HOTS] Total flagged: 95+396=49195 + 396 = 491. Only 9595 of these are faulty.

So P(faulty∣flagged)=95491=95491≈0.1935P(\text{faulty} \mid \text{flagged}) = \dfrac{95}{491} = \frac{95}{491} \approx 0.1935, about 19.3%. Bayes’ theorem gives the same: 1100⋅19201100⋅1920+99100⋅125\dfrac{\frac{1}{100} \cdot \frac{19}{20}}{\frac{1}{100} \cdot \frac{19}{20} + \frac{99}{100} \cdot \frac{1}{25}}. Compute the denominator piece by piece: 1100×1920=192000\frac{1}{100} \times \frac{19}{20} = \frac{19}{2000} and 99100×125=992500\frac{99}{100} \times \frac{1}{25} = \frac{99}{2500}, and the sum is 49110000\frac{491}{10000}. The surprise comes from the fact that good components are far more common, so even a small mistake rate flags many of them. A positive result from a rare-condition test is weak evidence on its own.

Common mistake: confusing P(A∣E)P(A \mid E) with P(E∣A)P(E \mid A). The test catches 95%95\% of faulty components, P(flagged∣faulty)=0.95P(\text{flagged} \mid \text{faulty}) = 0.95. But the chance that a flagged component is faulty, P(faulty∣flagged)P(\text{faulty} \mid \text{flagged}), is only about 0.190.19. Always check which event is after the bar: the hit rate and the answer live on opposite sides of it.
How to solve a Bayes problem: (1) name the causes (they must form a partition) and write their chances; (2) write the chance of the effect for each cause; (3) multiply each pair; (4) add the products to get the total; (5) divide the product for the cause you want by the total. Table first, then divide.

⚡ Quick Check Flashcards3 questions

Work each one through the five steps above: priors, rates, products, total, divide.

Question 1
[Concept] Bag XX has 22 red and 22 blue balls. Bag YY has 11 red and 33 blue balls. A fair coin chooses the bag, and one ball is drawn. It is red. Find the chance it came from bag XX.
Try answering before revealing!
Question 2
[Board Standard] 5%5\% of the parts in a batch are faulty. A test flags 90%90\% of faulty parts and 10%10\% of good parts. A part is flagged. Find the chance it is faulty.
Try answering before revealing!
Question 3
[HOTS] A die is rolled. If it shows 66, a ball is drawn from bag XX (11 red, 11 blue). Otherwise it is drawn from bag YY (11 red, 22 blue). The ball is red. Find the chance bag XX was used.
Try answering before revealing!

13.5 Bayes' Theorem and Multi-Stage Probability Trees

1,526 words · 7 min read

So far you calculated the chance of an effect when the cause was known. For example: "machine AA makes a part, so what is the chance the part is defective?" Real life often goes the other way. A product is found defective, and you ask: which machine made it? A person tests positive, and you ask: is the person really ill? You find a red ball, and you ask: which bag did it come from?

These are reverse questions. You know P(defective∣machine A)P(\text{defective} \mid \text{machine } A), the chance of the clue given the cause, and you want P(machine A∣defective)P(\text{machine } A \mid \text{defective}), the chance of the cause given the clue. These are not the same number, and you cannot just swap them. Swapping a conditional probability without recomputing is the most expensive mistake in this chapter. Bayes’ theorem turns one into the other.

To state it we first need two ideas: a partition of the sample space (a way to split all the possible causes into separate cases that cover everything), and the theorem of total probability (a way to add up the chance of the effect across all the causes). The plan for this section is:

(1) split the situation into separate, complete cases; (2) add the chance of the effect across all cases; (3) divide to find how much each case contributed. Steps 1 and 2 build the denominator; step 3 is one division.
  • 13.5.1 makes "separate and complete" exact: partitions, with dice and card examples.
  • 13.5.2 builds the total from the parts, states Bayes’ theorem, and works through three full examples: bags, machines and a medical-style test.

Bayes' theorem applies only when the causes form a partition: exactly one of them happened, and the list covers every possibility. If two causes can happen together, or some possibility is missing, the theorem does not apply until the cases are fixed. Watch for this condition in every example below.

⚡ Quick Check Flashcards18 questions
Question 1
[Concept] Box XX has 44 red and 66 blue balls. Box YY has 77 red and 33 blue balls. A fair coin decides the box (heads: XX, tails: YY), and a ball is drawn from that box. (a) Find the chance of red. (b) Given that the ball is red, find the chance it came from box YY.
Try answering before revealing!
Question 2
[Concept] Production line PP makes 70%70\% of the items of a factory and line QQ makes 30%30\%. Of the items from PP, 2%2\% are defective, and of the items from QQ, 5%5\% are defective. (a) Find the chance that a random item is defective. (b) A defective item is found. What is the chance it came from QQ?
Try answering before revealing!
Question 3
[Concept] A die is rolled. If it shows 11 or 22, a ball is drawn from bag AA (which has 22 red and 22 blue balls). Otherwise a ball is drawn from bag BB (33 red and 11 blue). (a) Find the chance of red. (b) Given red, find the chance that bag AA was used.
Try answering before revealing!
Question 4
[Concept] 2%2\% of the components in a batch are faulty. A test flags 90%90\% of the faulty components and wrongly flags 5%5\% of the good ones. A component is flagged. What is the chance it is faulty?
Try answering before revealing!
Question 5
[Concept] A die is rolled. If it shows 11, 22 or 33 use bag XX; if 44 or 55 use bag YY; if 66 use bag ZZ. The chance of drawing a red ball is 34\frac{3}{4} from XX, 12\frac{1}{2} from YY and 14\frac{1}{4} from ZZ. A red ball is drawn. Find the chance it came from XX.
Try answering before revealing!
Question 6
[Concept] For events AA and BB: P(A)=35P(A) = \frac{3}{5}, P(B∣A)=14P(B \mid A) = \frac{1}{4} and P(B∣A′)=12P(B \mid A') = \frac{1}{2}. Find P(B)P(B) and P(A∣B)P(A \mid B).
Try answering before revealing!
Question 7
[Board Standard] In a multiple-choice test, a student knows the answer to a question with chance 23\frac{2}{3}. Otherwise the student guesses among 44 choices. Find the chance that an answer is correct, and the chance that the student really knew the answer given that it is correct.
Try answering before revealing!
Question 8
[Board Standard] One coin is fair and the other has heads on both sides. A coin is chosen at random and tossed. It shows heads. What is the chance that it is the two-headed coin?
Try answering before revealing!
Question 9
[Board Standard] Bag PP has 33 red and 11 blue ball. Bag QQ has 11 red and 33 blue balls. A die is rolled: scores 11 to 44 choose bag PP, otherwise bag QQ. A ball drawn from the chosen bag is red. Find the chance bag PP was chosen.
Try answering before revealing!
Question 10
[Board Standard] Factory AA makes 60%60\% of the bulbs and factory BB makes 40%40\%. Of AA’s bulbs 1%1\% are defective, and of BB’s 5%5\% are defective. A bulb is found defective. Find the chance it came from BB.
Try answering before revealing!
Question 11
[Board Standard] Bag XX has 55 red and 55 blue balls. Bag YY has 77 red and 33 blue balls. A fair coin chooses the bag. A blue ball is drawn. Find the chance bag YY was chosen.
Try answering before revealing!
Question 12
[Board Standard] Two cards are drawn from a deck without replacement. Use the theorem of total probability (first card heart or not) to show that the chance the second card is a heart is 14\frac{1}{4}.
Try answering before revealing!
Question 13
[Board Standard] 10%10\% of the parts in a batch are faulty. A test flags 80%80\% of faulty parts and 5%5\% of good parts. A part is flagged. Find the chance it is faulty.
Try answering before revealing!
Question 14
[HOTS] Three machines make 50%50\%, 25%25\% and 25%25\% of the items, with defective rates 1%1\%, 2%2\% and 4%4\%. A defective item is found. Find the chance it came from the third machine.
Try answering before revealing!
Question 15
[HOTS] A student knows the answer with chance 12\frac{1}{2}. Otherwise the student guesses among 55 choices. An answer is correct. Find the chance the student knew it.
Try answering before revealing!
Question 16
[HOTS] A box holds two fair coins and one two-headed coin. A coin is picked at random and tossed. It shows heads. Find the chance it is the two-headed coin.
Try answering before revealing!
Question 17
[HOTS] For events AA and BB: P(A)=14P(A) = \frac{1}{4}, P(B∣A)=12P(B \mid A) = \frac{1}{2} and P(B∣A′)=16P(B \mid A') = \frac{1}{6}. Find P(B)P(B) and P(A∣B)P(A \mid B).
Try answering before revealing!
Question 18
[HOTS] Two dice are rolled. Given that the sum is 99, find the probability that the first die shows 33.
Try answering before revealing!

13.6 Miscellaneous Worked Examples

888 words · 4 min read

The examples below mix every tool of the chapter: conditional probability, the multiplication rule, independence and Bayes’ theorem. Each one says which tool it uses and why. Work them in order: the tools pile up.

Two dice are rolled. Given that the sum is at least 1010, find the chance that at least one die shows 66. The sum is at least 1010 in 66 outcomes: (4,6),(5,5),(5,6),(6,4),(6,5),(6,6)(4, 6), (5, 5), (5, 6), (6, 4), (6, 5), (6, 6) (chance 16\frac{1}{6}). Five of them contain a 66. So the answer is 56\frac{5}{6}. The tool is conditional probability: shrink to the 66 large-sum outcomes, then count.

Two cards are drawn from a deck without replacement. What is the chance that the second card is an ace? Split by the first card, which forms the partition "ace / not ace". If the first is an ace (chance 113\frac{1}{13}), the second is an ace with chance 351\frac{3}{51}. If not (chance 1213\frac{12}{13}), it is 451\frac{4}{51}. Total probability gives 113⋅351+1213⋅451=113\frac{1}{13} \cdot \frac{3}{51} + \frac{12}{13} \cdot \frac{4}{51} = \frac{1}{13}. This is the same as the chance that the first card is an ace: symmetry, because no position in a shuffled deck is special. (Listing all 26522652 ordered pairs agrees.) Now reverse the question with Bayes’ theorem: given that the second card is an ace, the chance that the first was an ace is 113⋅351113=117\dfrac{\frac{1}{13} \cdot \frac{3}{51}}{\frac{1}{13}} = \frac{1}{17}. Counting ordered pairs directly agrees: 117\frac{1}{17}.

Two independent alarms detect a fault with chances 45\frac{4}{5} and 710\frac{7}{10}. Both detect: 45⋅710=1425\frac{4}{5} \cdot \frac{7}{10} = \frac{14}{25}. Neither detects: 15⋅310=350\frac{1}{5} \cdot \frac{3}{10} = \frac{3}{50}. At least one detects: 1−350=47501 - \frac{3}{50} = \frac{47}{50}. Exactly one detects: 45⋅310+15⋅710=1950\frac{4}{5} \cdot \frac{3}{10} + \frac{1}{5} \cdot \frac{7}{10} = \frac{19}{50}. The three cases (both, exactly one, neither) form a partition: 1425+1950+350=1\frac{14}{25} + \frac{19}{50} + \frac{3}{50} = 1. The tool is independence plus complements: with independent alarms, multiply for "and" and subtract from 11 for "at least one".

Bag II has 33 red and 22 blue balls. Bag IIII has 22 red and 33 blue balls. One ball is moved at random from bag II to bag IIII, and then a ball is drawn from bag IIII. Find the chance that it is red. If it is red, what is the chance that the moved ball was red?

The moved ball is red with chance 35\frac{3}{5}. Then bag IIII has 33 red out of 66, so the chance of red is 12\frac{1}{2}. The moved ball is blue with chance 25\frac{2}{5}. Then bag IIII has 22 red out of 66, so the chance is 13\frac{1}{3}. So P(red)=35⋅12+25⋅13=1330P(\text{red}) = \frac{3}{5} \cdot \frac{1}{2} + \frac{2}{5} \cdot \frac{1}{3} = \frac{13}{30}. By Bayes’ theorem, P(moved red∣drawn red)=3/101330=913P(\text{moved red} \mid \text{drawn red}) = \dfrac{3/10}{\frac{13}{30}} = \frac{9}{13}. The tool is total probability for the first question (the moved ball is the partition) and Bayes’ theorem for the reverse.

Suppose P(F)=12P(F) = \frac{1}{2}, P(E∣F)=15P(E \mid F) = \frac{1}{5} and P(E)=14P(E) = \frac{1}{4}. Then P(E∩F)=P(F) P(E∣F)=110P(E \cap F) = P(F)\,P(E \mid F) = \frac{1}{10}. Next, P(E∪F)=14+12−110=1320P(E \cup F) = \frac{1}{4} + \frac{1}{2} - \frac{1}{10} = \frac{13}{20}. And P(F∣E)=P(E∩F)P(E)=1101/4=25P(F \mid E) = \dfrac{P(E \cap F)}{P(E)} = \dfrac{\frac{1}{10}}{1/4} = \frac{2}{5}. Notice that P(E∣F)≠P(F∣E)P(E \mid F) \ne P(F \mid E): 15\frac{1}{5} against 25\frac{2}{5}. The tools are the multiplication theorem run backwards, then the addition rule, then the definition of conditional probability.

Five parts pass a checking station. Each part is defective with chance 14\frac{1}{4}, independently. What is the chance that exactly one part is defective? One fixed pattern, say "first defective, rest good", has chance 14×34×34×34×34=14×81256=811024\frac{1}{4} \times \frac{3}{4} \times \frac{3}{4} \times \frac{3}{4} \times \frac{3}{4} = \frac{1}{4} \times \frac{81}{256} = \frac{81}{1024} by the multiplication rule. There are 55 choices for which part is the defective one, and the patterns are disjoint, so P=5×811024=4051024P = 5 \times \frac{81}{1024} = \frac{405}{1024}. The computer listed all 45=10244^5 = 1024 equally likely outcome rows and agrees: 4051024\frac{405}{1024}. The tool is the binomial pattern from Section 13.4, now with an uneven chance.

Same 5 trials, different success rates. At p = 1/2 the distribution is symmetric; at p = 1/4 it leans left and 1 success (405/1024) is most likely.

Read the grouped bars as two experiments side by side. Grey is a fair coin tossed 55 times (p=12p = \frac{1}{2}): symmetric, peaking at 22 and 33 heads with 516\frac{5}{16} each. Teal is the quality check (p=14p = \frac{1}{4}): tallest at 11 defective part with 4051024\frac{405}{1024}, then falling, with 55 defectives almost invisible at 11024\frac{1}{1024}. Both sets of six bars add to 11. Changing the per-trial chance slides the whole distribution: rare events per trial make small counts dominate.

13.7 Miscellaneous Exercise on Probability

951 words · 4 min read

⚡ Quick Check Flashcards18 questions
Question 1
[Concept] A fair coin is tossed 33 times. Given that the three results are not all the same, find the chance of at least two heads.
Try answering before revealing!
Question 2
[Concept] Two cards are drawn from a deck without replacement. Find the chance that both have the same suit.
Try answering before revealing!
Question 3
[Concept] Two dice are rolled. Given that neither die shows a 66, find the chance that the sum is even.
Try answering before revealing!
Question 4
[Concept] AA and BB are independent events with P(A)=12P(A) = \frac{1}{2} and P(A∪B)=35P(A \cup B) = \frac{3}{5}. Find P(B)P(B).
Try answering before revealing!
Question 5
[Concept] A box holds new, used and old batteries in the proportions 14\frac{1}{4}, 12\frac{1}{2} and 14\frac{1}{4}. They last a full year with chances 910\frac{9}{10}, 35\frac{3}{5} and 15\frac{1}{5}. A battery picked at random lasts a full year. What is the chance that it was a new one?
Try answering before revealing!
Question 6
[Concept] Two dice are rolled. EE is "the first die is even" and FF is "the sum is 77". Show that EE and F′F' ("the sum is not 77") are independent.
Try answering before revealing!
Question 7
[Board Standard] A fair coin is tossed 33 times. Find the chance of three heads, given that the first toss is heads.
Try answering before revealing!
Question 8
[Board Standard] A bag has 55 red and 55 blue balls. Three balls are drawn without replacement. Find the chance that all three have the same colour.
Try answering before revealing!
Question 9
[Board Standard] Two dice are rolled. Given that the first die shows 55, find the chance that the sum is 1111.
Try answering before revealing!
Question 10
[Board Standard] Two cards are drawn from a deck without replacement. Find the chance that both cards are red.
Try answering before revealing!
Question 11
[Board Standard] Two dice are rolled. Are "the sum is 66" and "the second die is 44" independent?
Try answering before revealing!
Question 12
[Board Standard] Bag AA has 11 red and 44 blue balls. Bag BB has 44 red and 11 blue ball. A fair coin chooses the bag, and a red ball is drawn. Find the chance bag BB was chosen.
Try answering before revealing!
Question 13
[Board Standard] A fair coin is tossed 44 times. Given that the first toss is heads, find the chance of exactly 22 heads in total.
Try answering before revealing!
Question 14
[HOTS] AA and BB are independent with P(A)=frac310P(A) = \\frac{3}{10} and P(B)=frac12P(B) = \\frac{1}{2}. Find P(AcupB)P(A \\cup B) and P(A′capB′)P(A' \\cap B').
Try answering before revealing!
Question 15
[HOTS] Three independent alarms detect a fault, each with chance 45\frac{4}{5}. Find the chance that (a) all three detect it, (b) none detects it.
Try answering before revealing!
Question 16
[HOTS] A die is rolled 33 times. Find the chance that no roll shows a 66.
Try answering before revealing!
Question 17
[HOTS] A card is drawn from a deck. Given that it is a number card from 22 to 1010, find the chance it is a 77.
Try answering before revealing!
Question 18
[HOTS] A box holds two fair coins and one two-headed coin. A coin is picked and tossed twice. Both tosses show heads. Find the chance the coin is the two-headed one. (Hint: use heads-twice rates 14\frac{1}{4} and 11.)
Try answering before revealing!

13.8 Chapter Summary and Probability Decision Matrix

274 words · 1 min read

The chapter moves in one direction: from counting, to counting with a clue, to chaining events, to reversing the question.

  • Conditional probability: P(E∣F)=P(E∩F)P(F)P(E \mid F) = \dfrac{P(E \cap F)}{P(F)}, for P(F)≠0P(F) \ne 0. Equivalently, count only the outcomes in FF. The clue becomes the new sample space.
  • Properties: 0≤P(E∣F)≤10 \le P(E \mid F) \le 1; P(F∣F)=1P(F \mid F) = 1; P(E′∣F)=1−P(E∣F)P(E' \mid F) = 1 - P(E \mid F); P((E∪G)∣F)=P(E∣F)+P(G∣F)−P((E∩G)∣F)P\big((E \cup G) \mid F\big) = P(E \mid F) + P(G \mid F) - P\big((E \cap G) \mid F). The clue after the bar never changes inside one calculation.
  • Multiplication theorem: P(E∩F)=P(E) P(F∣E)=P(F) P(E∣F)P(E \cap F) = P(E)\,P(F \mid E) = P(F)\,P(E \mid F). For three events, P(E∩F∩G)=P(E) P(F∣E) P(G∣E∩F)P(E \cap F \cap G) = P(E)\,P(F \mid E)\,P(G \mid E \cap F). Multiply along a tree path.
  • Independent events: P(E∩F)=P(E) P(F)P(E \cap F) = P(E)\,P(F), which means P(E∣F)=P(E)P(E \mid F) = P(E). Complements of independent events are independent. Mutually exclusive events with non-zero probability are never independent.
  • Three events are mutually independent only if every pair is independent and P(A∩B∩C)=P(A) P(B) P(C)P(A \cap B \cap C) = P(A)\,P(B)\,P(C).
  • Repeated trials (binomial pattern): for nn independent trials with success chance pp, count the orders with kk successes and multiply by the chance of one order. Fair coins give a symmetric distribution; small pp pushes the peak towards 00.
  • Partition: events E1,…,EnE_1, \dots, E_n that are separate, complete and possible. Their probabilities add up to 11.
  • Total probability: P(A)=∑P(Ei) P(A∣Ei)P(A) = \sum P(E_i)\,P(A \mid E_i): a weighted average over the cases.
  • Bayes’ theorem: P(Ei∣A)=P(Ei) P(A∣Ei)∑jP(Ej) P(A∣Ej)P(E_i \mid A) = \dfrac{P(E_i)\,P(A \mid E_i)}{\sum_j P(E_j)\,P(A \mid E_j)}. Numerator and denominator computed separately, then divided.
  • Do not confuse P(A∣E)P(A \mid E) with P(E∣A)P(E \mid A): the hit rate of a test is not the chance that a flagged case is real.
End of book
You have reached the end