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.

Main content

# Binomial distribution

## Video transcript

so 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 from flipping coin from flipping a fair coin we're going to assume it's a fair coin from flipping coin five times five times and so 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 what I want to do is figure out well what's the probability that this random variable takes on zero can be 1 can be 2 can be 3 can be 4 can be 5 and so to do that first let's think about how many possible outcomes are there from flipping a fair coin five times so let's think about this so 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 pot the number of possible outcomes for 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 these that is one of the equally likely outcomes that's another one of the equally likely outcomes how many of these are there well for each flip you have two equally you have two possibilities so let's write this down so let me let me so the first flip the first flip there's two possibilities times two for the second flip times two for the third flip actually not me not use a time notation we might get confused with the random variable to 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 is equal to 32 and so this is going to be helpful because for each of the values that the reign variable can take on we just have to think about well how many of these equally likely possibilities would result in the random variable taking on that value and let's let's let's just delve into it to see what we're actually talking about all right now I'll do it in this light let me do it in I'll start in blue all right so let's think about the probability that our random variable X is equal to 1 well actually let me start with 0 the probability that our random variable X is equal to 0 so that would mean that you've got no heads out of the 5 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 5 where you get 5 tails so this is just going to be this is going to be equal to 1 out of the 32 equally likely possibilities now for this case you know to kind of think in terms of kind of the you know binomial coefficients and combinatorics and and all of that it's much easier to just reason through it but just so we can think about think in those terms and it'll be more useful as we go into into higher values for our random variable and it's also you know this is all build up for the binomial distribution so you get a sense of where the name comes from let's write it in those terms so this one this one this one right over here the way one way to think about that in combinatorics is that you had 5 flips and you're choosing 0 of them to be heads 5 flips and you're choosing 0 of them to be heads and let's verify that 5 choose 0 is indeed 1 so 5 choose 0 let me write it right over here 5 choose 0 is equal to 5 factorial over over over 5 minus 0 factorial over 5 actually over 0 factorial times 5 minus 0 factorial 5 minus 0 factorial well this is 0 factorial is 1 by definition and so this is going to be 5 factorial over 5 factorial which is it going to be equal to 1 once again I like reason through it instead of blindly applying a formula but I just wanted to show you that these these two ideas are consistent so let's keep going and I'm going to do X equals 1 all the way up to X equals 5 and if you are inspired and I encourage you to be inspired I try to fill it out the whole thing what's probably that x equals 1 2 3 4 or 5 so let's go to the probability that x equals 2 or start x equals 1 so the probability that x equals 1 is going to be equal to well how do you get 1 head well it could be the first one could be head and then the rest of them are going to be tails the second one could be head and then the rest of them are going to be tails I could write them all out but you could see that there's just five different places for to have that one head so 5 out of the 32 equally likely outcomes involve one head so let me write that down so this is going to be equal to this is going to be equal to 5 out of 32 equally likely outcomes which of course is the same thing this is going to be the same thing as saying look I got 5 flips and I'm choosing one of them I'm choosing one of them to be heads so that over 32 and you could verify that 5 factorial over 1 factorial times 5 minus actually let me just do it just so that you don't have to take my word for it so 5 choose 1 is equal to 5 factorial over 1 factorial which is just 1 times 5 minus 4 sorry 5 minus 1 factorial which is equal to 5 factorial over 4 factorial which is just going to be equal to 5 all right we're making good progress so now let in purple let's think about the probability that our random variable X is equal to 2 well this is going to be equal to and now actually resort to the combinatorics so this is you have 5 flips and you're choosing 2 of them to be heads over 32 equally likely possibilities so this is the number of possibilities that result in two in two heads two of the five flips have chosen to be heads I guess you could think of it that way by it by the by the random gods or whatever you want to say and that's so this is the fraction of the 32 equally likely possibility so there's a probability that x equals 2 well what's this going to be well I'll do it right over here and actually no reason for me to have to keep switching colors so 5 choose 2 is going to be equal to 5 factorial over over 2 factorial times 5 minus 2 factorial 5 minus 2 factorial so this is 5 factorial over 2 factorial times 3 factorial and this is going to be equal to 5 times 4 times 3 times 2 I could write x 1 but that doesn't really do anything for us and then 2 factorial is just going to be 2 and then the 3 factorial is 3 times 2 I could write x 1 but once again doesn't do anything for us that cancels with that 4 divided by 2 is 2 5 times 2 is 10 so this is equal to 10 this right over here is equal to 10 30 seconds 10 30 seconds 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 30 seconds there's a 1 30 second chance x equals 0 5 thirty seconds chance that x equals 1 and a 1030 seconds chance that x equals 2 let's keep on going all right I'll go in orange so what is the probability that our random variable X is equal to 3 well this is going to be 5 out of the 5 flips we're going to choose where we're going to need to choose 3 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 so 5 choose 3 is equal to 5 factorial over 3 factorial times 5 minus 3 factorial make sure we just write down 5 minus 3 factorial which is equal to 5 factorial over 3 factorial times 2 factorial times 2 factorial well that's exactly what we had up here we just swap swap three and the two so this also is going to be equal to ten so this is also going to be equal to ten thirty Seconds all right two more to go and I think you're going to start seeing a little bit of a symmetry here one five ten ten let's keep going let's keep going and I haven't used white yet so maybe I'll use white the probability 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 yeah before oh and we want to see that let me you know what we're obviously not actively selecting one way to think about 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 5 choose 4 is equal to 5 factorial over 4 factorial times 5 minus 4 factorial which is equal to well that's just going to be 5 factorial this is going to be 1 factorial right over here so it doesn't change the value of the just we're multiplying 1 factorial times 4 factorial so it's 5 factorial over 4 factorial which is equal to 5 so once again this is 5/32 and you could have reasoned through this because if you're saying you want 5 heads that means you have one tail and that there's only 5 different places you could put that one tail 5 there are 5 possibilities with one tail 5 of the 32 equally likely and then and you could probably guess what we're going to get for x equals 5 because having five heads means you have 0 tails and there's only going to be one possibility out of the 32 with 0 tails or will that have all heads let's write that down so the probability the probability that a random variable X is equal to 5 so we have all 5 heads and you could say this this is 5 and we're choosing 5 of them to be heads out of the 32 equally likely possibilities well 5 choose 5 that's going to be actually let me just write it here since I've done it for all the other ones 5 choose 5 is 5 factorial Oh over five factorial times five minus five factorial well this right over here is zero factorial which is equal to one and so this whole thing simplifies to 1 so this is going to be one one 30 seconds and so you see the symmetry one thirty second one thirty seconds five thirty seconds five thirty seconds ten thirty seconds ten thirty seconds and that makes sense because the probability of getting five heads is the same as a probability of getting zero tails and the probability getting zero tails should be the same as the probability of getting zero heads so I'll leave you there for this video in the next video we'll kind of graphically represent this and see we'll see the probability distribution for this random variable