# What is Conditional Probability?

Suppose two events A and B are mutually inclusive events ( having one or more outcomes in common ). Conditional probability i.e. P( A | B ) is the probability of event A occurring with some relationship to event B.

Mathematically,

```
P(A | B) = P(A and B) / P(A)
which you can also rewrite as:
P(A | B) = P(A∩B) / P(A)
where P(A) ≠ 0
```

**Conditional Probability in Real World**

Suppose the weather forecasts casts says there is 50% chance of raining in Kathmandu. However, this forecasts is *conditional* on various factors that increases and decreases the chance of raining in that area. Such as: Probability of

- a cold front coming to that area.
- rain clouds forming.
- another front pushing the rain clouds away.

So, we say the **conditional probability** of rain occurring in Kathmandu depends on all the above events. You can also visualize this as like this:

- P(rain in Kathmandu | increase in cold front )
- P (rain in Kathmandu | increase in clouds forming)
- P ( rain in Kathmandu | front pushing the rain clouds)

**Example 1:
**Jack took two tests. The probability of passing both test is 0.7. The probability of her passing the first test is 0.8. What is the probability of her passing the second test given that she has passed the first test?

**Solution:**

Probability of passing first and second test is P( First and Second) = 0.7

Probability of passing first test is P(First) = 0.8

According to Conditional Probability formula, Probability of passing second test given first is:

P ( Second | First) = P ( First and Second ) / P ( First ) = 0.7 / 0.8 = 0.875

**Example 2:
**What is the probability that the total of two dice will be greater than or equals to 7, given that the first die is a 4?

**Solution:**

Let A is the first die i.e 4

Let B is the total of two dice greater than or equals to 7

P(A) = 1/6

Possible outcomes of A and B: { (4, 3), (4, 4), (4, 5), (4, 6)}

P(A and B) = 4/36 = 1/9

P(B | A) = P( A and B) / P(A) = (1 / 9) / (1 / 6) = 2 / 3

**Example 3:
**Suppose that we toss two dice and that each of the 36 possible outcome is equally likely to occur and hence has probability 1/36.

First die is 4. Then given this information, what is the probability that the sum of the two dice equals six?

**Solution:**

Possible outcomes = { (4,1), (4,2), (4,3), (4,4), (4,5), (4,6) }

Given that first die is 4, then the conditional probability of each of the 6 possible outcomes is 1/6 while conditional probability of other 30 points in the sample space is 0. Hence, the desired probability will be 1/6.