Discrete MathematicsProbability, Conditioning and Expectation3 of 9
Probability, Conditioning and Expectation · 3
Conditional Probability and the Multiplication Rule
When we learn a new piece of information about an outcome, we need a way to update our probabilities to reflect what is still possible.
1
Shrinking the Universe
We want to find the probability of an event after we already know another event has happened.
Shrinking the Universe
Text solution
Shrink the universe to the given conditionCrossing out the 60 clear mornings leaves only the 40 cloudy mornings as our new denominator:
New universe (Cloudy)=40
Keep only the overlap that remains inside the new universeOf the 25 rainy days, 5 happened on clear mornings and were crossed out, leaving the 20 days that were both cloudy and rainy on top:
P(R∣C)=4020=21=50%
Whether we count the outcomes directly or divide both parts by all 100 days to use probabilities, we are comparing the remaining overlap to the shrunken universe:
P(Rgiven that∣C)=new universeP(C)P(R and C)overlap still inside=0.400.20=21
The vertical bar ∣ means "given that". It is not a division sign, and everything to the right of the bar is the condition that shrinks the universe.
Once we narrow down to cloudy mornings, rainy days outside the cloudy boundary never count toward P(R∣C). Only the overlap inside the shrunken universe counts.
Once the universe shrinks to the 40 cloudy mornings, only the rainy days inside that boundary count.
2
Counting the Shrunken Universe
When a problem gives us a group to choose from instead of pre-counted totals, we have to count the shrunken universe and the remaining overlap ourselves. Here we pick a 3-person committee from 6 Seniors and 4 Juniors (10 students in total), and we are told that the committee has at least one Junior.
Counting the Shrunken Universe
Text solution
Count the shrunken universe by crossing out the complementSubtract the C(6,3) all-Senior committees (which have no Juniors) from the C(10,3) total committees to get the new denominator:
New universe (at least 1 Junior)=C(10,3)−C(6,3)=120−20=100
Question A: Count committees with exactly 2 Juniors inside the new universeEvery committee with 2 Juniors from the 4 and 1 Senior from the 6 already has at least one Junior, so none were crossed out:
P(2 Juniors∣at least 1 Junior)=100C(4,2)×C(6,1)=1006×6=10036=36%
Question B: Count committees with Alex (a Senior) that remain inside the new universeAlex is on C(9,2) committees in total, but we must subtract the C(5,2) committees where Alex is paired with two other Seniors and zero Juniors:
P(Alex∣at least 1 Junior)=100C(9,2)−C(5,2)=10036−10=10026=26%
3
The Multiplication Rule
Sometimes we don't start with the overlap. Instead, events happen one step after another in a sequence, and we want to find the probability that every step in the chain happens. Here we draw marbles from a bag of 3 Green and 2 Red marbles (5 in total) and want the probability that our draws are all Green.
The Multiplication Rule
Text solution
Find the probability of the first stepOn the first draw, 3 of the 5 marbles in the bag are green:
P(1st Green)=53
Update the bag and find the probability of the second stepKeeping the first green marble leaves 4 marbles in the bag with 2 greens remaining:
P(2nd Green∣1st Green)=42
Multiply along the chainWe get the second green marble on 42 of the 53 of the time we got the first green marble, so we multiply the step probabilities together:
P(1st Green and 2nd Green)=53×42=206=103=30%
Extend the chain to a third green marble without replacementOne green marble is left out of the 3 remaining marbles in the bag, so we multiply by the third step:
P(all 3 Green)=53×42×31=606=101
Multiplying both sides of our conditional probability equation by P(A) gives the Multiplication Rule for any two events A and B:
P(A and B)=P(A)×P(B∣A)
If we put the first marble back into the bag before drawing again, the bag still has 3 greens out of 5, so P(2nd Green∣1st Green)=53. When the first event does not change the probability of the second event at all, the events are independent:
independent eventsP(B∣A)=P(B)
4
Reversing a Condition with a Tree
Now suppose we know the probability of a result given each starting branch, such as the defect rate at each factory, and want to flip the question around to find the probability that a defective item came from a specific factory. Factory A supplies 60% of a company's laptop batteries with a 5% defect rate, and Factory B supplies the remaining 40% with a 10% defect rate.
Reversing a Condition with a Tree
Text solution
Question 1: Multiply along the top branch for Factory A and defectiveA laptop's battery must come from Factory A (60%) and, given that, be defective (5%):
P(A and Defective)=0.60×0.05=0.03=3%
Multiply along the other defective branch and add to find the defective universeFactory B contributes 0.40×0.10=4% defective laptops, and because the two factory branches don't overlap, we add them to get all defective laptops:
P(Defective)=3%+4%=7%
Question 2: Divide the Factory A defective branch by the total defective universeGiven that a battery is defective, we cross out the good branches and find Factory A's share of the 7% defective pool:
P(A∣Defective)=P(Defective)P(A and Defective)=7%3%=73
Which factory produces more of the defective batteries depends on both its defect rate and its share of all batteries: here Factory B's higher defect rate (10% vs. 5%) outweighs Factory A's larger share of production (60% vs. 40%), so more defective batteries still come from Factory B (4% vs. 3%).
Even though Factory A has a lower defect rate than Factory B, giving Factory A a large enough share of total production makes most of the defective laptops come from Factory A.
Key concepts
Conditional probability and the multiplication rule use the same relationship between an overlap and a shrunken universe in two directions:
Shrinking the universe (Conditional Probability)
When a problem tells you that C has happened, treat C as the new denominator and keep only the part of R that lies inside C:
P(R∣C)=P(C)P(R and C)
Out of 40 cloudy mornings, if 20 are both cloudy and rainy, P(Rain∣Cloudy)=4020=21. If you have to count the groups yourself, any outcome crossed out of the denominator must also be crossed out of the numerator.
Multiplying along a chain (The Multiplication Rule)
When events happen one after another and you want the probability that the whole sequence happens together, multiply the steps and update the universe after each step:
P(A and B)=P(A)×P(B∣A)
Drawing 2 green marbles without replacement from 3 green and 2 red is 53×42=103.
When the universe does not change (Independence)
After the first event, check whether the universe changed for the next step. If the first outcome does not change the second probability (like putting the marble back in the bag, where P(2nd Green∣1st Green)=53=P(2nd Green)), the events are independent (P(B∣A)=P(B)), and you do not adjust the second fraction when multiplying.
Reversing a condition with a tree (Bayes' Theorem)
When you know P(Defective∣A) on the branches of a tree but need the flipped probability P(A∣Defective), multiply along each branch to find the pieces that end at Defective (0.60×0.05=3% and 0.40×0.10=4%), add those non-overlapping pieces to get the shrunken defective universe (3%+4%=7%), and divide the target branch by that total (7%3%=73).
5
Practice
1
In a group of 80 students, 35 play an instrument, 28 sing in the choir, and 14 do both. If a randomly chosen student plays an instrument, what is the probability that they also sing in the choir?
For the top, watch out for using all 28 choir students (which gives 3528=54) or dividing by the 28 choir students instead of the instrument players (which gives 2814=21).
Which group is the given condition that goes in the denominator, and how many choir students are inside that group?
Knowing the student plays an instrument shrinks the universe from 80 students down to the 35 instrument players, which goes on the bottom. For the top, watch out for using all 28 choir students (which gives 3528=54) or dividing by the 28 choir students instead of the instrument players (which gives 2814=21). Only the 14 students in the overlap who play an instrument and sing in the choir remain inside the shrunken universe:
P(Choir∣Instrument)=3514=52
2
At a software company, 45% of all bug reports are marked high priority, and 18% of all bug reports are both marked high priority and fixed within an hour. Given that a bug report is marked high priority, what is the probability that it is not fixed within an hour?
Be careful not to stop at 52(40%), which is the probability that a high-priority report is fixed within an hour.
Within the 45% of bug reports that are high priority, what percentage are not fixed within an hour?
The given condition shrinks our universe to the 45% of bug reports marked high priority. Inside that high-priority universe, 18% are fixed within an hour, which is a fraction of 0.450.18=52. Be careful not to stop at 52(40%), which is the probability that a high-priority report is fixed within an hour. Subtracting the 18% that are fixed from the 45% high-priority group leaves 45%−18%=27% that are high priority and not fixed within an hour:
P(Not Fixed∣High)=0.450.45−0.18=0.450.27=53
3
A security team of 4 people is chosen at random from 5 engineers and 4 managers (9 people in total). Given that the team has at least one manager, what is the probability that Jordan (one of the 5 engineers) is on the team?
Don't put all 56 of Jordan's teams over 121 (which gives 12156): when we crossed out the all-engineer teams, we also crossed out the C(4,3)=4 teams where Jordan was paired with 3 of the other 4 engineers and no managers.
After you subtract the all-engineer teams from the total number of teams, check how many of Jordan's teams were also all-engineer teams.
There are C(9,4)=126 total teams of 4, and C(5,4)=5 of them have only engineers and no managers, so the shrunken universe is 126−5=121 teams with at least one manager. In the full group of 9 people, Jordan is on C(8,3)=56 teams (choosing the other 3 teammates from the remaining 8 people). Don't put all 56 of Jordan's teams over 121 (which gives 12156): when we crossed out the all-engineer teams, we also crossed out the C(4,3)=4 teams where Jordan was paired with 3 of the other 4 engineers and no managers. Crossing those 4 teams out of the numerator leaves 56−4=52 teams:
P(Jordan∣at least 1 Manager)=C(9,4)−C(5,4)C(8,3)−C(4,3)=126−556−4=12152
4
A box of 12 flash drives contains 8 working drives and 4 corrupted drives. You pick 3 drives at random one after another without replacement. What is the probability that the first two drives you pick are corrupted and the third one works?
Watch out for leaving the denominator at 12 as if drawing with replacement (which gives 124×124×128=272) or reducing the number of working drives on top to 6 (which gives 553): since the first two drives picked were corrupted, all 8 working drives are still in the box.
Write the fraction for each of the 3 draws in sequence, updating the total drives left and the count of the type you want after each pick.
On the first pick, 4 of the 12 drives are corrupted (124). Given that the first was corrupted, 3 corrupted drives remain out of 11 drives on the second pick (113). On the third pick, 10 drives remain in the box. Watch out for leaving the denominator at 12 as if drawing with replacement (which gives 124×124×128=272) or reducing the number of working drives on top to 6 (which gives 553): since the first two drives picked were corrupted, all 8 working drives are still in the box:
You roll a fair six-sided die once. Let A be the event that the roll is even, B be the event that the roll is at most 4, and C be the event that the roll is at least 4. Which of B or C is independent of A?
Don't assume B and C behave the same way just because both have 2 outcomes inside A, and don't confuse independence with having zero overlap: we compare each conditional probability to its starting probability before knowing A.
Find P(B) and P(C) on the full die first, then shrink the universe to A={2,4,6} and check which probability stayed the same.
Before learning A, the full die {1,2,3,4,5,6} gives P(B)=64=32 for {1,2,3,4} and P(C)=63=21 for {4,5,6}. Shrinking the universe to the even rolls A={2,4,6} leaves 3 outcomes: 2 of them (2 and 4) belong to B, and 2 of them (4 and 6) belong to C, so P(B∣A)=32 and P(C∣A)=32. Don't assume B and C behave the same way just because both have 2 outcomes inside A, and don't confuse independence with having zero overlap: we compare each conditional probability to its starting probability before knowing A. Since P(B∣A)=32=P(B) while P(C∣A)=32=21=P(C),B is independent of A, and C is not.
6
An online store ships 50% of its orders with Carrier X, 30% with Carrier Y, and 20% with Carrier Z. Packages arrive late 4% of the time with Carrier X, 5% of the time with Carrier Y, and 10% of the time with Carrier Z. Given that a customer's package arrives late, what is the probability that it was shipped with Carrier Z?
Watch out for ignoring the order shares and just dividing Carrier Z's 10% late rate by 4%+5%+10% (which gives 1910).
Multiply along each carrier's branch to find the percentage of all orders that are both from that carrier and late, then add all three late branches for the new denominator.
Multiplying along each carrier's late branch gives the share of all orders that are late from each carrier: 0.50×0.04=2% from Carrier X, 0.30×0.05=1.5% from Carrier Y, and 0.20×0.10=2% from Carrier Z. Watch out for ignoring the order shares and just dividing Carrier Z's 10% late rate by 4%+5%+10% (which gives 1910). We must weight each late rate by how often that carrier is used. Adding the three late branches gives a shrunken universe of 2%+1.5%+2%=5.5% late packages in total, with 2% coming from Carrier Z: