# What is conditional probability?

A conditional probability is one in which some condition has already been met or given to us. For example, let’s assume we are drawing from a standard fifty-two card deck, and our goal is to draw cards of the same suit. If the first card we draw is a spade (our given condition), what is the probability that the next card will be a spade? The ace of spades. The probability of drawing subsequent spades from the deck will change, given certain conditions, such as the fact that you’ve already drawn a spade. Photo by Silsor.

Since there are only twelve spades left in the deck, and only fifty-one cards left to draw from, our conditional probability is 12/51. Note that this is different from the probability of drawing a spade from the original complete deck&emdash;13/52. Thus, when we are given a condition—in this case, that one spade had already been drawn—the probabilities can change. Let’s examine this in more detail.

## Conditional probability: a closer look

To introduce the concept of conditional probability, let’s consider two events, A and B:

A = it rains
B = a Little League game is cancelled

From these definitions, you might quickly realize that the two events are not mutually exclusive; that is, both A and B could occur simultaneously. Also, the two events are likely not independent of one another; that is to say, if event A occurs (it rains), it will likely impact the probability of B occurring (the event of rain will greatly increase the likelihood that the Little League game is cancelled). The events “it rains” and “the Little League game is cancelled” are not independent; if it rains, the probability of the game getting cancelled increases. We can show this by calculating the following conditional probability: Given that it rains, what is the probability that the game is cancelled? Photo by Max Pixel.

So what is the probability that the Little League game is cancelled, given that it rains today? This probability is called a conditional probability, because we are given the condition that it is raining. In other words, event B is no longer a “what if”—we know that it has occurred, and it may or may not have an impact on the probability of event A (more on this soon). Therefore, “Given that event B has already occurred, what is the probability of A?” is a conditional probability.

## Symbolizing conditional probability

We can symbolize “the probability of A given that B has occurred” as follows:

P(A | B)

If A and B are not independent, then P(A and B) = P(B)*P(A | B). Rearranging this expression, we have, The fraction on the right above represents the joint probability of A and B, that is, A and B both occurring together (in this case, a rainy day and a cancelled Little League game) out of the total probability of B (that is, that the Little League game is cancelled, for any reason, including but not limited to the bus breaking down, the entire team simultaneously contracting the flu, etc.)

If you’re curious about conditional probabilities involving more than two events, check out this page from Yale University. Otherwise, we’ll continue on and illustrate all this formalism with an example of our own.

## Example problem with conditional probability

To illustrate the above, let’s add in some numbers. We’ll say that the probability that it rains, P(A), is 0.40, the probability that the Little League game is cancelled, P(B), is 0.25. We’ll also say that the joint probability of “it is raining and the game is cancelled,” P(A and B), is 0.2. (Note that this joint probability must be less than or equal to P(B) alone, since the joint probability P(A and B) is a subset of P(B).)

Now, let’s find the conditional probability, P(A|B): Given that it is raining, what is the probability that the game gets cancelled? Therefore, given that it is currently raining, the probability the game gets cancelled increases to 0.8—as we would expect, the probability is higher than if we did not know the weather, and we were making a general prediction about whether the game would be cancelled.

## Conditional probability and independence

We’ll conclude by linking these concepts of conditional probability with independence. Recall that independence means that the fact that event A has occurred will have no impact on the probability of event B occurring. The classic example of independent events is tossing coins; if the first toss lands heads, this does not in any way affect the probability of the next toss landing heads. The two tosses are independent.

By contrast, the rain/Little League example we’ve been pursuing so far involves two events that are not independent; as we’ve seen, whether or not rain occurs will impact the probability that the game is cancelled.

With this background, we can formulate the following definition of independence. Two events A and B can be considered independent if and only if: The above statement suggests the following: The important conclusion is to the right of the double-headed arrow. This equation says that the probability of B and the probability of B given that A has occurred are the same. In other words, A occurring had no impact on the probability of B occurring, which is the very basis of independence.

For more practice with conditional probability and independent events, check out our statistics blog and videos!