Probability

Go to Problems

Conditional Probability

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



Serious about Learning Data Science and Machine Learning ?

Learn this and a lot more with Scaler's Data Science industry vetted curriculum.
Conditional probability
Problem Score Companies Time Status
Probability of Raining 30
10:23
How can he win? 30
BCG
8:16
White Marble Probability 30 3:42
Boy or girl paradox 30
5:34
Is it a queen? 30
4:45
Bayes theorem
Normal and continuous distribution
Problem Score Companies Time Status
Distribution Percentage 30 5:44
Random variables
Problem Score Companies Time Status
Product probability 30
12:43
Random variable's probability 30
7:05
New variance 30
8:11
Toss random variable 30
2:24
Probability distributions
Problem Score Companies Time Status
Standard deviation 30
3:02
Probability Distribution 50
18:06