The probability that the store is supplied by factory II

bayes-theoremconditional probabilityprobability

Two factories I and II produce phones for brand ABC. Factory I produces 60% of all ABC phones, and factory II produces 40%. 10% of phones produced by factory I are defective, and 20% of those produced by factory II are defective. You know that the store where you buy your phones is supplied by one of the factories, but you do not know which one. You buy two phones, and both are defective. What is the probability that the store is supplied by factory II?

My Attempt

We are trying to find $\mathbb{P}(\text{factory II}|\text{defect})$
From the problem, we know:
$$\mathbb{P}(\text{defect}|\text{factory I})=0.1$$
$$\mathbb{P}(\text{defect}|\text{factory II})=0.2$$
$$\mathbb{P}(\text{factory I})=0.6$$
$$\mathbb{P}(\text{factory II})=0.4$$

Using Bayes rule, we have

$$\mathbb{P}(\text{factory II}|\text{defect})=\frac{(0.2)(0.4)}{(0.2)(0.4)+(0.1)(0.6)}=0.5714$$

I was told that this is wrong, but I don't know where I went wrong. Can someone point me in the right direction? Thank you.

Best Answer

Your work is very good, and at first glance, I thought that it was correct. Then, I re-read the problem:

You buy two phones, and both are defective.

Your work would be correct, under the alternative problem that only one phone was bought, and seen to be defective.

Instead of using, for example, $(0.1)$ and $(0.2)$ to designate the probabilities of the defects occurring under the assumption of Stores I and II, respectively, you must use $(0.1)^2$ and $(0.2)^2.$


Addendum
Responding to the comment question of James Anderson, immediately following my answer:

Good question.

In fact, despite the fact that the events that the first phone is defective and that the second phone is defective are not independent events, you can still multiply the probabilities like that.

First, I will explain why the events are not independent. Then I will explain why you can still multiply the probabilities like that.


The normal chance that a phone is defective is

$\displaystyle (0.6 \times 0.1) + (0.4 \times 0.2) = (0.14).$

From your own analysis, once the first phone is seen to be defective, the probabilities of the phone coming from Factory I, Factory II change from $(0.6), (0.4)$ respectively to $(3/7), (4/7)$ respectively.

This means that once the first phone is seen to be defective, the chance that the second phone is also defective is

$\displaystyle [(3/7) \times 0.1] + [(4/7) \times 0.2] = (11/70).$

Therefore, since $\displaystyle (11/70) \neq (0.14),$ the two events are not independent.

Note that these events are not independent, despite the presumption here that both phones came from the same Factory.


Go back to the original problem:

Let $A$ represent the event that Factory II is being used.

Let $B$ represent the event that two defective phones are found.

Let $C$ represent the event that Factory I is being used.

You want to compute $\displaystyle p(A|B) = \frac{p(AB)}{p(B)}$.

$\displaystyle p(AB) = [(0.4) \times (0.2)^2].$

The reason that you are allowed to compute $p(AB)$ in this manner, is that you are required to presume that if the phones both came from Factory II, the chance of each phone being defective is $(0.2)$. This means that if the phones both came from Factory II, you are required to presume that the events that the first and second phone are each defective are independent events.

Identical analysis is involved in computing

$\displaystyle p(CB) = [(0.6) \times (0.1)^2].$

This means that

$$\displaystyle p(B) = [(0.6) \times (0.1)^2] + [(0.4) \times (0.2)^2] = 0.022.\tag1$$


Now you have a curious situation. If you know that the 2 phones both came from Factory I, then the events of the 1st and 2nd phone being defective are independent events.

If you know that the 2 phones both came from Factory II, then the events of the 1st and 2nd phone being defective are also independent events.

However, based on the analysis at the start of this Addendum, if you know that both phones came from the same Factory, but you don't know which Factory that is, then the events of the 1st and 2nd phone being defective are not independent events. Intuitively, this is because if the first phone is seen to be defective, the relative probabilities of Factory I vs Factory II change from

$\displaystyle (0.6) ~\text{vs}~ (0.4) ~~~~~\text{to}~~~~~ (3/7) ~\text{vs}~ (4/7).$

In fact, based on the first portion of this Addendum, you can alternatively calculate

$p(B) = (0.14) \times \frac{11}{70} = 0.022$.

You get the same answer for $p(B)$ as you did in equation (1) above.

Related Question