AP EAMCET study materials
AP EAMCET study resources

Bayesian Diagnosis of a Defective Bulb

AP EAMCET · Put your knowledge to work in context.

All case studies

Bayesian Diagnosis of a Defective Bulb

A quality engineer at a bulb plant knows that Machine A makes 60% of daily output and Machine B makes 40%. Historical records show 2% of A’s bulbs are defective and 5% of B’s are defective. A random bulb from the day’s mixed output is tested and found defective. The plant can either stop Machine A for a day (costing ₹40,000) or stop Machine B (costing ₹25,000). The engineer wants to use the defective-bulb evidence to decide which machine is more likely to have produced it, and then to test a batch of five bulbs from A. The plant will only stop a machine if the posterior probability that it produced the defective bulb is at least 0.60. A second proposal is to reduce B’s defect rate to 2% by extra inspection; the engineer must estimate how that changes the posterior probability for A.

1. Compute the probability that the defective bulb came from each machine. Should the engineer stop a machine on this evidence?

Read the worked answer

Let A = from Machine A, B = from Machine B, D = defective. P(A) = 0.60, P(B) = 0.40, P(D|A) = 0.02, P(D|B) = 0.05.

P(D) = 0.60 × 0.02 + 0.40 × 0.05 = 0.012 + 0.020 = 0.032. P(A|D) = 0.012/0.032 = 0.375. P(B|D) = 0.020/0.032 = 0.625.

B is more likely, but neither posterior reaches the 0.60 stop threshold. On the evidence of one defective bulb, the engineer should not stop either machine; one bulb is weak evidence, and the rule is not met.

2. If B’s defect rate is reduced to 2%, what is the new posterior probability for A? What does the decision rule now imply?

Read the worked answer

With P(D|B) = 0.02: P(D) = 0.60 × 0.02 + 0.40 × 0.02 = 0.012 + 0.008 = 0.020. P(A|D) = 0.012/0.020 = 0.60.

The threshold is exactly met, so the rule would justify stopping A-not because A got worse, but because B improved and the same defective-bulb evidence now points proportionally more to A. This shows that the decision depends on the base rates and the comparison between machines, not on the defective bulb alone.

3. For five bulbs sampled from A, find the probability that at most one is defective.

Read the worked answer

Let X be the number of defective bulbs in five from A. X ~ Binomial(n = 5, p = 0.02). P(X ≤ 1) = P(X = 0) + P(X = 1) = (0.98)⁵ + 5(0.02)(0.98)⁴.

(0.98)⁵ = 0.9039. 5 × 0.02 × (0.98)⁴ = 0.10 × 0.9224 = 0.0922. P(X ≤ 1) = 0.9039 + 0.0922 = 0.9961.

There is about a 99.6% chance that a five-bulb sample from A contains at most one defective. A sample with two or more would be unusual (about 0.4%) and worth investigating.