When a process happens in stages and the probabilities in the second step depend on how the first step turned out, we need a way to map out the possibilities instead of keeping track of changing numbers in our head.
1
Mapping a Two-Stage Process
Suppose we want to find the overall chance that you arrive late to work tomorrow. In your town, it rains on 20% of mornings (0.2) and is clear on the other 80% (0.8). When it rains, traffic gets backed up and there is a 50% chance (0.5) you are late; when the skies are clear, there is only a 10% chance (0.1) you are late.
Mapping a Two-Stage Process with a Tree
P(Late)=?
RainClear→coin toss→almost never late
Once the stages are mapped out as branches from left to right, we need to turn the branch numbers into the probability of each full start-to-finish path and combine the paths where you arrive late.
Multiplying Along Paths and Adding Endpoints
Text solution
Check that each split adds to 1Every morning reaching a dot must follow one of the branches leaving that dot, so the branches at each fork add to 1.
0.2+0.80.5+0.50.1+0.9=1=1=1
Multiply along each path to find the endpointsOnly a fraction of the mornings on a first-stage branch continue down a second-stage branch, so we multiply the branch probabilities along each path.
Rain, then LateRain, then On TimeClear, then LateClear, then On Time=0.2×0.5=0.10=0.2×0.5=0.10=0.8×0.1=0.08=0.8×0.9=0.72
Add the Late endpoints togetherRainy late mornings and clear late mornings are two separate groups of days that both end with you arriving late, so we add their endpoint probabilities.
Overall Late=0.10+0.08=0.18
So you show up late on 18% of all mornings: 10% coming from rainy mornings and 8% coming from clear mornings.
Because the second stage takes a fraction of a first-stage branch, changing a first-stage split rescales both of its endpoints, while all four endpoints still add up to all 100 mornings.
Each second-stage fork splits only the mornings that reach its branch, while all four endpoints together always add up to all 100 mornings.
2
Reversing the Condition
So far we have moved forward in time from the weather to your arrival at work, where the branch number 0.5 tells us the chance you are late if it is raining. Now suppose a coworker in a windowless office sees you walk in late and wants to know the reverse: given that you are late, what is the probability that it is raining outside?
Reversing the Condition
Text solution
Cross out the endpoints that did not happenSince your coworker sees that you are late, neither On Time path happened today, narrowing the remaining possibilities down to just the two Late endpoints.
All Late mornings=0.10+0.08=0.18
Divide the rainy-late endpoint by all late endpointsAmong just the late mornings, we find the share that came from the Rain path (where the vertical bar ∣ is read "given that": the outcome after the bar is what we already observed, not division).
So seeing you walk in late raises the probability of rain from 20% on a normal morning to 55.6%, because slightly more of your late mornings come from rain (0.10) than from clear skies (0.08).
3
Drawing Without Replacement
In the commute problem, the second-stage probabilities were already given to us. When you draw items one after another without putting the first one back, you have to build the second-stage fractions yourself because the first grab changes what is left for the second grab.
Suppose a kitchen drawer holds 10 loose batteries (7 Charged and 3 Dead) and you grab two batteries one after the other without replacement. We want to find the probability that both batteries are charged, the probability that exactly one is charged, and the reversed probability that the first battery is charged given that the second battery tests dead.
Drawing Without Replacement
Text solution
Update the drawer counts for the second grabPulling one battery out of the 10-battery drawer leaves 9 batteries behind and drops the count of whichever type was pulled on the first grab by 1.
Multiply along each path and keep the common denominatorLeaving all four endpoints over 10×9=90 instead of simplifying early makes it easy to add and compare them in the next steps.
Charged, then ChargedCharged, then DeadDead, then ChargedDead, then Dead=107×96=9042=107×93=9021=103×97=9021=103×92=906
Read the single endpoint where both are chargedOnly the top path gives two charged batteries, which we simplify at the end.
Both Charged=9042=157≈0.467
Add both orders for exactly one charged batteryGetting one charged and one dead battery happens in two ways, Charged then Dead (7×3) and Dead then Charged (3×7), so we add both mixed endpoints together.
Exactly one Charged=9021+9021=9042=157≈0.467
Cross out the second-charged endpoints to reverse the conditionWhen the second battery tests dead, only the two endpoints ending in Dead (9021 and 906) remain, and because both are already over 90, we can compare their numerators directly.
So there is a 157 (46.7%) chance of grabbing two charged batteries, the same 157 (46.7%) chance of grabbing one of each, and if the second battery tests dead, a 97 (77.8%) chance that the first battery sitting on the counter is charged, matching the 7 charged batteries among the other 9 original batteries.
Whatever the starting mix of batteries, pulling one on the first grab lowers that type's fraction on the second grab, yet the two mixed endpoints (Charged then Dead, and Dead then Charged) always have the exact same probability out of 90.
When you grab two batteries without putting the first one back, the first grab changes what is left for the second grab, yet both ways to get a mixed pair always have the same chance.
4
Rare Events and False Alarms
Reversing a tree is especially useful when a condition is rare and a test's high accuracy rate tempts us to guess a number that is way too high.
At a computer chip factory, only 1% (0.01) of all chips are Defective while 99% (0.99) are Fine. An automated scanner catches 90% (0.90) of Defective chips by ringing an alarm, and falsely rings an alarm on 10% (0.10) of Fine chips. If the alarm rings on a chip, what is the probability that the chip is actually defective?
Rare Events and False Alarms
Text solution
Multiply along the two paths that trigger the alarmSince the alarm just rang, we only need the two endpoints that end in Alarm: one coming from the tiny Defective branch and one coming from the huge Fine branch.
Defective, then Alarm=0.01×0.90=0.009Fine, then Alarm=0.99×0.10=0.099
Divide the true-alarm endpoint by all alarms combinedWe compare the true-alarm endpoint against the total of both alarm endpoints.
So when the alarm goes off, there is only a 121 (8.3%) chance the chip is actually defective, because a 10% false-alarm rate on the massive 99% Fine group produces eleven times as many alarms (0.099) as a 90% catch rate on the tiny 1% Defective group (0.009).
Even with the scanner's 90% catch rate and 10% false-alarm rate held fixed, false alarms outnumber true alarms whenever defective chips are rare, and true alarms only pull ahead once the incoming Defective branch is wide enough.
With a fixed 90% catch rate and 10% false-alarm rate, true alarms only outnumber false alarms once the incoming Defective branch is wide enough.
5
Choosing the First Stage and Bayes' Theorem
When you read a word problem from scratch, you have to decide which event belongs on the first stage of your tree and which belongs on the second stage before you can calculate anything.
Choosing the First Stage and Bayes' Theorem
Whenever you reverse a condition on a tree, the fraction you build from the endpoints is called Bayes' Theorem:
Reversed Probability=All the paths that endthe way you observedThe one path you’re testing
Key concepts
Picking the first stage
Follow the time order when actions happen one after another (1st battery grab on the first stage, 2nd grab on the second stage). When time order isn't given, look for which numbers have an "if" attached: put the unconditional probabilities with no "if" attached on the first stage (0.2 Rain, 0.8 Clear) and the conditional "if" probabilities on the second stage (0.5 Late if Rain). At every fork, the branches leaving a dot must add to 1.
Multiplying vs. adding
Multiply along a single path because you are taking a fraction of a fraction (Rain, then Late=0.2×0.5=0.10). If a problem asks for one specific two-stage path ("both batteries are charged" or "a domestic flight that departs late"), stop right after multiplying that path; do not add other paths or divide. Add endpoints only when multiple separate paths produce the outcome ("overall chance of arriving late" combines 0.10+0.08=0.18; "exactly one battery is charged" combines both orders, 9021+9021=9042).
Drawing without replacement
Removing an item on the first grab drops the total and that item's count by 1 on the second stage (after pulling 1 of 7 Charged batteries from 10, the next Charged branch is 96). Keep all endpoints over their unsimplified common denominator (10×9=90) until the very last step.
When to reverse the condition (and when not to)
If the known condition is already on the first stage ("if it rains, what is the chance you are late?"), just read the second-stage branch (0.5) directly. Only reverse the condition when you are told how the second stage ended ("given that you arrived late, what is the chance it rained?"). Cross out the endpoints that didn't happen and take your target path's share of the remaining endpoints:
Reversed Probability=All the paths that endthe way you observedThe one path you’re testing(P(Rain∣Late)=0.10+0.080.10=1810)
6
Practice
1
At an airport, 30% of flights are international and the rest are domestic. Among domestic flights, 85% depart on time and the rest depart late. What is the probability that a randomly selected flight is a domestic flight that departs late?
Subtract from 1 at each fork rather than multiplying the given 0.30 and 0.85 directly (which would give 0.255) or keeping 0.85 for on-time domestic flights (which would give 0.70×0.85=0.595).Since we want a single two-stage path (Domestic, then Late), multiply along that path (do not add the branches to get 0.85).
Each split leaving a dot must add up to 1: what fraction of all flights are domestic, and within that branch, what fraction depart late?
Find the missing branch at each splitSubtract from 1 at each fork rather than multiplying the given 0.30 and 0.85 directly (which would give 0.255) or keeping 0.85 for on-time domestic flights (which would give 0.70×0.85=0.595).
DomesticLate given Domestic=1−0.30=0.70=1−0.85=0.15
Multiply along the single pathSince we want a single two-stage path (Domestic, then Late), multiply along that path (do not add the branches to get 0.85).
Domestic, then Late=0.70×0.15=0.105 (or 10.5%)
2
If a student studies in the library, there is an 80% chance they finish their assignment. If they study in their dorm room, there is a 40% chance they finish. Suppose 25% of students study in the library and the rest study in their dorm room. What is the overall probability that a randomly chosen student finishes their assignment?
Multiply each location branch by its finishing rate rather than averaging 0.80 and 0.40 to get 0.60.Don't stop at the Library endpoint (0.20) alone; combine both groups of students who finish their assignment.
Even though the finishing rates are mentioned first in the problem, which probabilities have no "if" attached and belong on the first stage of the tree?
Put the unconditional study location on the first stageLibrary is 0.25 and Dorm is 1−0.25=0.75. Multiply each location branch by its finishing rate rather than averaging 0.80 and 0.40 to get 0.60.
Library, then FinishDorm, then Finish=0.25×0.80=0.20=0.75×0.40=0.30
Add both Finish endpointsDon't stop at the Library endpoint (0.20) alone; combine both groups of students who finish their assignment.
Overall Finish=0.20+0.30=0.50 (or 50%)
3
A box contains 8 markers: 5 working and 3 dried out. You grab two markers one after the other without putting the first one back. What is the probability that exactly one of the two markers you grab is working?
Because the first marker is not replaced, only 7 markers remain for the second grab (leaving the denominator at 8 would give 6430=3215).Counting only the first order leaves you with half the answer (5615); add both paths that result in one of each.
How many markers are left in the box on the second grab, and how many different paths end with one working marker and one dried-out marker?
Multiply along each mixed path with the updated denominatorBecause the first marker is not replaced, only 7 markers remain for the second grab (leaving the denominator at 8 would give 6430=3215).
Working, then Dried outDried out, then Working=85×73=5615=83×75=5615
Add both orders togetherCounting only the first order leaves you with half the answer (5615); add both paths that result in one of each.
Exactly one Working=5615+5615=5630=2815 (or about 53.6%)
4
Only 2% of packages passing through a warehouse contain fragile glass. An automated scanner flags 95% of packages that contain glass, and falsely flags 5% of packages that do not contain glass. If the scanner flags a package, what is the probability that the package actually contains fragile glass?
Multiply each flagging rate by the fraction of packages that enter that branch; skipping the first stage and comparing 0.95 to 0.95+0.05 would just give back 0.95.Don't stop at the single path 0.019; divide by the total of both flagged endpoints.
Find both endpoints where the scanner flags a package: how large is the 5% false-alarm share of the 98% No Glass branch compared to the 95% share of the 2% Glass branch?
Multiply along both paths that end in a flagged packageMultiply each flagging rate by the fraction of packages that enter that branch; skipping the first stage and comparing 0.95 to 0.95+0.05 would just give back 0.95.
Glass, then Flagged=0.02×0.95=0.019No Glass, then Flagged=0.98×0.05=0.049
Divide the true-glass endpoint by all flagged endpointsDon't stop at the single path 0.019; divide by the total of both flagged endpoints.
P(Glass∣Flagged)=0.019+0.0490.019=0.0680.019=6819 (or about 27.9%)
5
A bag holds 12 keys: 4 open a storage room and 8 do not. A janitor pulls one key out of the bag and puts it in their pocket without trying it, then pulls a second key out of the bag and tries it in the lock. Given that the second key opens the storage room, what is the probability that the first key in the janitor's pocket also opens the storage room?
On the top path, pulling one working key first leaves only 3 working keys among the remaining 11 (using 114 again gives 13216 and leads to the wrong answer 31).Don't stop at the single path 13212=111; compare the numerators across both remaining endpoints over 132.
Keep the endpoint fractions over the common denominator 12×11=132, and cross out the two endpoints where the second key does not open the room.
Find the two endpoints where the second key opens the roomOn the top path, pulling one working key first leaves only 3 working keys among the remaining 11 (using 114 again gives 13216 and leads to the wrong answer 31). On the bottom path, pulling a non-working key first leaves all 4 working keys among the remaining 11.
Open, then OpenNot Open, then Open=124×113=13212=128×114=13232
Divide the both-open endpoint by all second-open endpointsDon't stop at the single path 13212=111; compare the numerators across both remaining endpoints over 132.
P(1st Open∣2nd Open)=13212+1323213212=4412=113 (or about 27.3%)