# Conditional probability

Before conducting an experiment, you need to have some information about the event you want to observe. In this case, the sample space changes and the event has its probability of occurrence changed.

## Conditional Probability Formula

P (E1 and is2 and is3 and… and En-1 and isno) it's the same as P (E1) .P (E2/AND1) .P (E3/AND1 and is2)… P (Eno/AND1 and is2 and isno-1).

Where :

- P (E2/AND1) is the probability of occurring E2, conditioned by the fact that E1;

- P (E3/AND1 and is2) is the probability to occur AND3, conditioned by the fact that E1 and is2;

- P (Pn / E1 and is2 and isno-1) is the probability of occurring ANDno, conditioned on the fact that E1 and is2… ANDno-1.

### Example:

One ballot box has 30 balls, 10 red and 20 blue. If a draw of 2 balls occurs, one at a time and without replacement, how likely is the first to be red and the second to be blue?

### Resolution:

Let the sample space be S = 30 balls, let's consider the following events:

A: red on first withdrawal and P (A) = 10/30

B: blue on second withdrawal and P (B) = 20/29

Like this:

P (A and B) = P (A). (B / A) = 10 / 30.20 / 29 = 20/87

Next: Independent Events