Factories and parts
A certain electronic part is manufactured by three different vendors named V1, V2, and V3.
Half of the parts are produced by V1, 25% by V2, and the rest by V3. The probability of a part being damaged given that it was produced by V1 is 1%, while it's 2% for V2 and 3% for V3.
If a part taken at random is damaged, answer the following questions.
This exercise is part of the course
Foundations of Probability in Python
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Individual probabilities & conditional probabilities
P_V1 = ____
P_V2 = ____
P_V3 = ____
P_D_g_V1 = ____
P_D_g_V2 = ____
P_D_g_V3 = ____
# Probability of Damaged
P_Damaged = (P_V1 * P_D_g_V1) + (____ * ____) + (____ * ____)
# Bayes' rule for P(V1|D)
P_V1_g_D = (____ * ____) / P_Damaged
print(P_V1_g_D)