Combine the Paths That Lead to the Same Outcome
A tree diagram can show more than one way for a final outcome to occur. For example, a factory product might come from any of several production lines, and a product from any line could be defective. To find the overall probability of a defect, account for each possible line and add the probabilities of the paths that end in “defective.”
This builds on Conditional Probability with Tree Diagrams. As in that tutorial, multiply the probabilities along one complete path to find the probability that the path occurs. The new step here is to combine several complete paths that lead to the same outcome.
For a factory, let \(L_1,L_2,\ldots,L_k\) represent the possible production lines, and let \(D\) represent the event that a randomly selected product is defective. The line categories must cover every product and must not overlap: each product comes from exactly one of the lines. If \(P(L_i)>0\), the complete-path probability for “line \(L_i\), then defective” is \(P(L_i)P(D\mid L_i)\). Adding the paths gives:
This is a way to find a probability across all products when the defect probability can differ by line. Each line’s defect probability is weighted by the proportion of products from that line. The result is called the total probability of a defect in this setting.
Read the Tree Before Doing the Arithmetic
In a two-stage tree for this problem, the first branches identify a product’s line. From each line, the next branches show whether that product is defective or not defective. A route from the start of the tree through both stages is a complete path. For instance, “Line A, then defective” is one complete path.
Confirm that every selected product comes from exactly one listed line and that the line probabilities sum to 1.
For each line, multiply its probability by the conditional probability of a defect given that line.
The “defective” paths are distinct, so their probabilities can be added to find the overall defect probability.
Describe the chance that a product selected at random from the factory’s output is defective, considering all the lines.
The paths being added are mutually exclusive: the same product cannot have come from Line A and Line B. They are also exhaustive for the event “defective”: a defective product must have come from one of the listed lines. This is why adding those path probabilities gives the probability of the target outcome.
Do not add the conditional defect probabilities by themselves. For example, the defect rate on Line A describes products from Line A, not all factory products. The overall result must reflect how much each line contributes to the factory’s output. A line that makes more products has more weight in the total.
Worked Example: Overall Defect Probability Across Three Lines
Worked Example: Overall Defect Probability Across Three Lines
A fictional factory makes the same kind of component on three production lines. A randomly selected component comes from Line A with probability \(0.50\), Line B with probability \(0.30\), or Line C with probability \(0.20\). The probabilities that a component is defective, given its line, are \(0.02\) for Line A, \(0.04\) for Line B, and \(0.05\) for Line C. Find and interpret the probability that a randomly selected component is defective.
State: Let \(D\) be the event that the selected component is defective. Its possible production lines are A, B, and C. The requested probability is the overall \(P(D)\), not the defect probability for just one line.
Plan: Use the tree-diagram path rule from Conditional Probability with Tree Diagrams: multiply the probability of each line by the conditional defect probability for that line. Then add the three complete-path probabilities. The line categories are mutually exclusive because one component comes from one line, and they are exhaustive because every component comes from one of the three lines. Their probabilities sum to \(0.50+0.30+0.20=1.00\). Each line’s defect and not-defect branches make up that line’s products; for example, \(0.02+0.98=1\) for Line A.
Do: Find the probability of each path that ends in “defective”:
These three paths are disjoint, so add their probabilities:
As a check, the three line probabilities sum to 1, and each path contribution is no larger than its line probability. The calculated total, \(0.032\), is between 0 and 1. In percent form, \(0.032=3.2\%\).
Conclude: According to this probability model, a randomly selected component from the factory’s combined output has probability \(0.032\) of being defective. Equivalently, 3.2% of the factory’s output is predicted to be defective by this model.
Why the Line Probabilities Matter
The overall probability is not generally the simple average of the line defect probabilities. In the three-line example, the unweighted average would be \((0.02+0.04+0.05)/3\), or about \(0.0367\). That treats the three lines as if they contribute equal numbers of products. But the stated output proportions are \(0.50\), \(0.30\), and \(0.20\), so the correct calculation weights each line’s defect rate by its share of production.
You can also think of each product as following one route through the tree. First it comes from a particular line; then it is either defective or not defective. The overall defect event includes the “defective” endpoint after Line A, the “defective” endpoint after Line B, and the “defective” endpoint after Line C. Adding only those matching endpoints is the tree-diagram version of adding probabilities for disjoint ways an event can occur.
Notice that this calculation does not require the defect event and the production-line event to be independent. The conditional probabilities \(P(D\mid L_i)\) allow the defect chance to vary by line. The product \(P(L_i)P(D\mid L_i)\) is the probability of that particular line-and-defect path, as in the general multiplication rule.
Worked Example: Account for Different Production Shares
Worked Example: Account for Different Production Shares
A fictional factory makes sealed food containers on a day shift and an evening shift. The day shift produces \(55\%\) of the containers, and the evening shift produces the other \(45\%\). The conditional probability of a seal defect is \(0.012\) for a day-shift container and \(0.028\) for an evening-shift container. Find the overall probability that a randomly selected container has a seal defect.
State: Let \(D\) be the event that a selected container has a seal defect. The first-stage categories are day shift and evening shift, and the target outcome can occur on either shift.
Plan: The shift categories are mutually exclusive and exhaustive, and their probabilities sum to \(0.55+0.45=1\). For each shift, multiply its production share by its conditional defect probability. Add the two resulting path probabilities. The remaining branch probabilities are \(1-0.012=0.988\) for no seal defect on the day shift and \(1-0.028=0.972\) for no seal defect on the evening shift, so each pair of outcome branches sums to 1.
Do: Calculate the two paths that end in a seal defect:
Add the disjoint paths:
The evening shift has the higher conditional defect probability, and it also contributes \(45\%\) of production. Its path probability is therefore \(0.0126\), compared with \(0.0066\) for the day-shift defect path. Together, the two paths account for the overall defect probability.
Conclude: Under this model, the probability that a randomly selected container from the factory’s combined output has a seal defect is \(0.0192\), or 1.92%.
Check the Model and the Calculation
A tree diagram should represent a complete chance process. The first-stage categories need to include every possible source for the selected product. Their probabilities should sum to 1. From each source, the next-stage outcomes should include every possible outcome relevant to the question. For a defective/not-defective split, those conditional probabilities should sum to 1 within each line.
A useful arithmetic check is to calculate all complete paths, not just the paths of interest, and confirm that their probabilities sum to 1. For a two-line tree, for instance, the four paths are “Line 1 and defective,” “Line 1 and not defective,” “Line 2 and defective,” and “Line 2 and not defective.” If the branches are correctly specified, the four path probabilities sum to 1. You do not need to do this check every time, but it can reveal a missing branch or a multiplication error.
Worked Example: Compare the Overall Rate with a Target
Worked Example: Compare the Overall Rate with a Target
A fictional electronics factory uses three machines to make a particular sensor. Machine X makes \(40\%\) of the sensors, Machine Y makes \(35\%\), and Machine Z makes \(25\%\). Their conditional probabilities of producing a sensor with a wiring defect are \(0.030\), \(0.020\), and \(0.060\), respectively. The factory’s target is an overall wiring-defect probability below \(0.040\). Find the modeled overall probability and decide whether it is below the target.
State: Let \(D\) be the event that a randomly selected sensor has a wiring defect. The event can occur along any of the three machine paths.
Plan: The machine categories are mutually exclusive and exhaustive, with probabilities \(0.40+0.35+0.25=1\). Multiply each machine’s production share by its conditional defect probability, then add the three defect paths. Each machine’s complementary no-defect branch is \(0.970\), \(0.980\), or \(0.940\), respectively; each pair of outcome branches sums to 1.
Do: Find each defect-path probability:
Add the three disjoint paths and compare the result with the target:
The modeled overall probability is \(0.034\), or \(3.4\%\). The target probability is \(0.040\), or \(4.0\%\), and \(0.034<0.040\).
Conclude: The model gives an overall wiring-defect probability of \(0.034\), or 3.4%, which is below the factory’s 4.0% target.
Common Mistakes and AP Exam Tips
- Adding conditional probabilities instead of path probabilities. The values \(P(D\mid L_i)\) describe rates within individual lines. Multiply each one by its line probability before adding.
- Taking an unweighted average. A simple average assumes the lines contribute equally. Use the stated production proportions as weights unless the chance process says each line is equally likely.
- Forgetting a possible source. If a line or production shift is omitted, the listed first-stage categories may not cover all products. Check that the branch probabilities sum to 1.
- Adding overlapping paths. The paths used for this calculation must be distinct complete routes. “Line A and defective” and “Line B and defective” cannot both describe the same selected product.
- Reporting only the arithmetic. A complete contextual conclusion names the selected item and the outcome. For example: “The probability that a randomly selected container from the factory’s combined output has a seal defect is 0.0192.”
- Mixing up a path probability and a conditional probability. \(P(D\mid L_i)\) is the defect rate among products from Line \(i\). \(P(L_i)P(D\mid L_i)\) is the probability that a randomly selected product is both from Line \(i\) and defective.
For a full-credit solution, identify the event, show the multiplication for every path leading to that event, add those path probabilities, and give a conclusion in context. As in Interpreting a Conditional Probability in Context, be specific about what is being selected; here, the conclusion concerns a product from the factory’s combined output, not a product from one particular line.
Check Your Understanding
For each question, show the path calculations and interpret any requested total probability in context.
- A fictional factory gets \(60\%\) of its parts from Line A and \(40\%\) from Line B. The defect probabilities given the line are \(0.01\) and \(0.04\). Find the overall defect probability.
- Why is it not generally correct to add \(P(D\mid A)\) and \(P(D\mid B)\) to find \(P(D)\)?
- A plant’s day shift makes \(70\%\) of its packages and has a leak probability of \(0.02\). The night shift makes \(30\%\) and has a leak probability of \(0.05\). Find the probability that a randomly selected package leaks.
- In a tree diagram, what two checks can help show that the first-stage branches represent all possible sources for a product?
- Explain the difference between \(P(D\mid A)\) and \(P(A)P(D\mid A)\) when \(A\) means that a product came from Line A and \(D\) means it is defective.