If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

# Conditional probability and combinations

Probability that I picked a fair coin given that I flipped 4 heads out of 6 tosses. Created by Sal Khan.

## Want to join the conversation?

• Bayes Theorem? May I know which video teaches it? (Tried a search but couldn't find it) • by following the link in the 1st A to the 1st Q, by proc.null ... I found http://oscarbonilla.com/2009/05/visualizing-bayes-theorem/ posted by Benjamin.keep ...

---------------------------------------------------

Brief explanation:

1) picture (or better yet sketch) a Venn diagram with overlapping circles A and B

2) note that the 'area' (probability) for the intersection of these two, AB, can be written as:
P( AB ) = P( A | B ) * P( B )
i.e. the probability that an 'event' is in both A and B equals the probability of an 'event' being in A given that it is in B, times the probability an 'event' is in B
Similarly:
P( AB ) = P( B | A ) * P( A )

3) as both are equal to P( AB )
P( A | B ) * P( B ) = P( B | A ) * P( A )

4) divide both sides by P( B ) to get:
P( A | B ) = P( B | A ) * P( A ) / P( B )

This is Bayes' Theorem.
• I don't understand why the formula changes between the two branches (picking fair coin vs picking fair coin). When picking the fair coin, P(B|A)=(combination of 4 out of 6) / 2^6 x (1/3). When picking the unfair coin, the P(B) becomes MULTIPLIED by (combination of 4 out of 6) and the unfair coin outcomes (80%^4 x 20%^2). In my head, it should be Divided by (80%^4 x 20%^2). Can anyone help? • Great question - I see how that could be confusing.

In the case of the fair coin, the probability of each outcome is equal at 0.5 for heads and 0.5 for tails. Because they are equally likely, the probability can be calculated by simply using a proportion - the combinations 4 out of 6 proportional to the total number of possible EQUALLY LIKELY outcomes.

In the case of the unfair coin with heads at 80%, the proportion won't work because the outcomes are not equally likely. If you tried a proportion with the unfair coin you would get a probability which doesn't take into account the 30% advantage that heads has. That is why Sal switched formulas to use one which is based on the multiplication rule of probability, so he could multiply the 20% in for all the tails outcomes (80%^4 heads outcomes, and 20%^2 tails outcomes). This formula is known as the Probability Mass Function of the Binomial Distribution. Sal has a whole bunch of videos on the Binomial distribution in a later section.

Hope this helped!
• How do you decide whether to use the combination formula n!/(n-k)!k! used in this video or to use the permutation formula n!/(n-k)! used in the next video (birthday problem probability) ? It seems like you would never use the permutation formula because it counts redundant sets but he uses it in the next video but not this one. • Choosing to count permutations vs counting combinations involves considering if a different order of results is relevant. For example, when flipping coins it only matters if a result is H, it doesn't matter exactly which coin is heads. When choosing birthdays, when person 1 has B-day January 1 and person 2 has B-day January 2, that is a different result from person 1 has B-day January 2 and person 2 has B-day January 1.
• Since I need captions to understand what's being said, my eyes were confounded by the poor video quality. It would be good to redo this. • i think this particular questions is not fathomable to me because it seems confusing. is there any other example which explains this question better. i'm totally confused • I beg you change the quality please , we arnt in 2005 no more • At , Sal shows the P(4/6 heads) = (P(F) * P(4/6 heads | F)) + (P(U) * P(4/6 heads | U)). I don't quite understand why we are adding both sets of probabilities (fair and unfair) in order to get the P(4/6 heads). Can anyone clarify? • There are 2 ways to get 4H out of 6:
(1) with the fair coin. and (2) with the unfair coin (convince yourself of this).
Breaking the problem into parts, get the probability for the fair coin, then for the unfair coin, then add them together to get the total probability (since the coin can be fair OR unfair, you can add the probabilities).
The probability for the fair coin is: P(4H/6 | fair) * P(fair) (that is: P(you get a fair coin) * P( a fair coin gets you 4H/6 ).
Similarly the probability for the unfair coin is P(4H/6 | unfair ) * P(unfair) (that is: P(you get an unfair coin) * P( the unfair coin gets you 4H/6).
• I keep seeing P( A | B ) defined as:
P( A | B) = P( The intersection of A & B) / P( B )
But if the events are independent, then P( A | B ) = P( A ).
Can these two forms be reconciled? Usually in mathematics the definition would cover both these situations but I can not see how the first definition works out to P( A ) when the intersection of A and B is empty.

Any help would be appreciated,
Mark
(1 vote) • When you calculate the probability of getting heads in a number of flips, why do you multiply the probability of heads with tails? I expected you will multiply the probability of the heads only, could you clarify?  