[Math] probability of having defects in a product; defects can occur independently

probabilityprobability distributions

In a product there can be two types of defects: $A$ and $B$. The probability ($P$) of occurrence of defect $A$ is $0.1$ ($P(A) = 0.1)$. $P(B) = 0.2$. The two types of defects can occur independent of each other.

Let $X$ be a random variable that counts the number of types of defects in a product. Find the probability function.

In class we learned a general type of probability distribution (where you have to find the ad-hoc formula) and four special types of distributions (uniform, binomial, geometric and Poisson). I tend to think that I just need to find a custom formula for this one.

The random variable $X$ can be between $0,1,2$.

Let $C$ be the case when a product doesn't have any defects. $P(C) = 1 – P(A) – P(B) = 0.7$.

The case when there're 2 types of defects is $P(A \cap B) = 0.1 * 0.2 = 0.02$ (because it's given that $A$ and $B$ can occur independently).

The case when either $A$ or $B$ can occur is $P(A \cup B) = P(A) + P(B) = 0.1 + 0.2 = 0.3$

So:

  • $P(X = 0) = 0.7$
  • $P(X = 1) = 0.30$
  • $P(X = 2) = 0.02$

Not sure if I'm on the right track.

Best Answer

The probability that there are no defects, i.e. $\Pr[X = 0]$, is equal to the chance that there are no defects of type $A$ and there are no defects of type $B$. Since a defect of type $A$ occurs with probability $0.1$, i.e. $\Pr[A] = 0.1$, then the probability of no defect of type $A$ is $$\Pr[\bar A] = 1 - \Pr[A] = 1 - 0.1 = 0.9.$$ Similarly, the probability of no defect of type $B$ is $$\Pr[\bar B] = 1 - \Pr[B] = 1 - 0.2 = 0.8.$$ Therefore, $$\Pr[X = 0] = \Pr[\bar A \cap \bar B] \overset{\text{ind}}{=} \Pr[\bar A]\Pr[\bar B] = (0.9)(0.8) = 0.72.$$

The probability that there is exactly one defect is $\Pr[X = 1]$; this can happen if and only if there is a defect of type $A$ and no defect of type $B$; or no defect of type $A$ and a defect of type $B$. That is to say, $$\Pr[X = 1] = \Pr[A \cap \bar B] + \Pr[\bar A \cap B].$$

Another way to reason about this problem is to write out all of the joint probabilities $$\Pr[A \cap B], \quad \Pr[\bar A \cap B], \quad \Pr[A \cap \bar B], \quad \Pr[\bar A \cap \bar B].$$ You can do this with a simple contingency table: $$\begin{array}{c|c|c} & A & \bar A \\ \hline B & (0.1)(0.2) & (0.9)(0.2) \\ \hline \bar B & (0.1)(0.8) & (0.9)(0.8) \\ \end{array}$$

Related Question