Main content
Statistics and probability
Course: Statistics and probability > Unit 9
Lesson 5: Binomial random variables- Binomial variables
- Recognizing binomial variables
- 10% Rule of assuming "independence" between trials
- Identifying binomial variables
- Binomial distribution
- Visualizing a binomial distribution
- Binomial probability example
- Generalizing k scores in n attempts
- Free throw binomial probability distribution
- Graphing basketball binomial distribution
- Binompdf and binomcdf functions
- Binomial probability (basic)
- Binomial probability formula
- Calculating binomial probability
© 2023 Khan AcademyTerms of usePrivacy PolicyCookie Notice
Binomial distribution
Sal introduces the binomial distribution with an example.
Want to join the conversation?
- I'm confused with these factorials (!) In the problem aroundhow does 5!/4!=5? 6:12(5 votes)
5! = 5•4•3•2•1
4! = 4•3•2•1
5! 5•4•3•2•1
── = ─────────
4! 4•3•2•1
5!
── = 5
4!(33 votes)
- I believe Sal's approach of using 5Cx/2^5 where x is the exact number of heads only works because we have assumed a fair coin here. How would we solve this problem if, say the probability of heads on our coin was 60%? I think we would have to use something involving Bernoulli trials.(6 votes)
- Indeed would would use Bernoulli like trials! In particar, we'd raise 0.6 to the Xth power, and (1-0.6) to the (n-x)th power. Then we'd multiply those together and with the number of combinations. So we'd say that p=0.6, and the formula would be:
n nCk x * p^x * (1-p)^(n-x)
(8 votes)
- Why are probabilitiy distributions so often simetrical?(2 votes)
- In this case, the graph is symmetrical because in one trial, the probability of success equals the probability of failure which equals 50%. I.e. you are equally likely to get a head or a tail when you flip a fair coin.
Say the coin was a trick coin, that gave you heads 2/3 of the time, and tails 1/3 of the time. The graph in this case would not be symmetrical.
I made a program to help with visualizing this. Try it here,
http://www.khanacademy.org/cs/a/5672233519939584
Change the probability of success from 0.5 to 0.67 (equiv to 2/3) to see what happens(8 votes)
- If 15 dates are selected at random, what is probability of getting two Sundays?(2 votes)
- depends on the range of dates they are selected from, if they are only from a range of one year there will not be exactly 1 in 7 days that are Sundays(1 vote)
- I have a very silly question. Ya I know it's would be very silly to ask but I can't resist asking this! How can you know that for getting a consecutive 2 or 3 or 4 heads in a row, you will multiply the probability of each event.
I know that sum them up would be nonsense cause for example with 3 consecutive heads: 0.5+0.5+0.5 = 1.5 > 1.
Still I want to intuitively feel why multiplication is the best here?? Tks a lot!(3 votes)- Have you looked at the tree idea before? Say the tree has a stem of 1 which we split three ways so every one of three branches has 1/3 "thickness". Now if you grow three branches out of that one, they add up to 1 * "thickness" of the parent branch. But that one isn't 1, it's 1/3 of the stem thickness. The daughter branches are each 1/3 "thickness" of the parent for example. But that must mean they are 1/3 * 1/3 * stem which I arbitrarily chose to be 1. Does that image make a little bit more sense? It's not limited to binomial distribution problems as I tried to indicate with the three branches instead of 2 (binary).(4 votes)
- If we have to flip a coin 10 times, what is the probability of getting tails 7 times?(3 votes)
- There are 10C7 = 10!∕(7! ∙ 3!) = 120 outcomes that contain 7 Tails and 3 Heads.
There are 2^10 = 1,024 possible outcomes in total.
So, the probability of flipping 7 Tails and 3 Heads is
120∕1,024 = 15∕128(2 votes)
- Does addition of all the values give the total probability?(2 votes)
- It depends on what you mean by total probability. The probability of having exactly 2 heads is 5/32, which is 15.625% or 0.15625
To arrive at that probability, we didn't do any addition.
If you mean using addition so we can find the total possible number of ways that the coins can be flipped, it is true that we can add the number of ways that there can be zero head, plus the number of ways there can be one head, plus the number of ways there can be 2 heads, plus the number of ways there can be 3 heads, plus the number of ways there can be 4 heads, plus the number of ways there can be 5 heads.
1 + 5 + 10 + 10 + 5 + 1 = 32 different outcomes when you flip a coin 5 times
If you add the fractions, you get
1/32 + 5/32 + 10/32 + 10/32 + 5/32 + 1/32 = 32/32 = 1/1 = 1
The answer of one doesn't tell you much about the coin flip outcomes, unless you are checking that the probability of zero heads plus the probability of one head plus the probability of two heads plus the probability of three heads plus the probability of four heads plus the probability of five heads will add up to 100 percent of the total outcomes.
In other words, the probability that you will get either 0, 1, 2, 3, 4, or 5 heads is 1 (which is 100%)(3 votes)
- I came across a question which asked me what is THE EXPANSION OF THE BIONOMIAL in algebra. What does that mean?(2 votes)
- The expansion (multiplying out) of (a+b)^n is like the distribution for flipping a coin n times. For the ith term, the coefficient is the same - nCi. Instead of i heads' and n-i tails', you have (a^i) * (b^(n-i)).
e.g. (a+b)^4 = a^4 + 4*a^3*b + 6*a^2*b^2 + 4*a*b^3 + b^4(1 vote)
- To make sure I get it right "6_C_3" is the notation of 6! / [ 3! (6-3)! ], whis is interpreted as out of 6 different combination, you are interested of the of the probability of getting 3 you are intereste in. Is that correct? But we decide to sketch the tree, that is branching off in two different directions or even more? I am a little confused. For example if we had an imaginary coin with three sides, how would be the notation?(2 votes)
- You are right about the combination notation.
You can say, "How many possible combinations of 6 books, taken 3 at a time, exist?"
If we sketch the tree, it works pretty well for the coin-flip style questions. However, with a three-sided coin, or something similar, we would just have to treat two of the flip results as a "failure" in our "experiment," and the remaining result as a "success." That would enable us to treat the distribution as a binomial distribution.(2 votes)
- a tiny bit before, Sal said that 5!/4! was 5. How did he figure that out? Just wanted to know, because there's prolly some kind of formula for figuring that out. 6:12
Thanks!(2 votes)- This can be seen by applying the definition of factorials and canceling like factors from top and bottom.
5!/4! = (1*2*3*4*5)/(1*2*3*4) = 5/1 = 5.
Have a blessed, wonderful day!(2 votes)
Video transcript
- [Voiceover] Let's
define a random variable x as being equal to the number of heads, I'll just write capital H for short, the number of heads from flipping coin, from flipping a fair coin, we're gonna assume it's a fair coin, from flipping coin five times. Five times. Like all random variables this
is taking particular outcomes and converting them into numbers. And this random variable,
it could take on the value x equals zero, one, two,
three, four or five. And I what want to do is figure
out what's the probability that this random variable
takes on zero, can be one, can be two, can be three,
can be four, can be five. To do that, first let's
think about how many possible outcomes are there from
flipping a fair coin five times. Let's think about this. Let's write possible outcomes. Possible outcomes from five flips. From five flips. These aren't the possible
outcomes for the random variable, this is literally the
number of possible outcomes from flipping a coin five times. For example, one possible outcome could be tails, heads, tails, heads, tails. Another possible outcome could be heads, heads, heads, tails, tails. That is one of the
equally likely outcomes, that's another one of the
equally likely outcomes. How many of these are there? For each flip you have two possibilities. Let's write this down. Let me... The first flip, the first flip
there's two possibilities, times two for the second flip,
times two for the third flip. Actually maybe we'll not
use the time notation, you might get confused
with the random variable. Two possibilities for the first flip, two possibilities for the second flip, two possibilities for the third flip, two possibilities for the fourth flip, and then two possibilities
for the fifth flip, or two to the fifth equally
likely possibilities from flipping a coin five times, which is, of course, equal to 32. This is going to be helpful because for each of the values that the
random variable can take on, we just have to think about how many of these equally likely
possibilities would result in the random variable
taking on that value. Let's just delve into it to see what we're actually talking about. I'll do it in this
light, let me do it in... I'll start in blue. Let's think about the probability that our random variable
x is equal to one. Well actually, let me start with zero. The probability that our random
variable x is equal to zero. That would mean that you got
no heads out of the five flips. Well there's only one way, one out of the 32 equally likely possibilities,
that you get no heads. That's the one where
you just get five tails. So this is just going to be, this is going to be equal to one out of the 32 equally
likely possibilities. Now, for this case, to think in terms of binomial coefficients, and
combinatorics, and all of that, it's much easier to
just reason through it, but just so we can think in
terms it'll be more useful as we go into higher values
for our random variable. This is all buildup for
the binomial distribution, so you get a sense of
where the name comes from. So let's write it in those terms. This one, this one, this one right over here, one way to think about that in
combinatorics is that you had five flips and you're choosing
zero of them to be heads. Five flips and you're choosing
zero of them to be heads. Let's verify that five
choose zero is indeed one. So five choose zero. Write it over here. Five choose zero is equal
to five factorial over, over five minus zero factorial. Well actually over zero factorial times five minus zero factorial. Well zero factorial is one, by definition, so this is going to be five
factorial, over five factorial, which is going to be equal to one. Once again I like reasoning through it instead of blindly applying a formula, but I just wanted to show you that these two ideas are consistent. Let's keep going. I'm going to do x equals one all the way up to x equals five. If you are inspired, and I
encourage you to be inspired, try to fill out the whole thing, what's the probability that x equals one, two, three, four or five. So let's go to the
probability that x equals two. Or sorry, that x equals one. The probability that x equals
one is going to be equal to... Well how do you get one head? It could be, the first one could be head and then the rest of
them are gonna be tails. The second one could be head and then the rest of
them are gonna be tails. I could write them all
out but you can see that there's five different
places to have that one head. So five out of the 32
equally likely outcomes involve one head. Let me write that down. This is going to be equal to five out of 32 equally likely outcomes. Which of course is the same
thing, this is going to be the same thing as saying I got five flips, and I'm choosing one of them to be heads. So that over 32. You could verify that five factorial over one factorial times five minus-- Actually let me just do it just so that you don't have to take my word for it. So five choose one is
equal to five factorial over one factorial, which is just one, times five minus four-- Sorry,
five minus one factorial. Which is equal to five
factorial over four factorial, which is just going to be equal to five. All right, we're making good progress. Now in purple let's think
about the probability that our random variable x is equal to two. Well this is going to be equal to, and now I'll actually
resort to the combinatorics. You have five flips and you're choosing two
of them to be heads. Over 32 equally likely possibilities. This is the number of possibilities that result in two heads. Two of the five flips
have chosen to be heads, I guess you can think of it
that way, by the random gods, or whatever you want to say. This is the fraction of the 32
equally likely possibilities, so this is the probability
that x equals two. What's this going to be?
I'll do it right over here. And actually no reason for me to have to keep switching colors. So five choose two is going
to be equal to five factorial over two factorial times five minus two factorial. Five minus two factorial. So this is five factorial over two factorial times three factorial. And this is going to be equal to five times four times three times two, I could write times one but that doesn't really
do anything for us. Then two factorial's just going to be two. Then the three factorial
is three times two. I could write times one, but once again doesn't do anything for us. That cancels with that. Four divided by two is two. Five times two is 10. So this is equal to 10. This right over here is equal to 10/32. 10/32. And obviously we could
simplify this fraction, but I like to leave it this way because we're now thinking
everything is in terms of 32nds. There's a 1/32 chance x equals zero, 5/32 chance that x equals one and a 10/32 chance that x equals two. Let's keep on going. I'll go in orange. What is the probability that our random variable x is equal to three? Well this is going to be five, out of the five flips we're
going to need to choose three of them to be heads to figure out which of the possibilities
involve exactly three heads. And this is over 32 equally
likely possibilities. And this is going to be equal to, five choose three is
equal to five factorial over three factorial times
five minus three factorial. Let me just write it down. Five minus three factorial, which is equal to five factorial over three factorial times two factorial. That's exactly what we had up here and we just swapped three and the two, so this also is going to be equal to 10. So this is also going
to be equal to 10/32. All right, two more to go. And I think you're going to start seeing a little bit of a symmetry here. One, five, 10, 10, let's keep going. Let's keep going, and I
haven't used white yet. Maybe I'll use white. The probability that our random
variable x is equal to four. Well, out of our five
flips we want to select four of them to be heads,
or out of the five-- We're obviously not actively selecting. One way to think of it,
we want to figure out the possibilities that
involve out of the five flips, four of them are chosen to be heads, or four of them are heads. And this is over 32 equally
likely possibilities. So five choose four is
equal to five factorial over four factorial times
five minus four factorial which is equal to, well that's just going
to be five factorial, this is going to be one
factorial right over here. That doesn't change the value, you just multiply one
factorial times four factorial, so it's five factorial
over four factorial, which is equal to five. So once again this is 5/32. And you could have reasoned through this because if you're saying
you want five heads, that means you have one tail. There's five different places
you could put that one tail. There are five
possibilities with one tail. Five of the 32 equally likely. And then, and you could probably guess what we're gonna get for x equals five because having five heads means you have zero tails, and there's only gonna be
one possibility out of the 32 with zero tails, where you have all heads. Let's write that down. The probability, the probability that our random
variable x is equal to five. So we have all five heads. You could say this is five and we're choosing five
of them to be heads. Out of the 32 equally
likely possibilities. Well five choose five,
that's going to be... Let me just write it here since I've done it for all of the other ones. Five choose five is five
factorial over five factorial times five minus five factorial. Well this right over
here is zero factorial, which is equal to one, so this whole thing simplifies to one. This is going to be one out of-- 1/32. So you see the symmetry. 1/32, 1/32. 5/32, 5/32; 10/32, 10/32. And that makes sense because
the probability of getting five heads is the same as the
probability of getting zero tails, and the probability of getting zero tails should be the same as the
probability of getting zero heads. I'll leave you there for this video. In the next video we'll graphically
represent this and we'll see the probability distribution
for this random variable.