On my homework, there is a problem:
A hospital receives two-fifths of its flu vaccine from Company A and the remainder from Company B. Each shipment contains a large number of vials of vaccine. From Company A, 3% of the vials are ineffective; from Company B, 2% are ineffective. A hospital test n = 15 randomly selected vials from one shipment and finds that 2 are ineffective. What is the conditional probability that this shipment came from Company A?
The given answer is $.568$. I keep getting $.5$.
I think I'm confused what to do with the $2/15$ inefficient. I didn't use that at all when I calculated, and I can't figure out when to use it.
My calculation: $$P(I) = P(A)P(I|A) + P(B)P(I|B) = (.4)(.03) + (.6)(.02) = .024$$ $$P(A|I) = [P(A)P(I|A)]/P(I) = [(.4)(.03)]/.024 =.5.$$
To solve this, we will begin by letting:
We are looking for $P(A|E)$.
$$\begin{aligned} P(A|E)&=\frac{P(A\cap E)}{P(E)} \\ &=\frac{P(E|A)P(A)}{P(E)} \\ &=\frac{P(E|A)P(A)}{P(E|A)P(A)+P(E|A^\complement)P(A^\complement)} \end{aligned}$$ At this point, we will solve for both of the relevant terms. $$\begin{aligned} P(E|A)P(A)&=\left(\binom{15}{2}0.03^20.97^{13}\right)0.4 \\ &\approx0.02544 \end{aligned}$$ and $$\begin{aligned} P(E|A^\complement)P(A^\complement)&=\left(\binom{15}{2}0.02^20.98^{13}\right)0.6 \\ &\approx0.01938. \end{aligned}$$ This gives us a final answer of $P(A|E)=0.5676$.
It looks like that you did not consider that you had to use a binomial distribution in the problem.