# Percentage of a failure given probability of failure

Lets say I have a screen with $10^6$ pixels and the probability of a pixel failing is $p=10^{-6}$. What would be the percentage of unacceptable screens/failures if acceptable screens don't have more than 3 dead pixels?

Is this an example of a binomial distribution where the probability of an unacceptable screen is $1-P(1 \text{ failed pixel})-P(2 \text{ failed pixels})-P(3 \text{ failed pixels})$ ?

• That looks right to me. – Jabernet Feb 25 '17 at 0:19
• @Jabernet: Except as noted in the answer below. – BruceET Feb 25 '17 at 0:55

Your count of defective pixels is $X \sim \mathsf{Binom}(n = 10^6, p =10^{-6}),$ which has $E(X) = np = 1.$ The exact probability of an unacceptable screen can be computed using the binomial PDF formula or with software. From R statistical software the result is $P(X > 3) = 1 - [P(X = 0) + P(X = 1) + P(X = 2) + P(X = 3)] = 0.0190:$

1 - pbinom(3, 10^6, 10^-6)
##  0.0189881


Usually, $p$ is the binomial 'Success' probability, but you've defined the events counted by $X$ as 'failed' pixels. Your method is OK, except you have not accounted for $P(X = 0).$

Most practitioners would use an approximation, letting $X' \sim \mathsf{Pois}(\lambda = 1),$ where $E(X') = \lambda = 1.$ Then $$P(X' > 3) = 1 - e^{-\lambda}(1 + \lambda/1! + \lambda^2/2! + \lambda^3/3!) = 0.9810.$$

 1 - ppois(3, 1)
##  0.01898816

x = 0:3;  lam = 1;  pdf = exp(-lam)*lam^x/factorial(x);  1 - sum(pdf)
## 0.01898816


Because the 'expected' number of failures is 1, and the screen is acceptable if it has 0, 1, 2, or 3 bad pixels, it is not surprising that the probability of an unacceptable screen is so low.

Below is a sketch of the PDF of $\mathsf{Pois}(1).$ The probability of an unacceptable screen is represented by the sum of the heights of the bars to the right of the vertical dotted red line. (At the scale of this graph, the corresponding binomial probability bars would be indistinguishable from the ones shown.) • In Mathematica: N@Probability[x > 3, x \[Distributed] BinomialDistribution[10^6, 10^(-6)]] = 0.0189881. – David G. Stork Feb 25 '17 at 2:34
• Excellent answer! Thx – Anas Yousef Feb 25 '17 at 4:08