*31*

Given two events, A and B, to “find the probability of A given B” means to find the probability that **event A occurs, given that event B has already occurred.**

We use the following formula to calculate this probability:

**P(A|B) = P(A)*P(B|A) / P(B)**

where:

- P(A|B): The probability of event A, given event B has occurred.
- P(B|A): The probability of event B, given event A has occurred.
- P(A): The probability of event A.
- P(B): The probability of event B.

The following examples show how to use this formula in practice.

**Example 1: Probability of A Given B (Weather)**

Suppose the probability of the weather being cloudy is **40%.**

Also suppose the probability of rain on a given day is **20%**.

Also suppose the probability of clouds on a rainy day is **85%**.

If it is cloudy outside on a given day, what is the probability that it will rain that day?

**Solution**:

- P(cloudy) = 0.40
- P(rain) = 0.20
- P(cloudy | rain) = 0.85

Thus, we can calculate:

- P(rain | cloudy) = P(rain) * P(cloudy | rain) / P(cloudy)
- P(rain | cloudy) = 0.20 * 0.85 / 0.40
- P(rain | cloudy) = 0.425

If it is cloudy outside on a given day, the probability that it will rain that day is **0.425** or **42.5%**.

**Example 2: Probability of A Given B (Crime)**

Suppose the probability of a crime being committed in a certain place is **1%**.

Also suppose the probability of a police car driving by is **10%**.

Also suppose the probability of a crime causing a police car to drive by is **90%**.

If a police car drives by, what is the probability that a crime has been committed?

**Solution**:

- P(crime) = 0.01
- P(police car) = 0.10
- P(police car | crime) = 0.90

Thus, we can calculate:

- P(crime | police car) = P(crime) * P(police car | crime) / P(police car)
- P(crime | police car) = 0.01 * 0.90 / 0.10
- P(crime | police car) = 0.09

If a police car drives by, the probability that a crime has been committed is .09 or **9%**.

**Example 3: Probability of A Given B (Baseball)**

Suppose the probability of a home run being hit in a baseball game is **5%**.

Also suppose the probability of a crowd cheering in a stadium when you walk by is **15%**.

Also suppose the probability of a crowd cheering when a home run has been hit is **99%**.

If you hear a crowd cheering as you walk by the stadium, what is the probability that a home run has been hit?

**Solution**:

- P(home run) = 0.05
- P(cheer) = 0.15
- P(cheer | home run) = 0.99

Thus, we can calculate:

- P(home run | cheer) = P(home run) * P(cheer | home run) / P(cheer)
- P(home run | cheer) = 0.05 * 0.99 / 0.15
- P(home run | cheer) = 0.33

If you hear a crowd cheering as you walk by the stadium, the probability that a home run has been hit is 0.33 or **33%**.

**Additional Resources**

The following tutorials explain how to perform other calculations related to probabilities:

How to Find the Probability of A or B

How to Find the Probability of A and B

How to Find the Probability of “At Least One” Success