# How to Calculate Conditional Probability in Excel (2 Easy Ways)

Get FREE Advanced Excel Exercises with Solutions!

Looking for ways to calculate conditional probability in Excel? Then, this is the right place for you. Here, you will find 2 easy ways to calculate conditional probability in Excel.

## What Is Probability?

Probability is the mathematical representation of how often an event can occur. It is a number between 0 to 1. 0 means that an event is not going to happen and 1 represents that event is certainly going to occur.

## What Is Conditional Probability?

Conditional probability is used to calculate the probability of an event (second), depending on whether another one or more events (first) have already occurred.

Suppose, A & B are two events that can occur.

Now, if the Probability of A = P(A), the Probability of B =P(B) and the Probability of both A & B = P(A∩B)

Then, the formula of Probability of B, if A event has already occurred,

`P(B|A) = P(A∩B) / P(A)`

## 2 Easy Ways to Calculate Conditional Probability in Excel

We can calculate the conditional probability for both one-way and two-way tables in Excel. Here, you will find these two ways of calculation going through some simple steps given below.

### 1. Calculate Conditional Probability for One-Way Table

In the first method, we will show you how you can calculate the conditional probability for a one-way table. Here, we have a dataset containing the probability of ordering Food, Books and both at a time. Now, using this dataset we will show you how you can calculate the probability of people who ordered books after conditioning that they have ordered food. Here are the steps.

Steps:

• In the beginning, select Cell C8 and insert the following formula.
`=C7/C5` • Then, press Enter to get the value of Conditional Probability. Here, in the formula, we divided the probability of Ordering both Food and Books in Cell C7 by the probability of Ordering Food in Cell C5 to get the value of Conditional Probability.

### 2. Determine Conditional Probability for Two-Way Table

In the second method, you will find a way to determine the conditional probability for a two-way table.

Suppose, you have a dataset containing information about the number of Boys and Girls who play either Football or Baseball or both. Now, we will show you the way to calculate the probability of choosing a Boy who also plays Football using the given dataset. Steps:

• Firstly, select Cell E9 and insert the following formula.
`=E5/E7` • Secondly, press Enter to get the Probability of choosing a Boy, P(B). Here, in the formula, we divided the value of the Total number of Boys in Cell E5 by the value of the Total number of students in Cell E7 to get the Probability of choosing a Boy.
• Then, select Cell E10 and insert the following formula.
`=C5/E7` • Now, press Enter. In the formula, we divided the number of Boys who play Football in Cell C5 by the Total number of students in Cell E7 to get the probability of students who are Boys and play Football.
• After that, select Cell E11 and insert the following formula.
`=E10/E9` • Finally, press Enter to get the value of your desired conditional probability. Here, in the formula, we divided the value of Cell E10 by the value of Cell E9 to get the probability of choosing a Boy who also plays Football.

## Conditional Probability for Independent Events in Excel

When two events are independent it means that they do not affect the probability of each other. Suppose, A & B are two independent events.

As a result,

`P(A|B) = P(A) and P(B|A) = P(B)`

## Conditional Probability for Mutually Exclusive Events in Excel

Mutually Exclusive Events means events that cannot happen at the same time. For example, raining and not raining on a day can be two mutually exclusive events. If the probability of raining is P(R) and not raining is P(NR) then,

`P(R|NR) = 0 and P(NR|R) = 0`

## Practice Section

In the article, you will find an Excel workbook like the image given below to practice on your own. ## Conclusion

So, in this article, we have shown you 2 ways to calculate conditional probability in Excel. I hope you found this article interesting and helpful. If something seems difficult to understand, please leave a comment. Please let us know if there are any more alternatives that we may have missed. And, visit ExcelDemy for many more articles like this. Thank you!

## Related Articles Arin Islam

Hello, I'm Arin. I graduated from Khulna University of Engineering and Technology (KUET) from the Department of Civil Engineering. I am passionate about learning new things and increasing my data analysis knowledge as well as critical thinking. Currently, I am working and doing research on Microsoft Excel and here I will be posting articles related to it.

We will be happy to hear your thoughts Advanced Excel Exercises with Solutions PDF  