{"id":512,"date":"2024-10-18T02:16:44","date_gmt":"2024-10-18T02:16:44","guid":{"rendered":"https:\/\/pressbooks.ccconline.org\/mat1260\/?post_type=chapter&#038;p=512"},"modified":"2024-12-12T20:50:48","modified_gmt":"2024-12-12T20:50:48","slug":"5-4-binomial-distribution","status":"publish","type":"chapter","link":"https:\/\/pressbooks.ccconline.org\/mat1260\/chapter\/5-4-binomial-distribution\/","title":{"raw":"5.4: Binomial Distribution","rendered":"5.4: Binomial Distribution"},"content":{"raw":"<div id=\"N10B10\" class=\"section\">\r\n<div class=\"sectionContain\">\r\n<h2  ><span title=\"Quick scroll up\">Binomial Random Variables<\/span><\/h2>\r\n<p id=\"N10B17\">So far, in our discussion about discrete random variables, we have been introduced to:<\/p>\r\n\r\n<ol>\r\n \t<li>\r\n<p id=\"N10B1D\">The probability distribution, which tells us which values a variable takes, and how often it takes them.<\/p>\r\n<\/li>\r\n \t<li>\r\n<p id=\"N10B21\">The mean of the random variable, which tells us the long-run average value that the random variable takes.<\/p>\r\n<\/li>\r\n \t<li>\r\n<p id=\"N10B25\">The standard deviation of the random variable, which tells us a typical (or long-run average) distance between the mean of the random variable and the values it takes.<\/p>\r\n<\/li>\r\n<\/ol>\r\n<p id=\"N10B29\">We now introduce a special class of discrete random variables that are very common because, as you\u2019ll see, they come up in many situations:\u00a0<em>binomial random variables.<\/em><\/p>\r\n<p id=\"N10B2F\">Here\u2019s how we\u2019ll present this material. First, we\u2019ll explain what kind of random experiments give rise to a binomial random variable and how the binomial random variable is defined in those types of experiments.<\/p>\r\n<p id=\"N10B32\">We\u2019ll then present the probability distribution of the binomial random variable, which will be presented as a formula (which, as you remember, is one of the three ways in which a probability distribution of a discrete random variable can be presented), and explain why the formula makes sense. We\u2019ll conclude our discussion by presenting the mean and standard deviation of the binomial random variable.<\/p>\r\n<p id=\"N10B35\">As we just mentioned, we\u2019ll start by describing what kind of random experiments give rise to a binomial random variable. We\u2019ll call this type of random experiment a \u201cbinomial experiment.\u201d<\/p>\r\n\r\n<h2 id=\"N10B38\">Binomial Experiment<\/h2>\r\n<\/div>\r\n<\/div>\r\n<div id=\"N10B3D\" class=\"section\">\r\n<div class=\"sectionContain\">\r\n<p id=\"N10B44\">Binomial experiments are random experiments that consist of a fixed number of repeated trials, like tossing a coin 10 times, randomly choosing 10 people, rolling a die 5 times, etc. These trials, however, need to be independent in the sense that the outcome in one trial has no effect on the outcome in other trials. In each of these repeated trials there is one outcome that is of interest to us (we call this outcome \u201csuccess\u201d), and each of the trials is identical in the sense that the probability that the trial will end in a \u201csuccess\u201d is the same in each of the trials. So for example, if our experiment is tossing a coin 10 times, and we are interested in the outcome \u201cheads\u201d (our \u201csuccess\u201d), then this will be a binomial experiment, since the 10 trials are independent, and the probability of success is 1\/2 in each of the 10 trials. Let\u2019s summarize and give more examples.<\/p>\r\n<p id=\"N10B47\">To summarize, the requirements for a random experiment to be a binomial experiment are as follows:<\/p>\r\n\r\n<ul>\r\n \t<li>A fixed number (n) of trials<\/li>\r\n \t<li>Each trial must be independent of the others<\/li>\r\n \t<li>Each trial has just two possible outcomes, called\u00a0<em>success<\/em>\u00a0(the outcome of interest) and\u00a0<em>failure<\/em><\/li>\r\n \t<li>There is a constant\u00a0<em>probability (p) of success<\/em>\u00a0for each trial, the complement of which is the\u00a0<em>probability (1 \u2013 p) of failure<\/em><\/li>\r\n<\/ul>\r\n<p id=\"N10B63\">In binomial random experiments, the number of successes in n trials is random. It can be as low as 0, if all the trials end up in failure, or as high as n, if all n trials end in success.<\/p>\r\n<p id=\"N10B66\">The random variable X that represents the number of successes in those n trials is called\u00a0<em>binomial<\/em>, and is determined by the values of n and p. We say, \u201cX is binomial with n = \u2026 and p = \u2026\u201d<\/p>\r\n\r\n<div class=\"examplewrap\">\r\n<div class=\"example clearfix\">\r\n<div class=\"textbox textbox--examples\"><header class=\"textbox__header\">\r\n<h3 class=\"textbox__title\">Example<\/h3>\r\n<\/header>\r\n<div class=\"textbox__content\">\r\n<h4>Random Experiments (Binomial or Not?)<\/h4>\r\n<div>\r\n<p id=\"N10B71\">Let\u2019s consider a few random experiments.<\/p>\r\n<p id=\"N10B74\">In each of them, we\u2019ll decide whether the random variable is binomial. If it is, we\u2019ll determine the values for n and p. If it isn\u2019t, we\u2019ll explain why not.<\/p>\r\n\r\n<ol class=\"upper-alpha\">\r\n \t<li>\r\n<p id=\"N10B7B\">A fair coin is flipped 20 times; X represents the number of heads.<\/p>\r\n<p id=\"N10B7E\"><em>X is binomial with n = 20 and p = 0.5<\/em>.<\/p>\r\n<p id=\"N10B87\"><\/p>\r\n<\/li>\r\n \t<li>\r\n<p id=\"N10B8B\">You roll a fair die 50 times; X is the number of times you get a six.<\/p>\r\n<p id=\"N10B8E\"><em>X is binomial with n = 50 and p = 1\/6<\/em>.<\/p>\r\n<p id=\"N10B93\"><\/p>\r\n<\/li>\r\n \t<li>\r\n<p id=\"N10B97\">Roll a fair die repeatedly; X is the number of rolls it takes to get a six.<\/p>\r\n<p id=\"N10B9A\"><em>X is not binomial, because the number of trials is not fixed<\/em>.<\/p>\r\n<p id=\"N10B9F\"><\/p>\r\n<\/li>\r\n \t<li>\r\n<p id=\"N10BA3\">Draw 3 cards at random, one after the other,\u00a0<em>without replacement<\/em>, from a set of 4 cards consisting of one club, one diamond, one heart, and one spade; X is the number of diamonds selected.<\/p>\r\n<p id=\"N10BA9\"><em>X is not binomial, because the selections are not independent<\/em>. (The probability (p) of success is not constant, because it is affected by previous selections.)<\/p>\r\n<p id=\"N10BAE\"><\/p>\r\n<\/li>\r\n \t<li>\r\n<p id=\"N10BB2\">Draw 3 cards at random, one after the other,\u00a0<em>with replacement<\/em>, from a set of 4 cards consisting of one club, one diamond, one heart, and one spade; X is the number of diamonds selected. Sampling with replacement ensures independence.<\/p>\r\n<p id=\"N10BB8\"><em>X is binomial with n = 3 and p = 1\/4<\/em>.<\/p>\r\n<p id=\"N10BBD\"><\/p>\r\n<\/li>\r\n \t<li>\r\n<p id=\"N10BC1\">Approximately 1 in every 20 children has a certain disease. Let X be the number of children with the disease out of a random sample of 100 children. Although the children are sampled without replacement, it is assumed that we are sampling from such a vast population that the selections are virtually independent.<\/p>\r\n<p id=\"N10BC4\"><em>X is binomial with n = 100 and p = 1\/20 = 0.05<\/em>.<\/p>\r\n<p id=\"N10BCA\"><\/p>\r\n<\/li>\r\n \t<li>\r\n<p id=\"N10BCD\">The probability of having blood type B is 0.1. Choose 4 people at random; X is the number with blood type B.<\/p>\r\n<p id=\"N10BD0\"><em>X is binomial with n = 4 and p = 0.1<\/em>.<\/p>\r\n<p id=\"N10BD7\"><\/p>\r\n<\/li>\r\n \t<li>\r\n<p id=\"N10BDD\">A student answers 10 quiz questions completely at random; the first five are true\/false, the second five are multiple choice, with four options each. X represents the number of correct answers.<\/p>\r\n<p id=\"N10BE0\"><em>X is not binomial, because p changes from 1\/2 to 1\/4<\/em>.<\/p>\r\n<\/li>\r\n<\/ol>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<div id=\"N10BED\" class=\"section\">\r\n<div class=\"sectionContain\">\r\n<h2><span title=\"Quick scroll up\">Comments<\/span><\/h2>\r\n<p id=\"N10BF4\"><em>Example D<\/em>\u00a0above was not binomial because sampling without replacement resulted in dependent selections. In particular, the probability of the second card being a diamond is very dependent on whether or not the first card was a diamond: the probability is 0 if the first card was a diamond, 1\/3 if the first card was not a diamond.<\/p>\r\n<p id=\"N10BF9\">In contrast,\u00a0<em>Example E<\/em>\u00a0was binomial because sampling with replacement resulted in independent selections: the probability of any of the 3 cards being a diamond is 1\/4 no matter what the previous selections have been.<\/p>\r\n<p id=\"N10BFF\">On the other hand, when you take a relatively small random sample of subjects from a large population, even though the sampling is without replacement, we can assume independence because the mathematical effect of removing one individual from a very large population on the next selection is negligible. For example, in\u00a0<em>Example F<\/em>, we sampled 100 children out of the population of all children. Even though we sampled the children without replacement, whether one child has the disease or not really has no effect on whether another child has the disease or not. The same is true for\u00a0<em>Example G<\/em>.<\/p>\r\n<p id=\"N10C08\">The convention is to \u201cfudge\u201d the requirement of independence as long as the population is at least 10 times the sample size.<\/p>\r\n\r\n<\/div>\r\n<\/div>\r\n<table id=\"N10C0F_bx\" class=\"theorem labeled\">\r\n<thead>\r\n<tr>\r\n<th>\r\n<h5>Rule of Thumb<\/h5>\r\n<\/th>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr>\r\n<td>\r\n<div class=\"theorem\">\r\n<div class=\"statement\">\r\n<p id=\"N10C17\">The number (X) of successes in a sample of size n taken without replacement from a population with proportion (p) of successes is approximately binomial with n and p as long as the sample size (n) is at most 10% of the population size (N).<\/p>\r\n<p id=\"N10C1A\">In symbols, this would be:\u00a0<em>n \u2264 .10N<\/em>.<\/p>\r\n<p id=\"N10C20\">This is the same as saying the population size is greater than or equal to 10 times the sample size. In symbols this is:\u00a0<em>N \u2265 10n<\/em>.<\/p>\r\n\r\n<\/div>\r\n<\/div><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<div class=\"textbox textbox--exercises\"><header class=\"textbox__header\">\r\n<h3 class=\"textbox__title\">Did I get this?<\/h3>\r\n<\/header>\r\n<div class=\"textbox__content\">\r\n\r\nA Department of Transportation report about air travel found that, nationwide, 78% of all flights are on time. Suppose a random sample of 50 flights is selected from all nationwide flights that were completed in the past 30 days (over 1000 flights). Let the random variable X be defined as the number of sampled flights that arrived on time.\r\n\r\n[h5p id=\"124\"]\r\n\r\n<\/div>\r\n<\/div>\r\n<div class=\"textbox textbox--exercises\"><header class=\"textbox__header\">\r\n<h3 class=\"textbox__title\">Did I get this?<\/h3>\r\n<\/header>\r\n<div class=\"textbox__content\">\r\n\r\n[h5p id=\"125\"]\r\n\r\n<\/div>\r\n<\/div>\r\n<div class=\"textbox textbox--exercises\"><header class=\"textbox__header\">\r\n<h3 class=\"textbox__title\">Did I get this?<\/h3>\r\n<\/header>\r\n<div class=\"textbox__content\">\r\n\r\n[h5p id=\"126\"]\r\n\r\n<\/div>\r\n<\/div>\r\n<p id=\"b294342f6019473cafc0a89092c82ade\">Now that we understand what a binomial random variable is, and when it arises, it\u2019s time to discuss its probability distribution. We\u2019ll start with a simple example and then generalize to a formula.<\/p>\r\n\r\n<div id=\"de8555fbec19475fa148d298eeb8c6a0\" class=\"examplewrap\">\r\n<div class=\"example clearfix\">\r\n<div class=\"textbox textbox--examples\"><header class=\"textbox__header\">\r\n<h3 class=\"textbox__title\">Example<\/h3>\r\n<\/header>\r\n<div class=\"textbox__content\">\r\n<h4>Deck of Cards<\/h4>\r\n<div>\r\n<p id=\"df7c2288638c44de9b53ca3aa613d127\">Consider a regular deck of 52 cards, in which there are 13 cards of each suit: hearts, diamonds, clubs and spades. We select 3 cards at random\u00a0<em class=\"italic\">with replacement<\/em>. Let X be the number of diamond cards we got (out of the 3).<\/p>\r\n<p id=\"f09b187fddca4728bff6d4517783145d\">We have 3 trials here, and they are independent (since the selection is with replacement). The outcome of each trial can be either success (diamond) or failure (not diamond), and the probability of success is 1\/4 in each of the trials.<\/p>\r\n<p id=\"c0995a17ae8141b4af08e696a683827b\">X, then, is binomial with n = 3 and p = 1\/4.<\/p>\r\n<p id=\"dec6df92056b43b4be41241dad94e844\">Let\u2019s build the probability distribution of X as we did in the chapter on probability distributions. Recall that we begin with a table in which we:<\/p>\r\n\r\n<ul id=\"cc9cc1f9fb304dd78f59e9be191aed6c\">\r\n \t<li>\r\n<p id=\"d99fc02c83ee4ebd8861c8a000e74d8c\">record all possible outcomes in 3 selections, where each selection may result in success (a diamond, D) or failure (a non-diamond, N).<\/p>\r\n<\/li>\r\n \t<li>\r\n<p id=\"d3e9b5428241446eb0e05423e2c0a4cd\">find the value of X that corresponds to each outcome.<\/p>\r\n<\/li>\r\n \t<li>\r\n<p id=\"eae02fdb37cb4f7b9cf0907ab36e93dd\">use simple probability principles to find the probability of each outcome.<\/p>\r\n<\/li>\r\n<\/ul>\r\n<span class=\"imagewrap\"><span class=\"image\"><img id=\"be89e2b60ebf4a1aa44a72d4520615e5\" class=\"img-responsive popimg aligncenter\" title=\"A table of all of the outcomes. Here is the data in the table, given in &amp;quot;Outcome: Value of X, Probability&amp;quot; format: NNN: 0, 3\/4 \u00d7 3\/4 \u00d7 3\/4; NND: 1, 3\/4 \u00d7 3\/4 \u00d7 1\/4; NDN: 1, 3\/4 \u00d7 1\/4 \u00d7 3\/4; DNN: 1, 1\/4 \u00d7 3\/4 \u00d7 3\/4; NDD: 2, 3\/4 \u00d7 1\/4 \u00d7 1\/4; DND: 2, 1\/4 \u00d7 3\/4 \u00d7 1\/4; DDN: 2, 1\/4 \u00d7 1\/4 \u00d7 1\/4; DDD: 3, 1\/4 \u00d7 1\/4 \u00d7 1\/4;\" src=\"https:\/\/oli.cmu.edu\/repository\/webcontent\/72712ec00a0001dc418a87e73e8ebb77\/_u4_probability\/_m3_random_variables\/webcontent\/image078.gif\" alt=\"A table of all of the outcomes. Here is the data in the table, given in &amp;quot;Outcome: Value of X, Probability&amp;quot; format: NNN: 0, 3\/4 \u00d7 3\/4 \u00d7 3\/4; NND: 1, 3\/4 \u00d7 3\/4 \u00d7 1\/4; NDN: 1, 3\/4 \u00d7 1\/4 \u00d7 3\/4; DNN: 1, 1\/4 \u00d7 3\/4 \u00d7 3\/4; NDD: 2, 3\/4 \u00d7 1\/4 \u00d7 1\/4; DND: 2, 1\/4 \u00d7 3\/4 \u00d7 1\/4; DDN: 2, 1\/4 \u00d7 1\/4 \u00d7 1\/4; DDD: 3, 1\/4 \u00d7 1\/4 \u00d7 1\/4;\" \/><\/span><\/span>\r\n<p id=\"e3a170513097475dbd91d2e55d09e4f9\">With the help of the addition principle, we condense the information in this table to construct the actual probability distribution table:<\/p>\r\n<span class=\"imagewrap\"><span class=\"image\"><img id=\"bcb06ae155e74ec9a6e88632a7836775\" class=\"img-responsive popimg aligncenter\" title=\"The probability distribution table has two rows, labeled &amp;quot;X&amp;quot; and &amp;quot;P(X=x).&amp;quot; Here is the data in the table, organized by column. The format is &amp;quot;(X, P(X=x))&amp;quot; 0: 1(3\/4)\u00b3 1: 3(1\/4)\u00b9(3\/4)\u00b2 2: 3(1\/4)\u00b2(3\/4)\u00b9 3: 1(1\/4)\u00b3\" src=\"https:\/\/oli.cmu.edu\/repository\/webcontent\/72712ec00a0001dc418a87e73e8ebb77\/_u4_probability\/_m3_random_variables\/webcontent\/image079.gif\" alt=\"The probability distribution table has two rows, labeled &amp;quot;X&amp;quot; and &amp;quot;P(X=x).&amp;quot; Here is the data in the table, organized by column. The format is &amp;quot;(X, P(X=x))&amp;quot; 0: 1(3\/4)\u00b3 1: 3(1\/4)\u00b9(3\/4)\u00b2 2: 3(1\/4)\u00b2(3\/4)\u00b9 3: 1(1\/4)\u00b3\" \/><\/span><\/span>\r\n\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\nIn order to establish a general formula for the probability that a binomial random variable X takes any given value x, we will look for patterns in the above distribution. From the way we constructed this probability distribution, we know that, in general:\r\n\r\n<\/div>\r\n<\/div>\r\n<span class=\"imagewrap\"><span class=\"image\"><img id=\"a70836e2b1734246b93711c6d7cc36f6\" class=\"img-responsive popimg aligncenter\" title=\"P(X=x) = [ Number of possible outcomes with x successes out of 3 ] \u00d7 [ Probability that each of the outcomes that has x successes out of 3 ]\" src=\"https:\/\/oli.cmu.edu\/repository\/webcontent\/72712ec00a0001dc418a87e73e8ebb77\/_u4_probability\/_m3_random_variables\/webcontent\/image080.gif\" alt=\"P(X=x) = [ Number of possible outcomes with x successes out of 3 ] \u00d7 [ Probability that each of the outcomes that has x successes out of 3 ]\" \/><\/span><\/span>\r\n<p id=\"bec5f139c9134d3099a069d1edb7c261\">Let\u2019s start with the second part, the probability that there will be x successes out of 3, where the probability of success is 1\/4. Notice that the fractions multiplied in each case are for the probability of x successes (where each success has a probability of p = 1\/4) and the remaining (3 \u2013 x) failures (where each failure has probability of 1 \u2013 p = 3\/4).<\/p>\r\n<span class=\"imagewrap\"><span class=\"image\"><img id=\"e5882d7b1b574161b0321173540883b2\" class=\"img-responsive popimg aligncenter\" title=\"This probability distribution table is nearly the same as the previous one, but presents the calculations in a different way. The table has two rows, labeled &amp;quot;X&amp;quot; and &amp;quot;P(X=x).&amp;quot; Here is the data in the table, organized by column. The format is &amp;quot;(X, P(X=x))&amp;quot; 0: 1 \u00d7 (1\/4)^0 \u00d7 (3\/4)^(3-0); 1: 3 \u00d7 (1\/4)^1 \u00d7 (3\/4)^(3-1); 2: 3 \u00d7 (1\/4)^2 \u00d7 (3\/4)^(3-2); 3: 1 \u00d7 (1\/4)^3 \u00d7 (3\/4)^(3-3);\" src=\"https:\/\/oli.cmu.edu\/repository\/webcontent\/72712ec00a0001dc418a87e73e8ebb77\/_u4_probability\/_m3_random_variables\/webcontent\/image081.gif\" alt=\"This probability distribution table is nearly the same as the previous one, but presents the calculations in a different way. The table has two rows, labeled &amp;quot;X&amp;quot; and &amp;quot;P(X=x).&amp;quot; Here is the data in the table, organized by column. The format is &amp;quot;(X, P(X=x))&amp;quot; 0: 1 \u00d7 (1\/4)^0 \u00d7 (3\/4)^(3-0); 1: 3 \u00d7 (1\/4)^1 \u00d7 (3\/4)^(3-1); 2: 3 \u00d7 (1\/4)^2 \u00d7 (3\/4)^(3-2); 3: 1 \u00d7 (1\/4)^3 \u00d7 (3\/4)^(3-3);\" \/><\/span><\/span>\r\n<p id=\"c9da24ad76d843a59dbd362db0c893db\">So in general:<\/p>\r\n<span class=\"imagewrap\"><span class=\"image\"><img id=\"c325526d77f24c8ab39be63eeb699867\" class=\"img-responsive popimg aligncenter\" title=\"[ Probability of each of the outcomes that has x successes out of 3 ] = (1\/4)^x \u00d7 (3\/4)^(3-x)\" src=\"https:\/\/oli.cmu.edu\/repository\/webcontent\/72712ec00a0001dc418a87e73e8ebb77\/_u4_probability\/_m3_random_variables\/webcontent\/image082.gif\" alt=\"[ Probability of each of the outcomes that has x successes out of 3 ] = (1\/4)^x \u00d7 (3\/4)^(3-x)\" \/><\/span><\/span>\r\n<p id=\"a7dbc21a52914eec9f68f7cfba8fd655\">Let\u2019s move on to talk about the number of possible outcomes with x successes out of three. Here it is harder to see the pattern, so we\u2019ll give the following mathematical result.<\/p>\r\n\r\n<div id=\"feae6e5f8b364e8e836de02225562f5f\" class=\"section\">\r\n<div class=\"sectionContain\">\r\n<h2><span title=\"Quick scroll up\">Result<\/span><\/h2>\r\n<p id=\"af2ca1e8bb2f40f1b808f22e3044ca26\">Consider a random experiment that consists of n trials, each one ending up in either success or failure. The number of possible outcomes in the sample space that have exactly k successes out of n is:<\/p>\r\n[latex]\\frac{\\mathcal{n}!}{\\mathcal{k}!\\left(\\mathcal{n}-\\mathcal{k}\\right)!}[\/latex]\r\n<p id=\"a0dfab5e6adf46a69aed81566f5ea901\">Note that n! is read \u201cn factorial\u201d and is defined to be the product 1 * 2 * 3 * \u2026 * n. 0! is defined to be 1.<\/p>\r\n\r\n<div id=\"b9037e08887044e5951bd11e7f1ab14a\" class=\"examplewrap\">\r\n<div class=\"example clearfix\">\r\n<div class=\"textbox textbox--examples\"><header class=\"textbox__header\">\r\n<h3 class=\"textbox__title\">Example<\/h3>\r\n<\/header>\r\n<div class=\"textbox__content\">\r\n<h4>Ear Piercings<\/h4>\r\n<div>\r\n<p id=\"e168b2bf688245e0a8be2364b35d78ed\">You choose 12 male college students at random and record whether they have any ear piercings (success) or not. There are many possible outcomes to this experiment (actually, 4,096 of them!).<\/p>\r\n<p id=\"caf3bbda55d4431f8faef42a9c9c350f\">In how many of the possible outcomes of this experiment are there exactly 8 successes (students who have at least one ear pierced)?<\/p>\r\n<p id=\"b0b509c729ec4094b67d2fd5ab80e9be\">There is no way that we would start listing all these possible outcomes. The result above comes to our rescue.<\/p>\r\n<p id=\"b6737f2781a64c65847b617f416a3d07\">The result says that in an experiment like this, where you repeat a trial n times (in our case, we repeat it n = 12 times, once for each student we choose), the number of possible outcomes with exactly 8 successes (out of 12) is:<\/p>\r\n[latex]\\frac{12!}{8!\\left(12-8\\right)!}=\\frac{1\\times2\\times3\\times...\\times12}{\\left(1\\times2\\times3\\times...\\times8\\right)\\left(1\\times2\\times3\\times4\\right)}=495[\/latex]\r\n\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<div class=\"textbox textbox--exercises\"><header class=\"textbox__header\">\r\n<h3 class=\"textbox__title\">Did I get this?<\/h3>\r\n<\/header>\r\n<div class=\"textbox__content\">\r\n\r\n[h5p id=\"127\"]\r\n\r\n<\/div>\r\n<\/div>\r\n<div id=\"db5fbf00fc524963aee9728839cfd485\" class=\"examplewrap\">\r\n<div class=\"example clearfix\">\r\n<div class=\"textbox textbox--examples\"><header class=\"textbox__header\">\r\n<h3 class=\"textbox__title\">Example<\/h3>\r\n<\/header>\r\n<div class=\"textbox__content\">\r\n<div class=\"examplewrap\">\r\n<div class=\"example clearfix\">\r\n<h4>Cards Revisited<\/h4>\r\n<div>\r\n<p id=\"a0dc853217aa44f69349183b8319936a\">Let\u2019s go back to our example, in which we have n = 3 trials (selecting 3 cards). We saw that there were 3 possible outcomes with exactly 2 successes out of 3. The result confirms this since:<\/p>\r\n[latex]\\frac{3!}{2!\\left(3-2\\right)!}=\\frac{1\\times2\\times3}{\\left(1\\times2\\right)\\left(1\\right)}=3[\/latex]\r\n\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<p id=\"e2440552adc042658a68df5f9b87359d\">In general, then<\/p>\r\n<span class=\"imagewrap\"><span class=\"image\"><img id=\"e00149778b1c477e9d822a621eb058ce\" class=\"img-responsive popimg aligncenter\" title=\"[ Number of possible outcomes with x successes out of 3 ] = ( 3! ) \/ [ x! \u00d7 (3-x)! ]\" src=\"https:\/\/oli.cmu.edu\/repository\/webcontent\/72712ec00a0001dc418a87e73e8ebb77\/_u4_probability\/_m3_random_variables\/webcontent\/image086.gif\" alt=\"[ Number of possible outcomes with x successes out of 3 ] = ( 3! ) \/ [ x! \u00d7 (3-x)! ]\" \/><\/span><\/span>\r\n\r\n<\/div>\r\n<\/div>\r\n<p id=\"bb83de512a0140079fe2e879aa2beffb\">Putting it all together, we get that the probability distribution of X, which is binomial with n = 3 and p = 1\/4 is:<\/p>\r\n[latex]\\mathcal{P}\\left(\\mathcal{X}=\\mathcal{x}\\right)=\\frac{3!}{\\mathcal{x}!\\left(3-\\mathcal{x}\\right)!}\\left(\\frac{1}{4}\\right)^\\mathcal{x}\\left(\\frac{3}{4}\\right)^{3-\\mathcal{x}}[\/latex] for <em>x<\/em>= 0,1,2,3\r\n\r\nIn general, the number of ways to get x successes (and n - x failures) in n trials is [latex]\\frac{\\mathcal{n}!}{\\mathcal{x}!\\left(\\mathcal{n}-\\mathcal{x}\\right)!}[\/latex]\r\n\r\nTherefore, the probability of x successes (and n \u2013 x failures) in n trials, where the probability of success in each trial is p (and the probability of failure is 1 \u2013 p) is equal to the number of outcomes in which there are x successes out of n trials, times the probability of x successes, times the probability of n \u2013 x failures:\r\n\r\n[latex]\\mathcal{P}\\left(\\mathcal{X}=\\mathcal{x}\\right)=\\frac{\\mathcal{n}!}{\\mathcal{x}!\\left(\\mathcal{n}-\\mathcal{x}\\right)!}\\left(\\mathcal{p}\\right)^\\mathcal{x}\\left(1-\\mathcal{P}\\right)^{\\left(\\mathcal{n}-\\mathcal{x}\\right)}[\/latex]\r\n<p id=\"f24e8e23e37a499fa0cac0a07882ce98\">where\u00a0<em>x\u00a0<\/em>may take any value 0, 1, ... , n.<\/p>\r\n<p id=\"b03800990adb4f5ea0d40694754e6e33\">Let\u2019s look at another example:<\/p>\r\n\r\n<div id=\"cbdb77b4c4eb466587ced1ed2261e045\" class=\"examplewrap\">\r\n<div class=\"example clearfix\">\r\n<div class=\"textbox textbox--examples\"><header class=\"textbox__header\">\r\n<h3 class=\"textbox__title\">Example<\/h3>\r\n<\/header>\r\n<div class=\"textbox__content\">\r\n<h4>Blood Type A<\/h4>\r\n<div>\r\n<p id=\"be29507193d2494f9b6f23d2d68a4987\">The probability of having blood type A is .4. Choose 4 people at random and let X be the number with blood type A.<\/p>\r\n<p id=\"e6983223cba047c2a610eda2c01866fa\">X is a binomial random variable with n = 4 and p = .4.<\/p>\r\n<p id=\"d8e60d8ddd7a4e70981b4f1fc3a1b6cc\">As a review, let\u2019s first find the probability distribution of X the long way: construct an interim table of all possible outcomes in S, the corresponding values of X, and probabilities. Then construct the probability distribution table for X.<\/p>\r\n<span class=\"imagewrap\"><span class=\"image\"><img id=\"cba78ee2bb454200a34e9abeb4c52924\" class=\"img-responsive popimg aligncenter\" title=\"The probability distribution table, with three columns, &amp;quot;S,&amp;quot; &amp;quot;X,&amp;quot; and &amp;quot;Probability.&amp;quot; Here is the data in the table, given in row format (S: X, Probability): NNNN: 0, .4^0 \u00d7 .6^4; NNNA: 1, .4^1 \u00d7 .6^3; NNAN: 1, .4^1 \u00d7 .6^3; NANN: 1, .4^1 \u00d7 .6^3; ANNN: 1, .4^1 \u00d7 .6^3; NNAA: 2, .4^2 \u00d7 .6^2; NANA: 2, .4^2 \u00d7 .6^2; NAAN: 2, .4^2 \u00d7 .6^2; ANNA: 2, .4^2 \u00d7 .6^2; ANAN: 2, .4^2 \u00d7 .6^2; AANN: 2, .4^2 \u00d7 .6^2; NAAA: 3, .4^3 \u00d7 .6^1; ANAA: 3, .4^3 \u00d7 .6^1; AANA: 3, .4^3 \u00d7 .6^1; AAAN: 3, .4^3 \u00d7 .6^1; AAAA: 4, .4^4 \u00d7 .6^0;\" src=\"https:\/\/oli.cmu.edu\/repository\/webcontent\/72712ec00a0001dc418a87e73e8ebb77\/_u4_probability\/_m3_random_variables\/webcontent\/image090.gif\" alt=\"The probability distribution table, with three columns, &amp;quot;S,&amp;quot; &amp;quot;X,&amp;quot; and &amp;quot;Probability.&amp;quot; Here is the data in the table, given in row format (S: X, Probability): NNNN: 0, .4^0 \u00d7 .6^4; NNNA: 1, .4^1 \u00d7 .6^3; NNAN: 1, .4^1 \u00d7 .6^3; NANN: 1, .4^1 \u00d7 .6^3; ANNN: 1, .4^1 \u00d7 .6^3; NNAA: 2, .4^2 \u00d7 .6^2; NANA: 2, .4^2 \u00d7 .6^2; NAAN: 2, .4^2 \u00d7 .6^2; ANNA: 2, .4^2 \u00d7 .6^2; ANAN: 2, .4^2 \u00d7 .6^2; AANN: 2, .4^2 \u00d7 .6^2; NAAA: 3, .4^3 \u00d7 .6^1; ANAA: 3, .4^3 \u00d7 .6^1; AANA: 3, .4^3 \u00d7 .6^1; AAAN: 3, .4^3 \u00d7 .6^1; AAAA: 4, .4^4 \u00d7 .6^0;\" \/><\/span><\/span>\r\n<p id=\"a0069efa0be14790aa57edc006428213\">As usual, the addition rule lets us combine probabilities for each possible value of X:<\/p>\r\n<span class=\"imagewrap\"><span class=\"image\"><img id=\"a62f6ff1255d4dc89ad095729ed8b146\" class=\"img-responsive popimg aligncenter\" title=\"A table with two columns, labeled &amp;quot;X,&amp;quot; and &amp;quot;Probability.&amp;quot; Here is the data, in row format (X, Probability): 0: (1) \u00d7 .4^0 \u00d7 .6^4 = .1296; 1: (4) \u00d7 .4^1 \u00d7 .6^3 = .3456; 2: (6) \u00d7 .4^2 \u00d7 .6^2 = .3456; 3: (4) \u00d7 .4^3 \u00d7 .6^1 = .1536; 4: (1) \u00d7 .4^4 \u00d7 .6^0 = .0256;\" src=\"https:\/\/oli.cmu.edu\/repository\/webcontent\/72712ec00a0001dc418a87e73e8ebb77\/_u4_probability\/_m3_random_variables\/webcontent\/image091.gif\" alt=\"A table with two columns, labeled &amp;quot;X,&amp;quot; and &amp;quot;Probability.&amp;quot; Here is the data, in row format (X, Probability): 0: (1) \u00d7 .4^0 \u00d7 .6^4 = .1296; 1: (4) \u00d7 .4^1 \u00d7 .6^3 = .3456; 2: (6) \u00d7 .4^2 \u00d7 .6^2 = .3456; 3: (4) \u00d7 .4^3 \u00d7 .6^1 = .1536; 4: (1) \u00d7 .4^4 \u00d7 .6^0 = .0256;\" \/><\/span><\/span>\r\n<p id=\"ea5fccb8a522411d9a1ecb4828f30f2c\">Now let\u2019s apply the formula for the probability distribution of a binomial random variable, and see that by using it, we get exactly what we got the long way.<\/p>\r\n<p id=\"ee8b933b0b8445778921c144e181f49b\">Recall that the general formula for the probability distribution of a binomial random variable with n trials and probability of success p is:<\/p>\r\n[latex]\\mathcal{P}\\left(\\mathcal{X}=\\mathcal{x}\\right)=\\frac{\\mathcal{n}!}{\\mathcal{x}!\\left(\\mathcal{n}-\\mathcal{x}\\right)!}\\mathcal{p}^\\mathcal{x}\\left(1-\\mathcal{p}\\right)^{\\left(\\mathcal{n}-\\mathcal{x}\\right)}[\/latex] for <em>x<\/em> = 0, 1, 2, 3, \u2026 , n\r\n<p id=\"f674214a1cd24b36be53d71b30f156c8\">In our case, X is a binomial random variable with n = 4 and p = .4, so its probability distribution is:<\/p>\r\n[latex]\\mathcal{P}\\left(\\mathcal{X}=\\mathcal{x}\\right)=\\frac{4!}{\\mathcal{x}!\\left(4-\\mathcal{x}\\right)!}\\left(0.4\\right)^\\mathcal{x}\\left(0.6\\right)^{\\left(4-\\mathcal{x}\\right)}[\/latex]\u00a0for <em>x<\/em> = 0, 1, 2, 3, 4\r\n<p id=\"b86719b887aa4490b4a3e11e0df0cd4a\">Let\u2019s use this formula to find P(X = 2) and see that we get exactly what we got before.<\/p>\r\n[latex]\\mathcal{P}\\left(\\mathcal{X}=2\\right)=\\frac{4!}{2!\\left(4-\\mathcal{x}\\right)!}\\left(0.4\\right)^2\\left(0.6\\right)^{\\left(4-2\\right)}=\\frac{1\\times2\\times3\\times4}{\\left(1\\times2\\right)\\left(1\\times2\\right)}\\left(0.4\\right)^2\\left(0.6\\right)^2=0.3456[\/latex]\r\n\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<p id=\"d29a2e9175db4b858907d4f4499df096\">Here is another interesting example.<\/p>\r\n\r\n<div id=\"ed4b638921ce4ca782af2e67a18d0a51\" class=\"examplewrap\">\r\n<div class=\"example clearfix\">\r\n<div class=\"textbox textbox--examples\"><header class=\"textbox__header\">\r\n<h3 class=\"textbox__title\">Example<\/h3>\r\n<\/header>\r\n<div class=\"textbox__content\">\r\n<h4>Choosing Numbers at Random<\/h4>\r\n<div>\r\n<p id=\"c152cd5239584d8093deb2f7e3423532\">Do people really choose numbers at random?<\/p>\r\n<p id=\"c1258be9e2674b82a3348fbd68241d8c\">Each student in a group of 15 students is asked to each pick a number from 1 to 20 completely at random. 3 of the 15 happen to pick the number 7 (this is a probability of .20). Is this an improbably high proportion to choose a particular number?<\/p>\r\nIf the selections are truly random, then each number from 1 to 20, including 7, has probability p = 1\/20 = .05 of being selected. The number of trials is n = 15. The probability of at least 3 successes in 15 trials, when each trial has probability of success .05, can be found by applying the binomial formula.\r\n\r\nTo make the notation easier, we will use a shorthand notation for the number of possible outcomes with x successes out of n.\u00a0[latex]\\frac{\\mathcal{n}!}{\\mathcal{x}!\\left(\\mathcal{n}-\\mathcal{x}\\right)!}[\/latex]\u00a0will be written as:\u00a0[latex]\\left(\\begin{matrix}\\mathcal{n}\\\\\\mathcal{x}\\\\\\end{matrix}\\right)[\/latex].\r\n\r\n[latex]\\mathcal{P}\\left(\\mathcal{X}\\geq3\\right)=\\mathcal{P}\\left(\\mathcal{X}=3\\right)+\\mathcal{P}\\left(\\mathcal{X}=4\\right)+...+\\mathcal{P}\\left(\\mathcal{X}=15\\right)\\\\\r\n=\\left(\\begin{matrix}15\\\\3\\\\\\end{matrix}\\right)\\left(0.05\\right)^3\\left(0.95\\right)^{12}+\\left(\\begin{matrix}15\\\\4\\\\\\end{matrix}\\right)\\left(0.05\\right)^4\\left(0.95\\right)^{11}+...+\\left(\\begin{matrix}15\\\\15\\\\\\end{matrix}\\right)\\left(0.05\\right)^{15}\\left(0.95\\right)^0\\\\\r\n=.0307+.0049+.0006+...=.0362[\/latex]\r\n<p id=\"c66eac257af141fcacef8f3909b17aec\">where all remaining terms after the first 3 are less than .0001. The probability of at least 3 out of 15 people picking 7, when choosing at random from the numbers 1 to 20, is only .0362. Thus, 3 out of 15 is rather improbably high. People may think they are choosing at random, but in fact they tend to favor certain numbers, like the number 7.<\/p>\r\n\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\nNow let\u2019s look at some truly practical applications of binomial random variables.\r\n\r\n<\/div>\r\n<\/div>\r\n<div id=\"b437086e3bdf4e909f14b01038780cc8\" class=\"examplewrap\">\r\n<div class=\"example clearfix\">\r\n<div class=\"textbox textbox--examples\"><header class=\"textbox__header\">\r\n<h3 class=\"textbox__title\">Example<\/h3>\r\n<\/header>\r\n<div class=\"textbox__content\">\r\n<h4>Airline Flights<\/h4>\r\n<div>\r\n<p id=\"f9461c6c972d4133964ba70b8ee8ffcc\">Past studies have shown that 90% of the booked passengers actually arrive for a flight. Suppose that a small shuttle plane has 45 seats. We will assume that passengers arrive independently of each other. (This assumption is not really accurate, since not all people travel alone, but we\u2019ll use it for the purposes of our experiment).<\/p>\r\n<p id=\"f7c9e7dbe39542e88f131805954a9bdd\">Many times airlines \u201c<em class=\"italic\">overbook<\/em>\u201d flights. This means that theairline sells more tickets than there are seats on the plane. This is due to the fact that sometimes passengers don\u2019t show up, and the plane must be flown with empty seats. However, if they do overbook, they run the risk of having more passengers than seats. So, some passengers may be unhappy. They also have the extra expense of putting those passengers on another flight and possibly supplying lodging.<\/p>\r\n<p id=\"e66521ac489c4719bf71b065726f4fb1\">With these risks in mind, the airline decides to sell more than 45 tickets. If they wish to keep the probability of having more than 45 passengers show up to get on the flight to less than 0.05, how many tickets should they sell?<\/p>\r\n<p id=\"ee06592ec55341bcb3ad30e06d721179\">This is a binomial random variable that represents the number of passengers that show up for the flight. It has p = 0.90, and n to be determined.<\/p>\r\n<p id=\"d3b613977a46473a9275c1ac799dd313\">Suppose theairline sells 50 tickets. Now we have n = 50 and p = 0.90. We want to know P(X &gt; 45), which is 1 \u2013 P(X \u2264 45) = 1 \u2013 0.57 or 0.43. Obviously, all the details of this calculation were not shown, since a statistical technology package was used to calculate the answer. This is certainly more than 0.05, so the airline must sell fewer seats.<\/p>\r\n<p id=\"d044cd15426e4c37bf031beed6041322\">If we reduce the number of tickets sold, we should be able to reduce this probability. We have calculated the probabilities in the following table:<\/p>\r\n\r\n<table id=\"cb78db4a5e2641698931bcdae10d9a42\" class=\"grid\">\r\n<thead>\r\n<tr>\r\n<th colspan=\"1\" rowspan=\"1\" align=\"left\">\r\n<p id=\"aec0d413abcad4905b0925299be6fedbf\"><strong># tickets sold<\/strong><\/p>\r\n<\/th>\r\n<th colspan=\"1\" rowspan=\"1\" align=\"left\">\r\n<p id=\"acfa980303c224a8a8ab6ad1bc0a21505\"><strong>P(X &gt; 45)<\/strong><\/p>\r\n<\/th>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr>\r\n<td colspan=\"1\" rowspan=\"1\" align=\"left\">\r\n<p id=\"ad28eeec97b454420824a55a9856601f0\">50<\/p>\r\n<\/td>\r\n<td colspan=\"1\" rowspan=\"1\" align=\"left\">\r\n<p id=\"aa935fac401ff42ccb78b3d6f8a2802d3\">0.43<\/p>\r\n<\/td>\r\n<\/tr>\r\n<tr class=\"e\">\r\n<td colspan=\"1\" rowspan=\"1\" align=\"left\">\r\n<p id=\"acf44ddae78674f7690698be6c459b7e2\">49<\/p>\r\n<\/td>\r\n<td colspan=\"1\" rowspan=\"1\" align=\"left\">\r\n<p id=\"aeff2d772241f4d959ef1ec1c045e8f66\">0.26<\/p>\r\n<\/td>\r\n<\/tr>\r\n<tr>\r\n<td colspan=\"1\" rowspan=\"1\" align=\"left\">\r\n<p id=\"aac133db4d2114273a160b7d6336329e1\">48<\/p>\r\n<\/td>\r\n<td colspan=\"1\" rowspan=\"1\" align=\"left\">\r\n<p id=\"aea77054bcd684801929f133156b68bbf\">0.13<\/p>\r\n<\/td>\r\n<\/tr>\r\n<tr class=\"e\">\r\n<td colspan=\"1\" rowspan=\"1\" align=\"left\">\r\n<p id=\"ac41f0ddc28f5406192ac81811630ee07\">47<\/p>\r\n<\/td>\r\n<td colspan=\"1\" rowspan=\"1\" align=\"left\">\r\n<p id=\"ac0d8396aa07c43b9aeda3684613f2cd2\">0.04<\/p>\r\n<\/td>\r\n<\/tr>\r\n<tr>\r\n<td colspan=\"1\" rowspan=\"1\" align=\"left\">\r\n<p id=\"ae83ebfe25cd64409b158bc0cea1eb887\">46<\/p>\r\n<\/td>\r\n<td colspan=\"1\" rowspan=\"1\" align=\"left\">\r\n<p id=\"afdbcd586634b4d32a3f599b967e8b46c\">0.008<\/p>\r\n<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<p id=\"f7c59ae40af447af820988f8d644972a\">From this table, we can see that by selling 47 tickets,the airline can reduce the probability that it will have more passengers show up than there are seats to less than 5%.<\/p>\r\n<p id=\"e5314803276947a2816010a418593bb4\">Note: For practice in finding binomial probabilities, you may wish to verify one or more of the results from the table above.<\/p>\r\n\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<h2><span title=\"Quick scroll up\">Mean and Standard Deviation of the Binomial Random Variable<\/span><\/h2>\r\nNow that we understand how to find probabilities associated with a random variable X which is binomial, using either its probability distribution formula or software, we are ready to talk about the mean and standard deviation of a binomial random variable. Let\u2019s start with an example:\r\n<div class=\"examplewrap\">\r\n<div class=\"example clearfix\">\r\n<div class=\"textbox textbox--examples\"><header class=\"textbox__header\">\r\n<h3 class=\"textbox__title\">Example<\/h3>\r\n<\/header>\r\n<div class=\"textbox__content\">\r\n<div class=\"examplewrap\">\r\n<div class=\"example clearfix\">\r\n<h4>Blood Type B\u2014Mean<\/h4>\r\n<div>\r\n<p id=\"N10B37\">Overall, the proportion of people with blood type B is .1. In other words, roughly 10% of the population has blood type B.<\/p>\r\n<p id=\"N10B3A\">Suppose we sample 120 people at random. On average, how many would you expect to have blood type B?<\/p>\r\nThe answer, 12, seems obvious; automatically, you\u2019d multiply the number of people, 120, by the probability of blood type B, .1. This suggests the general formula for finding the mean of a binomial random variable:\r\n\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<p id=\"N10B41\"><em>Claim:<\/em><\/p>\r\nIf X is binomial with parameters n and p, then\r\n<p id=\"N10B4A\"><span class=\"mjx-chtml MathJax_CHTML\"><span class=\"mjx-math\"><span class=\"mjx-mrow\"><span class=\"mjx-msub\"><span class=\"mjx-base\"><span class=\"mjx-mi\"><span class=\"mjx-char MJXc-TeX-math-I\">\u03bc<\/span><\/span><\/span><span class=\"mjx-sub\"><span class=\"mjx-mi\"><span class=\"mjx-char MJXc-TeX-math-I\">X<\/span><\/span><\/span><\/span><span class=\"mjx-mo MJXc-space3\"><span class=\"mjx-char MJXc-TeX-main-R\">=<\/span><\/span><span class=\"mjx-mi MJXc-space3\"><span class=\"mjx-char MJXc-TeX-math-I\">n<\/span><\/span><span class=\"mjx-mi\"><span class=\"mjx-char MJXc-TeX-math-I\">p<\/span><\/span><\/span><\/span><\/span><\/p>\r\nAlthough the formula for mean is quite intuitive, it is not at all obvious what the variance and standard deviation should be. It turns out that:\r\n<p id=\"N10B69\"><em>Claim:<\/em><\/p>\r\n<p id=\"N10B6F\">If X is binomial with parameters n and p, then<\/p>\r\n[latex]\\sigma_\\mathcal{x}^2=\\mathcal{np}\\left(1-\\mathcal{p}\\right);\\sigma_\\mathcal{x}=\\sqrt{\\mathcal{np}\\left(1-\\mathcal{p}\\right)}[\/latex]\r\n\r\n<\/div>\r\n<\/div>\r\n<h2><span title=\"Quick scroll up\">Comment<\/span><\/h2>\r\n<p id=\"N10BE5\">The binomial mean and variance are special cases of our general formulas for the mean and variance of any random variable.<\/p>\r\n[latex]\\mu\\mathcal{x}=\\mathcal{x}_1\\mathcal{p}_1+\\mathcal{x}_2\\mathcal{p}_2+...+\\mathcal{x}_\\mathcal{n}\\mathcal{p}_\\mathcal{n}=\\sum_{\\mathcal{i}=1}^{\\mathcal{n}}{\\mathcal{x}_\\mathcal{i}\\mathcal{p}_\\mathcal{i}}\\\\\r\n\\sigma_\\mathcal{x}^2=\\left(\\mathcal{x}_1-\\mu_\\mathcal{x}\\right)^2\\mathcal{p}_1+\\left(\\mathcal{x}_2-\\mu_\\mathcal{x}\\right)^2\\mathcal{p}_2+...+\\left(\\mathcal{x}_\\mathcal{n}-\\mu_\\mathcal{x}\\right)^2\\mathcal{p}_\\mathcal{n}\\\\\r\n=\\sum_{\\mathcal{i}=1}^{\\mathcal{n}}\\left(\\mathcal{x}_\\mathcal{i}-\\mu_\\mathcal{x}\\right)^2\\mathcal{p}_\\mathcal{i}[\/latex]\r\n\r\nClearly it is much simpler to use the \"shortcut\" formulas\r\n[latex]\\mu_\\mathcal{x}=\\mathcal{np}\\ and\\ \\sigma_\\mathcal{x}^2=\\mathcal{np}\\left(1-\\mathcal{p}\\right);\\sigma_\\mathcal{x}=\\sqrt{\\mathcal{np}\\left(1-\\mathcal{p}\\right)}[\/latex]\u00a0than it would be to calculate the mean and variance or standard deviation from scratch.\r\n<div class=\"examplewrap\">\r\n<div class=\"example clearfix\">\r\n<div class=\"textbox textbox--examples\"><header class=\"textbox__header\">\r\n<h3 class=\"textbox__title\">Example<\/h3>\r\n<\/header>\r\n<div class=\"textbox__content\">\r\n<h4>Blood Type B\u2014Standard Deviation<\/h4>\r\n<div>\r\n<p id=\"N10E34\">Suppose we sample 120 people at random. The number with blood type B should be about 12, give or take how many? In other words, what is the standard deviation of the number X who have blood type B?<\/p>\r\n<p id=\"N10E37\">Since n = 120 and p = .1,<\/p>\r\n[latex]\\sigma_\\mathcal{x}^2=120\\left(0.1\\right)\\left(1-0.1\\right)=10.8;\\sigma_\\mathcal{x}=\\sqrt{10.8}\\approx3.3[\/latex]\r\n<p id=\"N10EC4\">In a random sample of 120 people, we should expect there to be about 12 with blood type B, give or take about 3.3.<\/p>\r\n\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<div class=\"textbox textbox--exercises\"><header class=\"textbox__header\">\r\n<h3 class=\"textbox__title\">Did I get this?<\/h3>\r\n<\/header>\r\n<div class=\"textbox__content\">\r\n\r\n[h5p id=\"128\"]\r\n\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<\/div>","rendered":"<div id=\"N10B10\" class=\"section\">\n<div class=\"sectionContain\">\n<h2><span title=\"Quick scroll up\">Binomial Random Variables<\/span><\/h2>\n<p id=\"N10B17\">So far, in our discussion about discrete random variables, we have been introduced to:<\/p>\n<ol>\n<li>\n<p id=\"N10B1D\">The probability distribution, which tells us which values a variable takes, and how often it takes them.<\/p>\n<\/li>\n<li>\n<p id=\"N10B21\">The mean of the random variable, which tells us the long-run average value that the random variable takes.<\/p>\n<\/li>\n<li>\n<p id=\"N10B25\">The standard deviation of the random variable, which tells us a typical (or long-run average) distance between the mean of the random variable and the values it takes.<\/p>\n<\/li>\n<\/ol>\n<p id=\"N10B29\">We now introduce a special class of discrete random variables that are very common because, as you\u2019ll see, they come up in many situations:\u00a0<em>binomial random variables.<\/em><\/p>\n<p id=\"N10B2F\">Here\u2019s how we\u2019ll present this material. First, we\u2019ll explain what kind of random experiments give rise to a binomial random variable and how the binomial random variable is defined in those types of experiments.<\/p>\n<p id=\"N10B32\">We\u2019ll then present the probability distribution of the binomial random variable, which will be presented as a formula (which, as you remember, is one of the three ways in which a probability distribution of a discrete random variable can be presented), and explain why the formula makes sense. We\u2019ll conclude our discussion by presenting the mean and standard deviation of the binomial random variable.<\/p>\n<p id=\"N10B35\">As we just mentioned, we\u2019ll start by describing what kind of random experiments give rise to a binomial random variable. We\u2019ll call this type of random experiment a \u201cbinomial experiment.\u201d<\/p>\n<h2 id=\"N10B38\">Binomial Experiment<\/h2>\n<\/div>\n<\/div>\n<div id=\"N10B3D\" class=\"section\">\n<div class=\"sectionContain\">\n<p id=\"N10B44\">Binomial experiments are random experiments that consist of a fixed number of repeated trials, like tossing a coin 10 times, randomly choosing 10 people, rolling a die 5 times, etc. These trials, however, need to be independent in the sense that the outcome in one trial has no effect on the outcome in other trials. In each of these repeated trials there is one outcome that is of interest to us (we call this outcome \u201csuccess\u201d), and each of the trials is identical in the sense that the probability that the trial will end in a \u201csuccess\u201d is the same in each of the trials. So for example, if our experiment is tossing a coin 10 times, and we are interested in the outcome \u201cheads\u201d (our \u201csuccess\u201d), then this will be a binomial experiment, since the 10 trials are independent, and the probability of success is 1\/2 in each of the 10 trials. Let\u2019s summarize and give more examples.<\/p>\n<p id=\"N10B47\">To summarize, the requirements for a random experiment to be a binomial experiment are as follows:<\/p>\n<ul>\n<li>A fixed number (n) of trials<\/li>\n<li>Each trial must be independent of the others<\/li>\n<li>Each trial has just two possible outcomes, called\u00a0<em>success<\/em>\u00a0(the outcome of interest) and\u00a0<em>failure<\/em><\/li>\n<li>There is a constant\u00a0<em>probability (p) of success<\/em>\u00a0for each trial, the complement of which is the\u00a0<em>probability (1 \u2013 p) of failure<\/em><\/li>\n<\/ul>\n<p id=\"N10B63\">In binomial random experiments, the number of successes in n trials is random. It can be as low as 0, if all the trials end up in failure, or as high as n, if all n trials end in success.<\/p>\n<p id=\"N10B66\">The random variable X that represents the number of successes in those n trials is called\u00a0<em>binomial<\/em>, and is determined by the values of n and p. We say, \u201cX is binomial with n = \u2026 and p = \u2026\u201d<\/p>\n<div class=\"examplewrap\">\n<div class=\"example clearfix\">\n<div class=\"textbox textbox--examples\">\n<header class=\"textbox__header\">\n<h3 class=\"textbox__title\">Example<\/h3>\n<\/header>\n<div class=\"textbox__content\">\n<h4>Random Experiments (Binomial or Not?)<\/h4>\n<div>\n<p id=\"N10B71\">Let\u2019s consider a few random experiments.<\/p>\n<p id=\"N10B74\">In each of them, we\u2019ll decide whether the random variable is binomial. If it is, we\u2019ll determine the values for n and p. If it isn\u2019t, we\u2019ll explain why not.<\/p>\n<ol class=\"upper-alpha\">\n<li>\n<p id=\"N10B7B\">A fair coin is flipped 20 times; X represents the number of heads.<\/p>\n<p id=\"N10B7E\"><em>X is binomial with n = 20 and p = 0.5<\/em>.<\/p>\n<p id=\"N10B87\">\n<\/li>\n<li>\n<p id=\"N10B8B\">You roll a fair die 50 times; X is the number of times you get a six.<\/p>\n<p id=\"N10B8E\"><em>X is binomial with n = 50 and p = 1\/6<\/em>.<\/p>\n<p id=\"N10B93\">\n<\/li>\n<li>\n<p id=\"N10B97\">Roll a fair die repeatedly; X is the number of rolls it takes to get a six.<\/p>\n<p id=\"N10B9A\"><em>X is not binomial, because the number of trials is not fixed<\/em>.<\/p>\n<p id=\"N10B9F\">\n<\/li>\n<li>\n<p id=\"N10BA3\">Draw 3 cards at random, one after the other,\u00a0<em>without replacement<\/em>, from a set of 4 cards consisting of one club, one diamond, one heart, and one spade; X is the number of diamonds selected.<\/p>\n<p id=\"N10BA9\"><em>X is not binomial, because the selections are not independent<\/em>. (The probability (p) of success is not constant, because it is affected by previous selections.)<\/p>\n<p id=\"N10BAE\">\n<\/li>\n<li>\n<p id=\"N10BB2\">Draw 3 cards at random, one after the other,\u00a0<em>with replacement<\/em>, from a set of 4 cards consisting of one club, one diamond, one heart, and one spade; X is the number of diamonds selected. Sampling with replacement ensures independence.<\/p>\n<p id=\"N10BB8\"><em>X is binomial with n = 3 and p = 1\/4<\/em>.<\/p>\n<p id=\"N10BBD\">\n<\/li>\n<li>\n<p id=\"N10BC1\">Approximately 1 in every 20 children has a certain disease. Let X be the number of children with the disease out of a random sample of 100 children. Although the children are sampled without replacement, it is assumed that we are sampling from such a vast population that the selections are virtually independent.<\/p>\n<p id=\"N10BC4\"><em>X is binomial with n = 100 and p = 1\/20 = 0.05<\/em>.<\/p>\n<p id=\"N10BCA\">\n<\/li>\n<li>\n<p id=\"N10BCD\">The probability of having blood type B is 0.1. Choose 4 people at random; X is the number with blood type B.<\/p>\n<p id=\"N10BD0\"><em>X is binomial with n = 4 and p = 0.1<\/em>.<\/p>\n<p id=\"N10BD7\">\n<\/li>\n<li>\n<p id=\"N10BDD\">A student answers 10 quiz questions completely at random; the first five are true\/false, the second five are multiple choice, with four options each. X represents the number of correct answers.<\/p>\n<p id=\"N10BE0\"><em>X is not binomial, because p changes from 1\/2 to 1\/4<\/em>.<\/p>\n<\/li>\n<\/ol>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div id=\"N10BED\" class=\"section\">\n<div class=\"sectionContain\">\n<h2><span title=\"Quick scroll up\">Comments<\/span><\/h2>\n<p id=\"N10BF4\"><em>Example D<\/em>\u00a0above was not binomial because sampling without replacement resulted in dependent selections. In particular, the probability of the second card being a diamond is very dependent on whether or not the first card was a diamond: the probability is 0 if the first card was a diamond, 1\/3 if the first card was not a diamond.<\/p>\n<p id=\"N10BF9\">In contrast,\u00a0<em>Example E<\/em>\u00a0was binomial because sampling with replacement resulted in independent selections: the probability of any of the 3 cards being a diamond is 1\/4 no matter what the previous selections have been.<\/p>\n<p id=\"N10BFF\">On the other hand, when you take a relatively small random sample of subjects from a large population, even though the sampling is without replacement, we can assume independence because the mathematical effect of removing one individual from a very large population on the next selection is negligible. For example, in\u00a0<em>Example F<\/em>, we sampled 100 children out of the population of all children. Even though we sampled the children without replacement, whether one child has the disease or not really has no effect on whether another child has the disease or not. The same is true for\u00a0<em>Example G<\/em>.<\/p>\n<p id=\"N10C08\">The convention is to \u201cfudge\u201d the requirement of independence as long as the population is at least 10 times the sample size.<\/p>\n<\/div>\n<\/div>\n<table id=\"N10C0F_bx\" class=\"theorem labeled\">\n<thead>\n<tr>\n<th>\n<h5>Rule of Thumb<\/h5>\n<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>\n<div class=\"theorem\">\n<div class=\"statement\">\n<p id=\"N10C17\">The number (X) of successes in a sample of size n taken without replacement from a population with proportion (p) of successes is approximately binomial with n and p as long as the sample size (n) is at most 10% of the population size (N).<\/p>\n<p id=\"N10C1A\">In symbols, this would be:\u00a0<em>n \u2264 .10N<\/em>.<\/p>\n<p id=\"N10C20\">This is the same as saying the population size is greater than or equal to 10 times the sample size. In symbols this is:\u00a0<em>N \u2265 10n<\/em>.<\/p>\n<\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div class=\"textbox textbox--exercises\">\n<header class=\"textbox__header\">\n<h3 class=\"textbox__title\">Did I get this?<\/h3>\n<\/header>\n<div class=\"textbox__content\">\n<p>A Department of Transportation report about air travel found that, nationwide, 78% of all flights are on time. Suppose a random sample of 50 flights is selected from all nationwide flights that were completed in the past 30 days (over 1000 flights). Let the random variable X be defined as the number of sampled flights that arrived on time.<\/p>\n<div id=\"h5p-124\">\n<div class=\"h5p-iframe-wrapper\"><iframe id=\"h5p-iframe-124\" class=\"h5p-iframe\" data-content-id=\"124\" style=\"height:1px\" src=\"about:blank\" frameBorder=\"0\" scrolling=\"no\" title=\"5.4 Learn by doing 1\"><\/iframe><\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"textbox textbox--exercises\">\n<header class=\"textbox__header\">\n<h3 class=\"textbox__title\">Did I get this?<\/h3>\n<\/header>\n<div class=\"textbox__content\">\n<div id=\"h5p-125\">\n<div class=\"h5p-iframe-wrapper\"><iframe id=\"h5p-iframe-125\" class=\"h5p-iframe\" data-content-id=\"125\" style=\"height:1px\" src=\"about:blank\" frameBorder=\"0\" scrolling=\"no\" title=\"5.4 Did I get this? 1\"><\/iframe><\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"textbox textbox--exercises\">\n<header class=\"textbox__header\">\n<h3 class=\"textbox__title\">Did I get this?<\/h3>\n<\/header>\n<div class=\"textbox__content\">\n<div id=\"h5p-126\">\n<div class=\"h5p-iframe-wrapper\"><iframe id=\"h5p-iframe-126\" class=\"h5p-iframe\" data-content-id=\"126\" style=\"height:1px\" src=\"about:blank\" frameBorder=\"0\" scrolling=\"no\" title=\"5.4 Did I get this? 2\"><\/iframe><\/div>\n<\/div>\n<\/div>\n<\/div>\n<p id=\"b294342f6019473cafc0a89092c82ade\">Now that we understand what a binomial random variable is, and when it arises, it\u2019s time to discuss its probability distribution. We\u2019ll start with a simple example and then generalize to a formula.<\/p>\n<div id=\"de8555fbec19475fa148d298eeb8c6a0\" class=\"examplewrap\">\n<div class=\"example clearfix\">\n<div class=\"textbox textbox--examples\">\n<header class=\"textbox__header\">\n<h3 class=\"textbox__title\">Example<\/h3>\n<\/header>\n<div class=\"textbox__content\">\n<h4>Deck of Cards<\/h4>\n<div>\n<p id=\"df7c2288638c44de9b53ca3aa613d127\">Consider a regular deck of 52 cards, in which there are 13 cards of each suit: hearts, diamonds, clubs and spades. We select 3 cards at random\u00a0<em class=\"italic\">with replacement<\/em>. Let X be the number of diamond cards we got (out of the 3).<\/p>\n<p id=\"f09b187fddca4728bff6d4517783145d\">We have 3 trials here, and they are independent (since the selection is with replacement). The outcome of each trial can be either success (diamond) or failure (not diamond), and the probability of success is 1\/4 in each of the trials.<\/p>\n<p id=\"c0995a17ae8141b4af08e696a683827b\">X, then, is binomial with n = 3 and p = 1\/4.<\/p>\n<p id=\"dec6df92056b43b4be41241dad94e844\">Let\u2019s build the probability distribution of X as we did in the chapter on probability distributions. Recall that we begin with a table in which we:<\/p>\n<ul id=\"cc9cc1f9fb304dd78f59e9be191aed6c\">\n<li>\n<p id=\"d99fc02c83ee4ebd8861c8a000e74d8c\">record all possible outcomes in 3 selections, where each selection may result in success (a diamond, D) or failure (a non-diamond, N).<\/p>\n<\/li>\n<li>\n<p id=\"d3e9b5428241446eb0e05423e2c0a4cd\">find the value of X that corresponds to each outcome.<\/p>\n<\/li>\n<li>\n<p id=\"eae02fdb37cb4f7b9cf0907ab36e93dd\">use simple probability principles to find the probability of each outcome.<\/p>\n<\/li>\n<\/ul>\n<p><span class=\"imagewrap\"><span class=\"image\"><img decoding=\"async\" id=\"be89e2b60ebf4a1aa44a72d4520615e5\" class=\"img-responsive popimg aligncenter\" title=\"A table of all of the outcomes. Here is the data in the table, given in &amp;quot;Outcome: Value of X, Probability&amp;quot; format: NNN: 0, 3\/4 \u00d7 3\/4 \u00d7 3\/4; NND: 1, 3\/4 \u00d7 3\/4 \u00d7 1\/4; NDN: 1, 3\/4 \u00d7 1\/4 \u00d7 3\/4; DNN: 1, 1\/4 \u00d7 3\/4 \u00d7 3\/4; NDD: 2, 3\/4 \u00d7 1\/4 \u00d7 1\/4; DND: 2, 1\/4 \u00d7 3\/4 \u00d7 1\/4; DDN: 2, 1\/4 \u00d7 1\/4 \u00d7 1\/4; DDD: 3, 1\/4 \u00d7 1\/4 \u00d7 1\/4;\" src=\"https:\/\/oli.cmu.edu\/repository\/webcontent\/72712ec00a0001dc418a87e73e8ebb77\/_u4_probability\/_m3_random_variables\/webcontent\/image078.gif\" alt=\"A table of all of the outcomes. Here is the data in the table, given in &amp;quot;Outcome: Value of X, Probability&amp;quot; format: NNN: 0, 3\/4 \u00d7 3\/4 \u00d7 3\/4; NND: 1, 3\/4 \u00d7 3\/4 \u00d7 1\/4; NDN: 1, 3\/4 \u00d7 1\/4 \u00d7 3\/4; DNN: 1, 1\/4 \u00d7 3\/4 \u00d7 3\/4; NDD: 2, 3\/4 \u00d7 1\/4 \u00d7 1\/4; DND: 2, 1\/4 \u00d7 3\/4 \u00d7 1\/4; DDN: 2, 1\/4 \u00d7 1\/4 \u00d7 1\/4; DDD: 3, 1\/4 \u00d7 1\/4 \u00d7 1\/4;\" \/><\/span><\/span><\/p>\n<p id=\"e3a170513097475dbd91d2e55d09e4f9\">With the help of the addition principle, we condense the information in this table to construct the actual probability distribution table:<\/p>\n<p><span class=\"imagewrap\"><span class=\"image\"><img decoding=\"async\" id=\"bcb06ae155e74ec9a6e88632a7836775\" class=\"img-responsive popimg aligncenter\" title=\"The probability distribution table has two rows, labeled &amp;quot;X&amp;quot; and &amp;quot;P(X=x).&amp;quot; Here is the data in the table, organized by column. The format is &amp;quot;(X, P(X=x))&amp;quot; 0: 1(3\/4)\u00b3 1: 3(1\/4)\u00b9(3\/4)\u00b2 2: 3(1\/4)\u00b2(3\/4)\u00b9 3: 1(1\/4)\u00b3\" src=\"https:\/\/oli.cmu.edu\/repository\/webcontent\/72712ec00a0001dc418a87e73e8ebb77\/_u4_probability\/_m3_random_variables\/webcontent\/image079.gif\" alt=\"The probability distribution table has two rows, labeled &amp;quot;X&amp;quot; and &amp;quot;P(X=x).&amp;quot; Here is the data in the table, organized by column. The format is &amp;quot;(X, P(X=x))&amp;quot; 0: 1(3\/4)\u00b3 1: 3(1\/4)\u00b9(3\/4)\u00b2 2: 3(1\/4)\u00b2(3\/4)\u00b9 3: 1(1\/4)\u00b3\" \/><\/span><\/span><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p>In order to establish a general formula for the probability that a binomial random variable X takes any given value x, we will look for patterns in the above distribution. From the way we constructed this probability distribution, we know that, in general:<\/p>\n<\/div>\n<\/div>\n<p><span class=\"imagewrap\"><span class=\"image\"><img decoding=\"async\" id=\"a70836e2b1734246b93711c6d7cc36f6\" class=\"img-responsive popimg aligncenter\" title=\"P(X=x) = [ Number of possible outcomes with x successes out of 3 ] \u00d7 [ Probability that each of the outcomes that has x successes out of 3 ]\" src=\"https:\/\/oli.cmu.edu\/repository\/webcontent\/72712ec00a0001dc418a87e73e8ebb77\/_u4_probability\/_m3_random_variables\/webcontent\/image080.gif\" alt=\"P(X=x) = [ Number of possible outcomes with x successes out of 3 ] \u00d7 [ Probability that each of the outcomes that has x successes out of 3 ]\" \/><\/span><\/span><\/p>\n<p id=\"bec5f139c9134d3099a069d1edb7c261\">Let\u2019s start with the second part, the probability that there will be x successes out of 3, where the probability of success is 1\/4. Notice that the fractions multiplied in each case are for the probability of x successes (where each success has a probability of p = 1\/4) and the remaining (3 \u2013 x) failures (where each failure has probability of 1 \u2013 p = 3\/4).<\/p>\n<p><span class=\"imagewrap\"><span class=\"image\"><img decoding=\"async\" id=\"e5882d7b1b574161b0321173540883b2\" class=\"img-responsive popimg aligncenter\" title=\"This probability distribution table is nearly the same as the previous one, but presents the calculations in a different way. The table has two rows, labeled &amp;quot;X&amp;quot; and &amp;quot;P(X=x).&amp;quot; Here is the data in the table, organized by column. The format is &amp;quot;(X, P(X=x))&amp;quot; 0: 1 \u00d7 (1\/4)^0 \u00d7 (3\/4)^(3-0); 1: 3 \u00d7 (1\/4)^1 \u00d7 (3\/4)^(3-1); 2: 3 \u00d7 (1\/4)^2 \u00d7 (3\/4)^(3-2); 3: 1 \u00d7 (1\/4)^3 \u00d7 (3\/4)^(3-3);\" src=\"https:\/\/oli.cmu.edu\/repository\/webcontent\/72712ec00a0001dc418a87e73e8ebb77\/_u4_probability\/_m3_random_variables\/webcontent\/image081.gif\" alt=\"This probability distribution table is nearly the same as the previous one, but presents the calculations in a different way. The table has two rows, labeled &amp;quot;X&amp;quot; and &amp;quot;P(X=x).&amp;quot; Here is the data in the table, organized by column. The format is &amp;quot;(X, P(X=x))&amp;quot; 0: 1 \u00d7 (1\/4)^0 \u00d7 (3\/4)^(3-0); 1: 3 \u00d7 (1\/4)^1 \u00d7 (3\/4)^(3-1); 2: 3 \u00d7 (1\/4)^2 \u00d7 (3\/4)^(3-2); 3: 1 \u00d7 (1\/4)^3 \u00d7 (3\/4)^(3-3);\" \/><\/span><\/span><\/p>\n<p id=\"c9da24ad76d843a59dbd362db0c893db\">So in general:<\/p>\n<p><span class=\"imagewrap\"><span class=\"image\"><img decoding=\"async\" id=\"c325526d77f24c8ab39be63eeb699867\" class=\"img-responsive popimg aligncenter\" title=\"[ Probability of each of the outcomes that has x successes out of 3 ] = (1\/4)^x \u00d7 (3\/4)^(3-x)\" src=\"https:\/\/oli.cmu.edu\/repository\/webcontent\/72712ec00a0001dc418a87e73e8ebb77\/_u4_probability\/_m3_random_variables\/webcontent\/image082.gif\" alt=\"[ Probability of each of the outcomes that has x successes out of 3 ] = (1\/4)^x \u00d7 (3\/4)^(3-x)\" \/><\/span><\/span><\/p>\n<p id=\"a7dbc21a52914eec9f68f7cfba8fd655\">Let\u2019s move on to talk about the number of possible outcomes with x successes out of three. Here it is harder to see the pattern, so we\u2019ll give the following mathematical result.<\/p>\n<div id=\"feae6e5f8b364e8e836de02225562f5f\" class=\"section\">\n<div class=\"sectionContain\">\n<h2><span title=\"Quick scroll up\">Result<\/span><\/h2>\n<p id=\"af2ca1e8bb2f40f1b808f22e3044ca26\">Consider a random experiment that consists of n trials, each one ending up in either success or failure. The number of possible outcomes in the sample space that have exactly k successes out of n is:<\/p>\n<p>[latex]\\frac{\\mathcal{n}!}{\\mathcal{k}!\\left(\\mathcal{n}-\\mathcal{k}\\right)!}[\/latex]<\/p>\n<p id=\"a0dfab5e6adf46a69aed81566f5ea901\">Note that n! is read \u201cn factorial\u201d and is defined to be the product 1 * 2 * 3 * \u2026 * n. 0! is defined to be 1.<\/p>\n<div id=\"b9037e08887044e5951bd11e7f1ab14a\" class=\"examplewrap\">\n<div class=\"example clearfix\">\n<div class=\"textbox textbox--examples\">\n<header class=\"textbox__header\">\n<h3 class=\"textbox__title\">Example<\/h3>\n<\/header>\n<div class=\"textbox__content\">\n<h4>Ear Piercings<\/h4>\n<div>\n<p id=\"e168b2bf688245e0a8be2364b35d78ed\">You choose 12 male college students at random and record whether they have any ear piercings (success) or not. There are many possible outcomes to this experiment (actually, 4,096 of them!).<\/p>\n<p id=\"caf3bbda55d4431f8faef42a9c9c350f\">In how many of the possible outcomes of this experiment are there exactly 8 successes (students who have at least one ear pierced)?<\/p>\n<p id=\"b0b509c729ec4094b67d2fd5ab80e9be\">There is no way that we would start listing all these possible outcomes. The result above comes to our rescue.<\/p>\n<p id=\"b6737f2781a64c65847b617f416a3d07\">The result says that in an experiment like this, where you repeat a trial n times (in our case, we repeat it n = 12 times, once for each student we choose), the number of possible outcomes with exactly 8 successes (out of 12) is:<\/p>\n<p>[latex]\\frac{12!}{8!\\left(12-8\\right)!}=\\frac{1\\times2\\times3\\times...\\times12}{\\left(1\\times2\\times3\\times...\\times8\\right)\\left(1\\times2\\times3\\times4\\right)}=495[\/latex]<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"textbox textbox--exercises\">\n<header class=\"textbox__header\">\n<h3 class=\"textbox__title\">Did I get this?<\/h3>\n<\/header>\n<div class=\"textbox__content\">\n<div id=\"h5p-127\">\n<div class=\"h5p-iframe-wrapper\"><iframe id=\"h5p-iframe-127\" class=\"h5p-iframe\" data-content-id=\"127\" style=\"height:1px\" src=\"about:blank\" frameBorder=\"0\" scrolling=\"no\" title=\"5.4 Did I get this? 3\"><\/iframe><\/div>\n<\/div>\n<\/div>\n<\/div>\n<div id=\"db5fbf00fc524963aee9728839cfd485\" class=\"examplewrap\">\n<div class=\"example clearfix\">\n<div class=\"textbox textbox--examples\">\n<header class=\"textbox__header\">\n<h3 class=\"textbox__title\">Example<\/h3>\n<\/header>\n<div class=\"textbox__content\">\n<div class=\"examplewrap\">\n<div class=\"example clearfix\">\n<h4>Cards Revisited<\/h4>\n<div>\n<p id=\"a0dc853217aa44f69349183b8319936a\">Let\u2019s go back to our example, in which we have n = 3 trials (selecting 3 cards). We saw that there were 3 possible outcomes with exactly 2 successes out of 3. The result confirms this since:<\/p>\n<p>[latex]\\frac{3!}{2!\\left(3-2\\right)!}=\\frac{1\\times2\\times3}{\\left(1\\times2\\right)\\left(1\\right)}=3[\/latex]<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p id=\"e2440552adc042658a68df5f9b87359d\">In general, then<\/p>\n<p><span class=\"imagewrap\"><span class=\"image\"><img decoding=\"async\" id=\"e00149778b1c477e9d822a621eb058ce\" class=\"img-responsive popimg aligncenter\" title=\"[ Number of possible outcomes with x successes out of 3 ] = ( 3! ) \/ [ x! \u00d7 (3-x)! ]\" src=\"https:\/\/oli.cmu.edu\/repository\/webcontent\/72712ec00a0001dc418a87e73e8ebb77\/_u4_probability\/_m3_random_variables\/webcontent\/image086.gif\" alt=\"[ Number of possible outcomes with x successes out of 3 ] = ( 3! ) \/ [ x! \u00d7 (3-x)! ]\" \/><\/span><\/span><\/p>\n<\/div>\n<\/div>\n<p id=\"bb83de512a0140079fe2e879aa2beffb\">Putting it all together, we get that the probability distribution of X, which is binomial with n = 3 and p = 1\/4 is:<\/p>\n<p>[latex]\\mathcal{P}\\left(\\mathcal{X}=\\mathcal{x}\\right)=\\frac{3!}{\\mathcal{x}!\\left(3-\\mathcal{x}\\right)!}\\left(\\frac{1}{4}\\right)^\\mathcal{x}\\left(\\frac{3}{4}\\right)^{3-\\mathcal{x}}[\/latex] for <em>x<\/em>= 0,1,2,3<\/p>\n<p>In general, the number of ways to get x successes (and n &#8211; x failures) in n trials is [latex]\\frac{\\mathcal{n}!}{\\mathcal{x}!\\left(\\mathcal{n}-\\mathcal{x}\\right)!}[\/latex]<\/p>\n<p>Therefore, the probability of x successes (and n \u2013 x failures) in n trials, where the probability of success in each trial is p (and the probability of failure is 1 \u2013 p) is equal to the number of outcomes in which there are x successes out of n trials, times the probability of x successes, times the probability of n \u2013 x failures:<\/p>\n<p>[latex]\\mathcal{P}\\left(\\mathcal{X}=\\mathcal{x}\\right)=\\frac{\\mathcal{n}!}{\\mathcal{x}!\\left(\\mathcal{n}-\\mathcal{x}\\right)!}\\left(\\mathcal{p}\\right)^\\mathcal{x}\\left(1-\\mathcal{P}\\right)^{\\left(\\mathcal{n}-\\mathcal{x}\\right)}[\/latex]<\/p>\n<p id=\"f24e8e23e37a499fa0cac0a07882ce98\">where\u00a0<em>x\u00a0<\/em>may take any value 0, 1, &#8230; , n.<\/p>\n<p id=\"b03800990adb4f5ea0d40694754e6e33\">Let\u2019s look at another example:<\/p>\n<div id=\"cbdb77b4c4eb466587ced1ed2261e045\" class=\"examplewrap\">\n<div class=\"example clearfix\">\n<div class=\"textbox textbox--examples\">\n<header class=\"textbox__header\">\n<h3 class=\"textbox__title\">Example<\/h3>\n<\/header>\n<div class=\"textbox__content\">\n<h4>Blood Type A<\/h4>\n<div>\n<p id=\"be29507193d2494f9b6f23d2d68a4987\">The probability of having blood type A is .4. Choose 4 people at random and let X be the number with blood type A.<\/p>\n<p id=\"e6983223cba047c2a610eda2c01866fa\">X is a binomial random variable with n = 4 and p = .4.<\/p>\n<p id=\"d8e60d8ddd7a4e70981b4f1fc3a1b6cc\">As a review, let\u2019s first find the probability distribution of X the long way: construct an interim table of all possible outcomes in S, the corresponding values of X, and probabilities. Then construct the probability distribution table for X.<\/p>\n<p><span class=\"imagewrap\"><span class=\"image\"><img decoding=\"async\" id=\"cba78ee2bb454200a34e9abeb4c52924\" class=\"img-responsive popimg aligncenter\" title=\"The probability distribution table, with three columns, &amp;quot;S,&amp;quot; &amp;quot;X,&amp;quot; and &amp;quot;Probability.&amp;quot; Here is the data in the table, given in row format (S: X, Probability): NNNN: 0, .4^0 \u00d7 .6^4; NNNA: 1, .4^1 \u00d7 .6^3; NNAN: 1, .4^1 \u00d7 .6^3; NANN: 1, .4^1 \u00d7 .6^3; ANNN: 1, .4^1 \u00d7 .6^3; NNAA: 2, .4^2 \u00d7 .6^2; NANA: 2, .4^2 \u00d7 .6^2; NAAN: 2, .4^2 \u00d7 .6^2; ANNA: 2, .4^2 \u00d7 .6^2; ANAN: 2, .4^2 \u00d7 .6^2; AANN: 2, .4^2 \u00d7 .6^2; NAAA: 3, .4^3 \u00d7 .6^1; ANAA: 3, .4^3 \u00d7 .6^1; AANA: 3, .4^3 \u00d7 .6^1; AAAN: 3, .4^3 \u00d7 .6^1; AAAA: 4, .4^4 \u00d7 .6^0;\" src=\"https:\/\/oli.cmu.edu\/repository\/webcontent\/72712ec00a0001dc418a87e73e8ebb77\/_u4_probability\/_m3_random_variables\/webcontent\/image090.gif\" alt=\"The probability distribution table, with three columns, &amp;quot;S,&amp;quot; &amp;quot;X,&amp;quot; and &amp;quot;Probability.&amp;quot; Here is the data in the table, given in row format (S: X, Probability): NNNN: 0, .4^0 \u00d7 .6^4; NNNA: 1, .4^1 \u00d7 .6^3; NNAN: 1, .4^1 \u00d7 .6^3; NANN: 1, .4^1 \u00d7 .6^3; ANNN: 1, .4^1 \u00d7 .6^3; NNAA: 2, .4^2 \u00d7 .6^2; NANA: 2, .4^2 \u00d7 .6^2; NAAN: 2, .4^2 \u00d7 .6^2; ANNA: 2, .4^2 \u00d7 .6^2; ANAN: 2, .4^2 \u00d7 .6^2; AANN: 2, .4^2 \u00d7 .6^2; NAAA: 3, .4^3 \u00d7 .6^1; ANAA: 3, .4^3 \u00d7 .6^1; AANA: 3, .4^3 \u00d7 .6^1; AAAN: 3, .4^3 \u00d7 .6^1; AAAA: 4, .4^4 \u00d7 .6^0;\" \/><\/span><\/span><\/p>\n<p id=\"a0069efa0be14790aa57edc006428213\">As usual, the addition rule lets us combine probabilities for each possible value of X:<\/p>\n<p><span class=\"imagewrap\"><span class=\"image\"><img decoding=\"async\" id=\"a62f6ff1255d4dc89ad095729ed8b146\" class=\"img-responsive popimg aligncenter\" title=\"A table with two columns, labeled &amp;quot;X,&amp;quot; and &amp;quot;Probability.&amp;quot; Here is the data, in row format (X, Probability): 0: (1) \u00d7 .4^0 \u00d7 .6^4 = .1296; 1: (4) \u00d7 .4^1 \u00d7 .6^3 = .3456; 2: (6) \u00d7 .4^2 \u00d7 .6^2 = .3456; 3: (4) \u00d7 .4^3 \u00d7 .6^1 = .1536; 4: (1) \u00d7 .4^4 \u00d7 .6^0 = .0256;\" src=\"https:\/\/oli.cmu.edu\/repository\/webcontent\/72712ec00a0001dc418a87e73e8ebb77\/_u4_probability\/_m3_random_variables\/webcontent\/image091.gif\" alt=\"A table with two columns, labeled &amp;quot;X,&amp;quot; and &amp;quot;Probability.&amp;quot; Here is the data, in row format (X, Probability): 0: (1) \u00d7 .4^0 \u00d7 .6^4 = .1296; 1: (4) \u00d7 .4^1 \u00d7 .6^3 = .3456; 2: (6) \u00d7 .4^2 \u00d7 .6^2 = .3456; 3: (4) \u00d7 .4^3 \u00d7 .6^1 = .1536; 4: (1) \u00d7 .4^4 \u00d7 .6^0 = .0256;\" \/><\/span><\/span><\/p>\n<p id=\"ea5fccb8a522411d9a1ecb4828f30f2c\">Now let\u2019s apply the formula for the probability distribution of a binomial random variable, and see that by using it, we get exactly what we got the long way.<\/p>\n<p id=\"ee8b933b0b8445778921c144e181f49b\">Recall that the general formula for the probability distribution of a binomial random variable with n trials and probability of success p is:<\/p>\n<p>[latex]\\mathcal{P}\\left(\\mathcal{X}=\\mathcal{x}\\right)=\\frac{\\mathcal{n}!}{\\mathcal{x}!\\left(\\mathcal{n}-\\mathcal{x}\\right)!}\\mathcal{p}^\\mathcal{x}\\left(1-\\mathcal{p}\\right)^{\\left(\\mathcal{n}-\\mathcal{x}\\right)}[\/latex] for <em>x<\/em> = 0, 1, 2, 3, \u2026 , n<\/p>\n<p id=\"f674214a1cd24b36be53d71b30f156c8\">In our case, X is a binomial random variable with n = 4 and p = .4, so its probability distribution is:<\/p>\n<p>[latex]\\mathcal{P}\\left(\\mathcal{X}=\\mathcal{x}\\right)=\\frac{4!}{\\mathcal{x}!\\left(4-\\mathcal{x}\\right)!}\\left(0.4\\right)^\\mathcal{x}\\left(0.6\\right)^{\\left(4-\\mathcal{x}\\right)}[\/latex]\u00a0for <em>x<\/em> = 0, 1, 2, 3, 4<\/p>\n<p id=\"b86719b887aa4490b4a3e11e0df0cd4a\">Let\u2019s use this formula to find P(X = 2) and see that we get exactly what we got before.<\/p>\n<p>[latex]\\mathcal{P}\\left(\\mathcal{X}=2\\right)=\\frac{4!}{2!\\left(4-\\mathcal{x}\\right)!}\\left(0.4\\right)^2\\left(0.6\\right)^{\\left(4-2\\right)}=\\frac{1\\times2\\times3\\times4}{\\left(1\\times2\\right)\\left(1\\times2\\right)}\\left(0.4\\right)^2\\left(0.6\\right)^2=0.3456[\/latex]<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p id=\"d29a2e9175db4b858907d4f4499df096\">Here is another interesting example.<\/p>\n<div id=\"ed4b638921ce4ca782af2e67a18d0a51\" class=\"examplewrap\">\n<div class=\"example clearfix\">\n<div class=\"textbox textbox--examples\">\n<header class=\"textbox__header\">\n<h3 class=\"textbox__title\">Example<\/h3>\n<\/header>\n<div class=\"textbox__content\">\n<h4>Choosing Numbers at Random<\/h4>\n<div>\n<p id=\"c152cd5239584d8093deb2f7e3423532\">Do people really choose numbers at random?<\/p>\n<p id=\"c1258be9e2674b82a3348fbd68241d8c\">Each student in a group of 15 students is asked to each pick a number from 1 to 20 completely at random. 3 of the 15 happen to pick the number 7 (this is a probability of .20). Is this an improbably high proportion to choose a particular number?<\/p>\n<p>If the selections are truly random, then each number from 1 to 20, including 7, has probability p = 1\/20 = .05 of being selected. The number of trials is n = 15. The probability of at least 3 successes in 15 trials, when each trial has probability of success .05, can be found by applying the binomial formula.<\/p>\n<p>To make the notation easier, we will use a shorthand notation for the number of possible outcomes with x successes out of n.\u00a0[latex]\\frac{\\mathcal{n}!}{\\mathcal{x}!\\left(\\mathcal{n}-\\mathcal{x}\\right)!}[\/latex]\u00a0will be written as:\u00a0[latex]\\left(\\begin{matrix}\\mathcal{n}\\\\\\mathcal{x}\\\\\\end{matrix}\\right)[\/latex].<\/p>\n<p>[latex]\\mathcal{P}\\left(\\mathcal{X}\\geq3\\right)=\\mathcal{P}\\left(\\mathcal{X}=3\\right)+\\mathcal{P}\\left(\\mathcal{X}=4\\right)+...+\\mathcal{P}\\left(\\mathcal{X}=15\\right)\\\\  =\\left(\\begin{matrix}15\\\\3\\\\\\end{matrix}\\right)\\left(0.05\\right)^3\\left(0.95\\right)^{12}+\\left(\\begin{matrix}15\\\\4\\\\\\end{matrix}\\right)\\left(0.05\\right)^4\\left(0.95\\right)^{11}+...+\\left(\\begin{matrix}15\\\\15\\\\\\end{matrix}\\right)\\left(0.05\\right)^{15}\\left(0.95\\right)^0\\\\  =.0307+.0049+.0006+...=.0362[\/latex]<\/p>\n<p id=\"c66eac257af141fcacef8f3909b17aec\">where all remaining terms after the first 3 are less than .0001. The probability of at least 3 out of 15 people picking 7, when choosing at random from the numbers 1 to 20, is only .0362. Thus, 3 out of 15 is rather improbably high. People may think they are choosing at random, but in fact they tend to favor certain numbers, like the number 7.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p>Now let\u2019s look at some truly practical applications of binomial random variables.<\/p>\n<\/div>\n<\/div>\n<div id=\"b437086e3bdf4e909f14b01038780cc8\" class=\"examplewrap\">\n<div class=\"example clearfix\">\n<div class=\"textbox textbox--examples\">\n<header class=\"textbox__header\">\n<h3 class=\"textbox__title\">Example<\/h3>\n<\/header>\n<div class=\"textbox__content\">\n<h4>Airline Flights<\/h4>\n<div>\n<p id=\"f9461c6c972d4133964ba70b8ee8ffcc\">Past studies have shown that 90% of the booked passengers actually arrive for a flight. Suppose that a small shuttle plane has 45 seats. We will assume that passengers arrive independently of each other. (This assumption is not really accurate, since not all people travel alone, but we\u2019ll use it for the purposes of our experiment).<\/p>\n<p id=\"f7c9e7dbe39542e88f131805954a9bdd\">Many times airlines \u201c<em class=\"italic\">overbook<\/em>\u201d flights. This means that theairline sells more tickets than there are seats on the plane. This is due to the fact that sometimes passengers don\u2019t show up, and the plane must be flown with empty seats. However, if they do overbook, they run the risk of having more passengers than seats. So, some passengers may be unhappy. They also have the extra expense of putting those passengers on another flight and possibly supplying lodging.<\/p>\n<p id=\"e66521ac489c4719bf71b065726f4fb1\">With these risks in mind, the airline decides to sell more than 45 tickets. If they wish to keep the probability of having more than 45 passengers show up to get on the flight to less than 0.05, how many tickets should they sell?<\/p>\n<p id=\"ee06592ec55341bcb3ad30e06d721179\">This is a binomial random variable that represents the number of passengers that show up for the flight. It has p = 0.90, and n to be determined.<\/p>\n<p id=\"d3b613977a46473a9275c1ac799dd313\">Suppose theairline sells 50 tickets. Now we have n = 50 and p = 0.90. We want to know P(X &gt; 45), which is 1 \u2013 P(X \u2264 45) = 1 \u2013 0.57 or 0.43. Obviously, all the details of this calculation were not shown, since a statistical technology package was used to calculate the answer. This is certainly more than 0.05, so the airline must sell fewer seats.<\/p>\n<p id=\"d044cd15426e4c37bf031beed6041322\">If we reduce the number of tickets sold, we should be able to reduce this probability. We have calculated the probabilities in the following table:<\/p>\n<table id=\"cb78db4a5e2641698931bcdae10d9a42\" class=\"grid\">\n<thead>\n<tr>\n<th colspan=\"1\" rowspan=\"1\" align=\"left\">\n<p id=\"aec0d413abcad4905b0925299be6fedbf\"><strong># tickets sold<\/strong><\/p>\n<\/th>\n<th colspan=\"1\" rowspan=\"1\" align=\"left\">\n<p id=\"acfa980303c224a8a8ab6ad1bc0a21505\"><strong>P(X &gt; 45)<\/strong><\/p>\n<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td colspan=\"1\" rowspan=\"1\" align=\"left\">\n<p id=\"ad28eeec97b454420824a55a9856601f0\">50<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\" align=\"left\">\n<p id=\"aa935fac401ff42ccb78b3d6f8a2802d3\">0.43<\/p>\n<\/td>\n<\/tr>\n<tr class=\"e\">\n<td colspan=\"1\" rowspan=\"1\" align=\"left\">\n<p id=\"acf44ddae78674f7690698be6c459b7e2\">49<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\" align=\"left\">\n<p id=\"aeff2d772241f4d959ef1ec1c045e8f66\">0.26<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\" align=\"left\">\n<p id=\"aac133db4d2114273a160b7d6336329e1\">48<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\" align=\"left\">\n<p id=\"aea77054bcd684801929f133156b68bbf\">0.13<\/p>\n<\/td>\n<\/tr>\n<tr class=\"e\">\n<td colspan=\"1\" rowspan=\"1\" align=\"left\">\n<p id=\"ac41f0ddc28f5406192ac81811630ee07\">47<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\" align=\"left\">\n<p id=\"ac0d8396aa07c43b9aeda3684613f2cd2\">0.04<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"1\" rowspan=\"1\" align=\"left\">\n<p id=\"ae83ebfe25cd64409b158bc0cea1eb887\">46<\/p>\n<\/td>\n<td colspan=\"1\" rowspan=\"1\" align=\"left\">\n<p id=\"afdbcd586634b4d32a3f599b967e8b46c\">0.008<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p id=\"f7c59ae40af447af820988f8d644972a\">From this table, we can see that by selling 47 tickets,the airline can reduce the probability that it will have more passengers show up than there are seats to less than 5%.<\/p>\n<p id=\"e5314803276947a2816010a418593bb4\">Note: For practice in finding binomial probabilities, you may wish to verify one or more of the results from the table above.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<h2><span title=\"Quick scroll up\">Mean and Standard Deviation of the Binomial Random Variable<\/span><\/h2>\n<p>Now that we understand how to find probabilities associated with a random variable X which is binomial, using either its probability distribution formula or software, we are ready to talk about the mean and standard deviation of a binomial random variable. Let\u2019s start with an example:<\/p>\n<div class=\"examplewrap\">\n<div class=\"example clearfix\">\n<div class=\"textbox textbox--examples\">\n<header class=\"textbox__header\">\n<h3 class=\"textbox__title\">Example<\/h3>\n<\/header>\n<div class=\"textbox__content\">\n<div class=\"examplewrap\">\n<div class=\"example clearfix\">\n<h4>Blood Type B\u2014Mean<\/h4>\n<div>\n<p id=\"N10B37\">Overall, the proportion of people with blood type B is .1. In other words, roughly 10% of the population has blood type B.<\/p>\n<p id=\"N10B3A\">Suppose we sample 120 people at random. On average, how many would you expect to have blood type B?<\/p>\n<p>The answer, 12, seems obvious; automatically, you\u2019d multiply the number of people, 120, by the probability of blood type B, .1. This suggests the general formula for finding the mean of a binomial random variable:<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p id=\"N10B41\"><em>Claim:<\/em><\/p>\n<p>If X is binomial with parameters n and p, then<\/p>\n<p id=\"N10B4A\"><span class=\"mjx-chtml MathJax_CHTML\"><span class=\"mjx-math\"><span class=\"mjx-mrow\"><span class=\"mjx-msub\"><span class=\"mjx-base\"><span class=\"mjx-mi\"><span class=\"mjx-char MJXc-TeX-math-I\">\u03bc<\/span><\/span><\/span><span class=\"mjx-sub\"><span class=\"mjx-mi\"><span class=\"mjx-char MJXc-TeX-math-I\">X<\/span><\/span><\/span><\/span><span class=\"mjx-mo MJXc-space3\"><span class=\"mjx-char MJXc-TeX-main-R\">=<\/span><\/span><span class=\"mjx-mi MJXc-space3\"><span class=\"mjx-char MJXc-TeX-math-I\">n<\/span><\/span><span class=\"mjx-mi\"><span class=\"mjx-char MJXc-TeX-math-I\">p<\/span><\/span><\/span><\/span><\/span><\/p>\n<p>Although the formula for mean is quite intuitive, it is not at all obvious what the variance and standard deviation should be. It turns out that:<\/p>\n<p id=\"N10B69\"><em>Claim:<\/em><\/p>\n<p id=\"N10B6F\">If X is binomial with parameters n and p, then<\/p>\n<p>[latex]\\sigma_\\mathcal{x}^2=\\mathcal{np}\\left(1-\\mathcal{p}\\right);\\sigma_\\mathcal{x}=\\sqrt{\\mathcal{np}\\left(1-\\mathcal{p}\\right)}[\/latex]<\/p>\n<\/div>\n<\/div>\n<h2><span title=\"Quick scroll up\">Comment<\/span><\/h2>\n<p id=\"N10BE5\">The binomial mean and variance are special cases of our general formulas for the mean and variance of any random variable.<\/p>\n<p>[latex]\\mu\\mathcal{x}=\\mathcal{x}_1\\mathcal{p}_1+\\mathcal{x}_2\\mathcal{p}_2+...+\\mathcal{x}_\\mathcal{n}\\mathcal{p}_\\mathcal{n}=\\sum_{\\mathcal{i}=1}^{\\mathcal{n}}{\\mathcal{x}_\\mathcal{i}\\mathcal{p}_\\mathcal{i}}\\\\  \\sigma_\\mathcal{x}^2=\\left(\\mathcal{x}_1-\\mu_\\mathcal{x}\\right)^2\\mathcal{p}_1+\\left(\\mathcal{x}_2-\\mu_\\mathcal{x}\\right)^2\\mathcal{p}_2+...+\\left(\\mathcal{x}_\\mathcal{n}-\\mu_\\mathcal{x}\\right)^2\\mathcal{p}_\\mathcal{n}\\\\  =\\sum_{\\mathcal{i}=1}^{\\mathcal{n}}\\left(\\mathcal{x}_\\mathcal{i}-\\mu_\\mathcal{x}\\right)^2\\mathcal{p}_\\mathcal{i}[\/latex]<\/p>\n<p>Clearly it is much simpler to use the &#8220;shortcut&#8221; formulas<br \/>\n[latex]\\mu_\\mathcal{x}=\\mathcal{np}\\ and\\ \\sigma_\\mathcal{x}^2=\\mathcal{np}\\left(1-\\mathcal{p}\\right);\\sigma_\\mathcal{x}=\\sqrt{\\mathcal{np}\\left(1-\\mathcal{p}\\right)}[\/latex]\u00a0than it would be to calculate the mean and variance or standard deviation from scratch.<\/p>\n<div class=\"examplewrap\">\n<div class=\"example clearfix\">\n<div class=\"textbox textbox--examples\">\n<header class=\"textbox__header\">\n<h3 class=\"textbox__title\">Example<\/h3>\n<\/header>\n<div class=\"textbox__content\">\n<h4>Blood Type B\u2014Standard Deviation<\/h4>\n<div>\n<p id=\"N10E34\">Suppose we sample 120 people at random. The number with blood type B should be about 12, give or take how many? In other words, what is the standard deviation of the number X who have blood type B?<\/p>\n<p id=\"N10E37\">Since n = 120 and p = .1,<\/p>\n<p>[latex]\\sigma_\\mathcal{x}^2=120\\left(0.1\\right)\\left(1-0.1\\right)=10.8;\\sigma_\\mathcal{x}=\\sqrt{10.8}\\approx3.3[\/latex]<\/p>\n<p id=\"N10EC4\">In a random sample of 120 people, we should expect there to be about 12 with blood type B, give or take about 3.3.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"textbox textbox--exercises\">\n<header class=\"textbox__header\">\n<h3 class=\"textbox__title\">Did I get this?<\/h3>\n<\/header>\n<div class=\"textbox__content\">\n<div id=\"h5p-128\">\n<div class=\"h5p-iframe-wrapper\"><iframe id=\"h5p-iframe-128\" class=\"h5p-iframe\" data-content-id=\"128\" style=\"height:1px\" src=\"about:blank\" frameBorder=\"0\" scrolling=\"no\" title=\"5.4 Did I get this? 4\"><\/iframe><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":150,"menu_order":9,"template":"","meta":{"pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":[],"pb_section_license":""},"chapter-type":[48],"contributor":[],"license":[],"class_list":["post-512","chapter","type-chapter","status-publish","hentry","chapter-type-numberless"],"part":419,"_links":{"self":[{"href":"https:\/\/pressbooks.ccconline.org\/mat1260\/wp-json\/pressbooks\/v2\/chapters\/512","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pressbooks.ccconline.org\/mat1260\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/pressbooks.ccconline.org\/mat1260\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/pressbooks.ccconline.org\/mat1260\/wp-json\/wp\/v2\/users\/150"}],"version-history":[{"count":5,"href":"https:\/\/pressbooks.ccconline.org\/mat1260\/wp-json\/pressbooks\/v2\/chapters\/512\/revisions"}],"predecessor-version":[{"id":868,"href":"https:\/\/pressbooks.ccconline.org\/mat1260\/wp-json\/pressbooks\/v2\/chapters\/512\/revisions\/868"}],"part":[{"href":"https:\/\/pressbooks.ccconline.org\/mat1260\/wp-json\/pressbooks\/v2\/parts\/419"}],"metadata":[{"href":"https:\/\/pressbooks.ccconline.org\/mat1260\/wp-json\/pressbooks\/v2\/chapters\/512\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/pressbooks.ccconline.org\/mat1260\/wp-json\/wp\/v2\/media?parent=512"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/pressbooks.ccconline.org\/mat1260\/wp-json\/pressbooks\/v2\/chapter-type?post=512"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/pressbooks.ccconline.org\/mat1260\/wp-json\/wp\/v2\/contributor?post=512"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/pressbooks.ccconline.org\/mat1260\/wp-json\/wp\/v2\/license?post=512"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}