# Conditional Probability

How to find the conditional probability: formula, examples, and their solutions.

## Formula

P(*B* | *A*) means

the probability of (*A* and *B*)

when *A* has already happened.

So P(*B* | *A*) = P(*A* and *B*)/P(*A*).

This is why it is called the [conditional probability].

[*B* | *A*] is read as

[*B* bar *A*] or [*B* given *A*].

Probability of (*A* and *B*, Intersection)

## Example 1

Numbers from 1 to 10 are given.

So there are 10 numbers

that can be picked.

So n(*S*) = 10.

It says

the picked number is already an odd number.

So set the event *A* as

picking an [odd] number.

Those numbers are

{1, 3, 5, 7, 9}.

And it says

find the probability

that the picked (odd) number is a prime number.

So, if the event *B* is picking a [prime] number,

then picking an [odd] and a [prime] number is

[*A* and *B*].

So find [*A* and *B*]

by finding the prime numbers [*B*]

from {1, 3, 5, 7, 9} [*A*].

So [*A* and *B*] is {3, 5, 7}.

Probability of (*A* and *B*, Intersection)

*A*: {1, 3, 5, 7, 9}

So n(*A*) = 5.*A* and *B*: {3, 5, 7}

So n(*A* and *B*) = 3.

n(*S*) = 10

n(*A*) = 5

n(*A* and *B*) = 3

So P(*A*) = 5/10.

And P(*A* and *B*) = 3/10.

Probability

P(*A*) = 5/10

P(*A* and *B*) = 3/10

So P(*B* | *A*) = [3/10] / [5/10].

Multiply 10

to both of the numerator and the denominator.

So P(*B* | *A*) = 3/5.

## Example 2

It says Sam already overslept.

So set the event *A* as

Sam [oversleeping].

Then P(*A*) = 0.04.

Set the event *B* as

Sam [being late for school].

Then Sam [oversleeping] and [being late for school] is

[*A* and *B*].

So P(*A* and *B*) = 0.03.

Probability of (*A* and *B*, Intersection)

P(*A*) = 0.04

P(*A* and *B*) = 0.03

So P(*B* | *A*) = 0.03/0.04.

So P(*B* | *A*) = 3/4.

This means

if Sam overslept,

then the probability of him

being late for school is 3/4 (= 75%).