Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Law of Total Probability | Probability of Complex Events
Probability Theory Basics
course content

Course Content

Probability Theory Basics

Probability Theory Basics

1. Basic Concepts of Probability Theory
2. Probability of Complex Events
3. Commonly Used Discrete Distributions
4. Commonly Used Continuous Distributions
5. Covariance and Correlation

bookLaw of Total Probability

The law of total probability is a fundamental concept in probability theory. This law can be formulated as follows:

Let's provide some explanations:

  1. We have split our space of elementary events into n different incompatible events;
  2. We want to calculate the probability of some other event in this space of elementary events;
  3. We can calculate P(A) using the formula described above.

This law is often used when a stochastic experiment can be divided into different stages, and each stage is stochastic too.

Example

Let's consider an example involving a manufacturing company that produces two types of products: Product 1 and Product 2.
The company produces 60% of Product 1 and 40% of Product 2.
The defect rate for Product 1 is 10%, while the defect rate for Product 2 is 5%. We want to calculate the probability of randomly selecting a defective product from the company's inventory.

In this example:

Event A: Selecting a defective product.
Partition events: H₁ = Selecting Product 1, H₂ = Selecting Product 2.
Now we can use the law of total probability to solve this task:

12345678910111213
# Probability of selecting Product 1 and Product 2 P_H1 = 0.6 P_H2 = 0.4 # Defect rates for Product 1 and Product 2 P_A_cond_H1 = 0.1 P_A_cond_H2 = 0.05 # Calculate the overall probability of selecting a defective product P_A = P_A_cond_H1 * P_H1 + P_A_cond_H2 * P_H2 # Print the results print(f'The overall probability of selecting a defective product is {P_A:.4f}')
copy
You have two baskets: the first one contains 3 cats' toys and 7 dog's (10 toys), the second one contains 12 cat's toys and 8 dog's (20 toys). The probability to choose the first basket is 0.4, and to choose second is 0.6. Calculate the probability to get cats' toy.

You have two baskets: the first one contains 3 cats' toys and 7 dog's (10 toys), the second one contains 12 cat's toys and 8 dog's (20 toys). The probability to choose the first basket is 0.4, and to choose second is 0.6. Calculate the probability to get cats' toy.

Select the correct answer

Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 2. Chapter 4
some-alt