A smartphone company receives shipments of smartphones from three factories, labelled, 1, 2 and 3. Twenty-five percent of shipments come from factory 1 whose shipments contain 8% defective smartphones. Sixty-five percent of the shipments come from factory 2 whose shipments contain 6% defective smartphones. The remainder of the shipments comes from factory 3 whose shipments contain 4% smartphones. The company receives a shipment, but does not know the source. A random sample of 15 smartphones is inspected, and three of the smartphones are found to be defective. What is the probability that this shipment came from factory 2?

To find the probability that the shipment came from factory 2, we can use Bayes' Theorem.

First, let's define the events:
A: The shipment came from factory 1
B: The shipment came from factory 2
C: The shipment came from factory 3
D: The shipment has 3 defective smartphones

We want to find the probability of event B given D, P(B|D).

Bayes' Theorem states:
P(B|D) = (P(D|B) * P(B)) / P(D)

We can break down the formula into three parts:

P(D|B): The probability of finding 3 defective smartphones in a random sample from factory 2. The defective rate is given as 6%, so we want to find the probability of selecting 3 defective smartphones out of 15. This can be calculated using the binomial distribution formula:
P(D|B) = (15 choose 3) * (0.06)^3 * (1 - 0.06)^(15-3)

P(B): The prior probability of a shipment coming from factory 2. Given that 65% of shipments come from factory 2, we can calculate:
P(B) = 0.65

P(D): The probability of finding 3 defective smartphones in the random sample. This can be calculated by considering all possible sources of the shipment and summing their probabilities:
P(D) = P(D|A) * P(A) + P(D|B) * P(B) + P(D|C) * P(C)
= (0.08^3 * 0.92^12) * 0.25 + (0.06^3 * 0.94^12) * 0.65 + (0.04^3 * 0.96^12) * 0.10

Now we can apply Bayes' Theorem:
P(B|D) = (P(D|B) * P(B)) / P(D)
= [(15 choose 3) * (0.06)^3 * (1 - 0.06)^(15-3) * 0.65] / [P(D|A) * P(A) + P(D|B) * P(B) + P(D|C) * P(C)]

Calculate each component and solve for the probability.