The alert population is a selected population
A warehouse uses a screening rule to flag packages for a second inspection. Suppose 2% of packages contain the defined defect, the rule flags 90% of defective packages, and it also flags 5% of nondefective packages. These are three separate inputs: a base rate, a true-positive probability and a false-positive probability. The 90% figure conditions on already being defective. It is not the fraction of flagged packages that are defective.
Imagine 10,000 packages governed by exactly these proportions. There are 200 defective and 9,800 nondefective packages. The rule flags 180 of the defective packages and 490 of the nondefective packages, producing 670 flags. Only 180/670, about 26.87%, of flagged packages are defective. The larger population of nondefective packages supplies more false flags even though its flag probability is much smaller. The numbers are expected counts under the stated probabilities, not a claim that every finite batch will realize those counts exactly.
A useful table retains every cell: defective/flagged 180; defective/not flagged 20; nondefective/flagged 490; nondefective/not flagged 9,310. The row totals describe defect status and the column totals describe the selection made by the rule. Check that all four cells sum to 10,000 before dividing. Conditioning means restricting the denominator to the relevant row or column, not choosing whichever denominator is convenient.
Derive the reversal from the joint events
Let D mean defective and F mean flagged. The joint probability P(D and F) equals P(F|D)P(D), which is .9×.02=.018. The flag probability has two mutually exclusive contributions: P(F)=P(F|D)P(D)+P(F|not D)P(not D)=.018+.049=.067. Therefore P(D|F)=.018/.067≈.268657. This is Bayes' reversal expressed by ordinary joint-probability arithmetic.
Do not multiply the marginal probabilities P(D) and P(F) unless independence is justified. Here independence is contradicted by the stated operating characteristics: a defective package has a much higher flag probability. Independence and mutual exclusivity are also different. Defect and flag can occur together, so they are not mutually exclusive; they are not independent either. Mutually exclusive events with positive probabilities cannot be independent, because their joint probability is zero while the product of their positive marginal probabilities is not.
The odds form provides a cross-check. Prior odds are .02/.98=1/49. A positive flag multiplies those odds by the likelihood ratio .9/.05=18. Posterior odds are 18/49, giving posterior probability 18/(18+49)=18/67. Odds and probability use different denominators; writing posterior odds as if they were a probability would produce another error. If a second rule shares the first rule’s inputs, do not multiply two likelihood ratios as though the two flags were conditionally independent without investigating their dependence.
Decision thresholds require consequences as well as probabilities
Suppose releasing a defective package has an assigned loss of 100 units, while an additional inspection costs 10 units and, for this deliberately simplified model, detects and resolves every defect without other cost. For a flagged package, releasing has expected loss 100p and inspecting has loss 10. Inspection has the smaller expected loss when p>.10. The threshold follows from the stipulated losses and perfect-inspection assumption, not from a universal rule that any probability above a particular percentage is actionable. Capacity, delay, inspection errors and unequal defect severity would change this model.
At the original base rate, the flagged-package probability .268657 exceeds .10. If the base rate falls to .1% while both flag probabilities remain unchanged, expected flagged counts per 10,000 are 9 defective and 499.5 nondefective packages. The flagged-package defect probability becomes 9/508.5≈.017699. Under the same loss model, the expected loss of release is now about 1.77, below the inspection cost of 10. Fractional expected counts are legitimate model quantities; they should not be reported as actual observed half-packages.
This comparison is not an instruction to release real packages or ignore safety rules. It demonstrates how an explicit decision model depends on a target population and consequences. Before using a rule operationally, verify its calibration on the intended stream, the definition and ascertainment of defects, and all applicable constraints. A base-rate change can alter the meaning of the same alert. Likewise, reviewing only flagged packages can leave the miss rate unmeasured. Preserve a valid reference process for unflagged cases rather than treating an unobserved outcome as a confirmed absence of defects.
Worked example: The negative result answers another conditional question
Among 9,330 unflagged packages, 20 are defective. Thus P(D|not F)=20/9330≈.002144. This differs from the miss probability P(not F|D)=20/200=.10. The first describes the residual defect fraction among unflagged packages; the second describes how many defective packages the rule misses. Both are needed for an operational review, and neither can replace the other.
Worked example: Expected loss is a comparison, not a confidence statement
With p=180/670, release has assigned expected loss about 26.87 and inspection 10. The difference depends on the stipulated model. If inspection instead costs 30, its loss exceeds 26.87 and the preferred action in this narrow model reverses. Uncertainty in p or in the loss amounts calls for sensitivity analysis. The arithmetic does not establish that the selected action is legally permissible, safe or optimal under omitted consequences.