Learn with Amar
Teaching video
A teaching recording for this chapter has not been published yet. Start with the worked example below and explore the related animations where available.
Browse grades and teaching videos01 · Read and understand
What you will learn
- Distinguish reversed conditional probabilities.
- Build expected counts from a probability model.
- Calculate and interpret a posterior probability.
Before you start
Percentages, multiplication of conditional probabilities, and fractions.
Keep paper nearby. Read the question once for the context, then again to identify what is known and what you need to find.
Start with a question
A fictional process produces 2% defective items. A screen flags 90% of defective items and 5% of nondefective items. Given a flag, what is the probability of a defect?
Why this math matters
A screen's ability to detect defects is not the same as the probability that a flagged item is defective. When most items are nondefective, even a small false-flag rate can produce many flagged good items. Bayes' theorem organizes the comparison by combining the initial defect rate with the screen's conditional behavior.
Set up the model
A useful answer starts with clear assumptions:
- The given rates apply to the same stable population and screening procedure.
- Every item is either defective or nondefective under the defined criterion.
- The 10,000-item table below contains expected model counts, not observed inspection results.
02 · Work through the example
Follow the reasoning, one step at a time.
Try to predict the next step before reading it. After each calculation, explain why the operation makes sense and how it helps answer the original question.

Work through it with Amar
See this example unfold.
The complete worked example, one idea at a time.
Does a flagged item probably have a defect?
PausedQuestion: Start with the question. Paused.
Question
Start with the question
A fictional process produces 2% defective items. A screen flags 90% of defective items and 5% of nondefective items. Given a flag, what is the probability of a defect?
Before you calculate
Read what is known and what you need to find. Make a prediction before moving to the first calculation.
Starts paused. Play advances through the full text at a reading pace; pause whenever you need more time. Previous, Next, and the phase buttons let you set your own pace. Playback pauses when this walkthrough leaves the screen or you switch tabs.
Your device’s reduced-motion setting keeps each phase still. Manual controls remain available. The full written solution stays below.
Separate the initial groups
10,000 × 0.02 = 200 defective; 9,800 nondefective
A convenient population size converts the base rate into readable expected counts. Choosing a different size would yield the same final ratio.
Count the expected flags
defective flags = 200(0.90) = 180; false flags = 9,800(0.05) = 490
Apply each conditional flag rate to its own group, not to the entire population.
Restrict attention to flagged items
P(defect | flag) = 180/(180 + 490) = 18/67 ≈ 0.2687
The denominator includes every expected flag. Only 180 of those 670 flags come from defective items.
The result
Under this model, a flagged item has about a 26.9% probability of being defective.
The flag raises the probability from 2% to about 26.9%, so it is informative. However, a 90% detection rate does not make every flag 90% reliable. A follow-up inspection may be useful, depending on actual costs and procedures.
Common mistakes to catch
- P(flag | defect) = 90% is not P(defect | flag).
- Ignoring the large nondefective group omits most flags in this example.
03 · Practice independently
Try it before revealing the answer.
Use paper or a calculator as needed. Write your units and reasoning, then open the hint or explanation to check your approach.
Practice 1
If the defect rate becomes 10% but both screen rates stay the same, find P(defect | flag).
Show a hint
Compare 0.10(0.90) with 0.90(0.05).
Reveal answer and explanation
2/3 ≈ 66.7%
0.09/(0.09 + 0.045) = 2/3. Changing the base rate changes the posterior.
Practice 2
In the original model, what fraction of all items are flagged?
Show a hint
Add the two disjoint ways to be flagged.
Reveal answer and explanation
6.7%
0.02(0.90) + 0.98(0.05) = 0.018 + 0.049 = 0.067.
Take the idea with you
When interpreting a flag or alert, ask for the base rate and both conditional flag rates before reversing the probability.
04 · Reflect and continue
Can you explain it in your own words?
Before moving on, explain the main idea without looking at the worked example. Try both practice questions, check your reasoning, and name one mistake you now know how to avoid. Return to a step if you still need support.
Up next: How can expected demand be less than one item?
Completion is your own study record, not a test score. It stays in this browser, does not sync to another device, and can be removed by clearing browser data.