CommencerCommencer gratuitement

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.

Cet exercice fait partie du cours

Foundations of Probability in Python

Afficher le cours

Exercice interactif pratique

Essayez cet exercice en complétant cet exemple de 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)
Modifier et exécuter le code