The ** conditional probability** of event

*B*is the probability that the event will occur given the knowledge that event

*A*has already occurred.

This probability is written *P(B|A)*, notation for the *probability of B given A*. In the case where events *A* and *B* are *independent* (where event *A* has no effect on the probability of event *B*), the conditional probability of event *B* given event *A* is simply the probability of event *B*, that is *P(B)*.

From this definition, the conditional probability *P(B|A)* is easily obtained by dividing by *P(A)*:

Given when P(A) is greater than 0.

Example-1:

In a card game, suppose a player needs to draw two cards of the same suit in order to win. Of the 52 cards, there are 13 cards in each suit. Suppose first the player draws a heart. Now the player wishes to draw a second heart. Since one heart has already been chosen, there are now 12 hearts remaining in a deck of 51 cards.

So the conditional probability: *P(Draw second heart|First card a heart) = 12/51*

Example-2 :

Your neighbor has 2 children. You learn that he has a son, Joe. What is the probability that Joe’s sibling is a brother?

The “obvious” answer that Joe’s sibling is equally likely to have been born male or female suggests that the probability the other child is a boy is 1/2.

This is not correct! Consider the experiment of selecting a random family having two children and recording whether they are boys or girls. Then, the sample space is S = {BB,BG,GB,GG}, where, e.g., outcome “BG” means that the first-born child is a boy and the second-born is a girl.

Assuming boys and girls are equally likely to be born, the 4 elements of S are equally likely. The event, E, that the neighbor has a son is the set E = {BB,BG,GB}. The event, F, that the neighbor has two boys (i.e., Joe has a brother) is the set F = {BB}.

We want to compute P(F|E) = P(F ∩ E) P(E) = P({BB}) P({BB,BG,GB}) = 1/4 / 3/4 = 1 / 3