Hi, can someone please help me out with this problem? Like step by step on how to solve this?
Thanks you!

A company that produces a particular machine component has 3 factories, one each in Buffalo, Detroit, and Pittsburgh. 39% of the components produced come from the Buffalo factory, 36% of the components come from the Detroit factory, and 25% of the components come from the Pittsburgh factory. It is known that 1.1% of the components from the Buffalo factory, 1.4% of the components from the Detroit factory, and 0.9% of the components from the Pittsburgh factory are defective. Given that a component is selected at random and is found to be defective, what is the probability that the component was made in Detroit?

Use Bayes' theorem.

Let X be whether or not there's an error and $Y_i$ which factory the component was made in ( $Y_1$ is Detroit).

$P(Y_1|X)=\frac{P(X|Y_1)P(Y_1)}{P(X|Y_1)P(Y_1) + P(X|Y_2)P(Y_2)+P(X|Y_3)P(Y_3)}$

ok so i broke it down and got:

(0.39)(0.011) = .00429
(0.36)(0.014) = .00504
(0.25)(0.009) = .00225

next i did .00504/[.00504+.00225+.00429]
=.00504/.01158
=.43532

Is this right, or am I doing this completely wrong?