A semiconductor fab produces chips where 2% are defective. A built-in self-test (BIST) accurately detects a defective chip 95% of the time, but also falsely flags a good chip as defective 1% of the time. If a chip is flagged as defective by the BIST, what is the probability that it is ACTUALLY defective?
Using Bayes' Theorem: Let D be Defective, F be Flagged. P(D) = 0.02. P(~D) = 0.98. P(F|D) = 0.95. P(F|~D) = 0.01. We want P(D|F) = [P(F|D) P(D)] / [P(F|D) P(D) + P(F|~D) P(~D)] P(D|F) = (0.95 0.02) / [ (0.95 0.02) + (0.01 0.98) ] P(D|F) = 0.019 / [ 0.019 + 0.0098 ] = 0.019 / 0.0288 = 0.6597. This means there is approximately a 66% chance the flagged chip is actually defective.