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?
Deze oefening maakt deel uit van de cursus
Foundations of Probability in Python
Oefeninstructies
- 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).
- The manufacturer is A (
- 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.
Praktische interactieve oefening
Probeer deze oefening eens door deze voorbeeldcode in te vullen.
# Needed probabilities
P_A = ____
P_last5000_g_A = ____
P_B = ____
P_last5000_g_B = ____
# Total probability calculation
P_last_5000 = ____
print(P_last_5000)