Question: a company A manufactures 80% of electrocardiograms, the company B manufactures 15% and the Company C 5%. The electrocardiograms manufactured by Company A has a failure rate of 4%, those of the company B rate is 5%, while it is 8% for those manufactured by the company C.

(a) randomly selects an electrocardiogram. What is the probability that it comes from the company A?(b) were selected randomly electrocardiography and was found to be defective. Find the probability that it comes from Company A.(c) randomly selects an electrocardiogram. Find the probability that it comes from Company A and it is defective.(d) randomly selects an electrocardiogram. Find the probability that it comes from Company A and it is not defective.

Are you maybe overthinking this? (And how did you get two different numbers for P(A|D)?)

For me, it's easier to convert the market shares to "out of a 100", "out of a 1000", etc, so I get whole numbers; for this one, I'll do 10,000's. So, of every 10,000 units, Company A makes 8000, Company B makes 1500, and Company C makes 500. Of Company A's 8000, 0.04*8000 = 320 are defective; of Company B's 1500, 0.05*1500 = 75 are defective; and of Company C's 500, 0.08*500 = 40 are defective.

a) 8000 of the 10,000 units are from Company A, so the probability that a randomly-chosen one is from Company A is 8000/10,000 = 80%.

b) There are 320 + 75 + 40 = 435 defectives. Assuming that you've already picked a defective, you have 320 of them being from Company A, so the probability is 320/435 = 0.74 (approx).

c) Of the total, there are 320 defectives from Company A, so the probability that you picked a defective from Company A is 320/10,000 = 0.032 (exact).

d) Of the total, there are 8000 - 320 = 7680 non-defectives from Company A, so the probably that you picked a good unit from Company A is 7680/10,000 = 0.768 (exact).