CommencerCommencer gratuitement

Formula 1 engines

Suppose that two manufacturers, A and B, supply the engines for Formula 1 racing cars, with the following characteristics:

  • 99% of the engines from factory A last more than 5,000 km.
  • Factory B manufactures engines that last more than 5,000 km with 95% probability.
  • 70% of the engines are from manufacturer A, and the rest are produced by manufacturer B.

What is the chance that an engine will last more than 5,000 km?

Cet exercice fait partie du cours

Foundations of Probability in Python

Afficher le cours

Instructions

  • Calculate the following probabilities:
    • The manufacturer is A (P_A).
    • The engine lasts more than 5,000 km given that manufacturer is A (P_last5000_g_A).
    • The manufacturer is B (P_B).
    • The engine lasts more than 5,000 km given that manufacturer is B (P_last5000_g_B).
  • Use the total probability law to calculate the probability that the engine will last more than 5,000 km and store the result into P_last_5000.

Exercice interactif pratique

Essayez cet exercice en complétant cet exemple de code.

# Needed probabilities
P_A = ____
P_last5000_g_A = ____
P_B = ____
P_last5000_g_B = ____

# Total probability calculation
P_last_5000 = ____

print(P_last_5000)
Modifier et exécuter le code