
Two supplier crates with inspection tags and a small green flagged component. Original AI-generated artwork produced for GreenCalc; not a measured diagram or empirical data display.
Use a flag as evidence about a named hypothesis
Suppose a component comes from a batch in which 10% of parts are defective. An inspection flags 80% of defective parts and 20% of nondefective parts. The question is the probability that a part is defective after it is flagged. Define A as defective and B as flagged. The three inputs are P(A) = 10%, P(B | A) = 80% and P(B | not A) = 20%.
Build the denominator from both routes to a flag
In a hypothetical 1,000 parts, there are 100 defective parts and 900 nondefective parts in expectation. Eighty defective parts are flagged, but so are 180 nondefective parts. The total expected flagged count is 260. The posterior is therefore 80/260, about 30.7692%. Using the 80% detection rate as the answer would reverse the conditioning.
Check whether the prior belongs to this batch
The 10% prior must describe the population from which this part was selected before the flag was observed. A historical average across all suppliers may be unsuitable for a batch already known to come from a high-defect process. Likewise, detection rates measured under laboratory conditions may not transfer to a different inspection protocol. Bayes' theorem keeps the arithmetic consistent; it does not establish that your input rates are valid.
Use the result to clarify the next question
The Bayes' Theorem Calculator reports the posterior and the probability of seeing the evidence. If no model pathway can produce the observed flag, the posterior is undefined, and the tool asks you to inspect the inputs. A cost-based decision to reject or retest parts requires another step; probability alone does not determine the preferred action. For repeated evidence, see when likelihood ratios can be multiplied. For a population-count explanation of rare-event alerts, use the False Positive Paradox Calculator, whose focus is natural frequencies and prevalence.
Check the model behind your result
Use the Bayes' Theorem Calculator for the supported calculation and review its stated assumptions before interpreting the output. Find related tools in the Statistics category, or browse the GreenCalc homepage for other calculation topics.
By GreenCalc Editorial Team · Updated 2026-10-26
