 This is a video about the mean and variance of a binomial distribution. Suppose that we have a random variable which has the binomial distribution where n is the number of trials and p is the probability of success. It can be proved that the mean of this distribution, or the expected value of x, is equal to n times p, the number of trials times the probability of success. It can also be proved that the variance sigma squared of the distribution is equal to n times p times 1 minus p. For example, suppose that the random variable x has the binomial distribution with 100 trials and three-fifths as the probability of success. Then the mean is equal to 100 times three-fifths, which is 60. And the variance is equal to 100 times three-fifths times two-fifths, which is equal to 24. So you can see that it's very simple to work out the mean and variance of a binomally distributed random variable using these two formulae. Let's look at some examples. Suppose we have a factory that makes teddy bears. Let's assume that the factory makes 500 bears every day. And on average, 9 out of 10 of them are stitched perfectly. Let's work out the mean and standard deviation for the number of bears that are stitched perfectly each day. Well, here we're dealing with a random variable that has the binomial distribution with 500 trials and nine-tenths as the probability of success. So the mean can be calculated by multiplying 500 and nine-tenths, which is 450. The variance can be calculated by multiplying 500 and nine-tenths and one-tenth, which is 45. We just need to remember that the standard deviation is the square root of the variance. So the standard deviation will be the square root of 45, which is approximately 6.71. Now let's look at a harder example. Suppose we have a random variable that has the binomial distribution with mean 20 and standard deviation 2. And suppose we want to know the probability that x is greater than 20. Well, we're told that x has the binomial distribution, but we don't know how many trials there are or what the probability of success is. So let's say that the number of trials is n and the probability of success is p. We need to work these out in order to calculate any probabilities. But the question tells us that the mean is 20, and we know that the mean is calculated by multiplying n and p. So it must be that n times p is equal to 20. In the same way, it must be that np times 1 minus p is equal to the variance, which is 2 squared, i.e. 4. So np times 1 minus p is equal to 4. From these two facts, we can use a trick to find what 1 minus p is. Notice that 1 minus p is np times 1 minus p divided by np. So 1 minus p is actually equal to the variance divided by the mean. And in this case, that's 4 divided by 20. 420th is a fifth. So 1 minus p is equal to a fifth. It follows that p is 4 fifths. The next step is to work out n, and we can use a similar trick for that. Because n is equal to np divided by p. So n is going to be the mean divided by p, which in this case is 20 divided by 4 fifths. And if you do that sum, you'll find that it's equal to 25. Okay, now we know the number of trials and the probability of success. So we know that x has the binomial distribution with 25 trials and 4 fifths as the probability of success. We can use the tables to calculate probabilities for this distribution. But there's a little problem because the probability of success is greater than a half. Remember that in this situation, we need to think about the number of failures instead of the number of successes. So let's say that y is 25 minus x, so that it's equal to the number of failures. y will have the binomial distribution with 25 trials and one fifth as the probability. The question was asking for the probability that x is greater than 20, and this will be equal to the probability that y is less than 5. Because 20 successes is the same thing as 5 failures. So more than 20 successes is the same thing as fewer than 5 failures. The probability that y is less than 5 is the same as the probability that y is less than or equal to 4, and this is something that we can look up in the tables. We find the table where n is 25. We look for the column that's headed by 0.2 because 0.2 is a fifth. And we follow along the line from 4 to get 0.4207. And that's the answer to our question. The probability of getting more than 20 successes is 0.4207. This completes my video about the mean and variance of the binomial distribution. Remember that mu equals n times p and sigma squared, the variance, is equal to np times 1 minus p. Thank you for watching.