The problem is defined as: We got a machine part that can be produced in series of 20 . 3 Machines produce that part. Some of the parts way be invalid.
The First machine produced 15 out of 20 valid parts.
The Second machine produced 18 out of 20 valid parts.
The Third machine produced 16 out of 20 valid parts.
Randomly a series of products is chosen ( I , II, III ) and a part is taken out. The part that's taken out its valid. The same part it's returned into the series that it has came from and a draw for one more part is done from the chosen series. What's the probability that in the second draw the part that's taken out its a valid part?
I got tried to solve this problem. Here is what I've got so far:
Hypothesis:
A- A valid part is chosen
H1- We draw from first series
H2- We draw from second series
H3- We draw from third series
P(H1)=P(H2)=P(H3)=1/3
P(A|H1)=15/20
P(A|H2)=18/20
P(A|H3)=16/20
P(A)= P(H1)*P(A|H1)+P(H2)*P(A|H2)+P(H3)P(A|H3)
Is this the way to solve this problem or I am missing something?
Let $A_1, A_2$ represent the events for the two parts drawn being valid, when drawn with replacement from a series of 20 items produced by one of three machines. Let $H_{\rm I},H_{\rm II},H_{\rm III}$ be the event that the series originates in the respective machine.
Given that the first sample drawn was valid, updating the probability for the series originating from factory#$\rm I$ is an application for Bayes' Rule.
$$\mathsf P(H_{\rm I}\mid A_1) ~{= \dfrac{\mathsf P(A_1\mid H_{\rm I})\mathsf P(H_{\rm I})}{\mathsf P(A_1\mid H_{\rm I})\mathsf P(H_{\rm I})+\mathsf P(A_1\mid H_{\rm II})\mathsf P(H_{\rm II})+\mathsf P(A_1\mid H_{\rm III})\mathsf P(H_{\rm III})} \\ = \dfrac {15}{15+18+16}\quad=\dfrac{15}{49}}$$
Because when drawing with replacement from the series there is $1/20$ probability for picking the known valid part, and a $19/20$ probability for drawing another part from $H_{\rm I}$ (which are valid with probability $15/20$).
$$\mathsf P(A_2\mid H_{\rm I}, A_1) =\dfrac 1{20}+\dfrac{19}{20}\dfrac{15}{20}$$
And so forth for the other factories. Now apply the law of total (conditional) probability:
$$\mathsf P(A_2\mid A_1)~=~ \sum\limits_{m\in\{{\rm I},{\rm II},{\rm III}\}}\mathsf P(A_2\mid H_m, A_1)\,\mathsf P(H_m\mid A_1)$$