## leontol

- 0of 0 votes

AnswersLet's say you are getting a pack of 2 chips, and you know that both chips are coming from the same , either good or bad company, with equal probability. If you test a first chip and it appears to be good chip, what is the probability that second chip is also good? And at least is this probability is greater than 50% or not?

- leontol in United States| Report Duplicate | Flag

xyz Data Scientist Probability - 0of 0 votes

AnswersThere are 2 companies making electronic chips: good and bad. Good company is making good chips with probability 80 % and defective chips with probability 20 %, and bad company is making good chips with probability 20 % and defective chips with probability 80 %. If you are getting just one chip, and the probability that it is coming from either of companies is the same, what is the probability that it is good chip?

- leontol in United States| Report Duplicate | Flag

xyz Data Scientist Probability

I was thinking along this lines: if you have 100 chips from both companies, 80 good and 20 bad chips will come from 1st (good ) company, and 80 bad and 20 good chips will come from 2nd (bad) company. So from 200 available chips there is 100 good and 100 bad chips. Then answer is 50 %, as probability to get good chip is (0.8 + 0.2)/2 = 0.5 or 50%

- leontol May 14, 2015**CareerCup**is the world's biggest and best source for software engineering interview preparation. See all our resources.

Open Chat in New Window

I didn't answer this one correctly, but the interviewer helped me. So, if we know that probability to get good chip from good company is 0.8 and from bad company is 0.2, and first chip in the pack is good, it translates to the probability of the second chip to be good 0.8*0.8=0.64 (if pack came from the good company), and 0.2*0.2=0.04 (if pack came from the bad company). And total probability that the second chip in the pack is good is a sum of both probabilities: 0.8*0.8 + 0.2*0.2 = 0.64+0.04 = 0.68 , or 68%.

- leontol May 14, 2015