The probability of a non-defective item being produced by machine 1,2,3 respectively are,
\(\begin{aligned}{}{\bf{P}}\left( {{{\bf{A}}^{\bf{c}}}\left| {{{\bf{B}}_{\bf{1}}}} \right.} \right){\bf{ = 1 - P}}\left( {{\bf{A}}\left| {{{\bf{B}}_{\bf{1}}}} \right.} \right)\\ = 1 - 0.01\\ = 0.99\end{aligned}\)
\(\begin{aligned}{}{\bf{P}}\left( {{{\bf{A}}^{\bf{c}}}\left| {{{\bf{B}}_2}} \right.} \right){\bf{ = 1 - P}}\left( {{\bf{A}}\left| {{{\bf{B}}_2}} \right.} \right)\\ = 1 - 0.02\\ = 0.98\end{aligned}\)
\(\begin{aligned}{}{\bf{P}}\left( {{{\bf{A}}^{\bf{c}}}\left| {{{\bf{B}}_3}} \right.} \right){\bf{ = 1 - P}}\left( {{\bf{A}}\left| {{{\bf{B}}_3}} \right.} \right)\\ = 1 - 0.03\\ = 0.97\end{aligned}\)
Using Bayes’ theorem, the probability is that the randomly selected non-defective item is produced by machine 2 is,
\(\begin{aligned}{}{\bf{P}}\left( {{{\bf{B}}_{\bf{2}}}\left| {{{\bf{A}}^{\bf{c}}}} \right.} \right){\bf{ = }}\frac{{{\bf{P}}\left( {{{\bf{B}}_{\bf{2}}}} \right){\bf{P}}\left( {{{\bf{A}}^{\bf{c}}}{\bf{|}}{{\bf{B}}_{\bf{2}}}} \right)}}{{{\bf{P}}\left( {{{\bf{B}}_{\bf{1}}}} \right){\bf{P}}\left( {{{\bf{A}}^{\bf{c}}}{\bf{|}}{{\bf{B}}_{\bf{1}}}} \right){\bf{ + P}}\left( {{{\bf{B}}_{\bf{2}}}} \right){\bf{P}}\left( {{{\bf{A}}^{\bf{c}}}{\bf{|}}{{\bf{B}}_{\bf{2}}}} \right){\bf{ + P}}\left( {{{\bf{B}}_{\bf{3}}}} \right){\bf{P}}\left( {{{\bf{A}}^{\bf{c}}}{\bf{|}}{{\bf{B}}_{\bf{3}}}} \right)}}\\ = \frac{{\left( {0.3 \times 0.98} \right)}}{{\left( {0.2 \times 0.99} \right) + \left( {0.3 \times 0.98} \right) + \left( {0.5 \times 0.97} \right)}}\\ = 0.301\end{aligned}\)
Thus, there is approximately a 30.1% of chance that the selected non-defective item is from machine 2.