I. IntroductionIV. Pascal’s TriangleVI. Expected Value of the Sum of Random VariablesVIII. The Coefficient of VariationIX. Applications of the Binomial DistributionOct. 4, 2005 LEC #4 ECON 240A-1 L. PhillipsRandom VariablesI. IntroductionA random variable is a variable that takes on values in its range with some associated probability. An example may be the number of heads in one flip of a fair coin which can take the value zero with probability ½ or the value one with probability ½. So a random variable is associated with a probability distribution. In this example, the random variable, the number of heads, takes on discrete values. Random variables can also take on continuous values, for example along the number line.We will use repeated trials of a random experiment, such as flipping a coin n times, to study the binomial distribution. Given the distribution of a random variable, we will examine notions of central tendency, such as the expected value of a random variable, as well as measures of dispersion, such as the variance of a random variable.II. Repeated Bernoulli TrialsIn the single flip of a coin, heads may be the outcome with probability p, or tails with probability 1-p. If we consider the random variable k to be the number of heads, it can take the value zero with probability 1-p or the value one with probability p. The central tendency or the expected number of heads is:E(k) = iki P(ki) = 0*(1-p) + 1*p = p,so each value of k is multiplied by its associated probability of occurrence and this weighted sum is the expected value of k. If the coin is fair, then the expected number of heads, or mean or average value is ½.The dispersion around the mean is the variance, VAR(k):VAR(k) = E(k –Ek)2 = i(ki – EkI)2 P(ki).Oct. 4, 2005 LEC #4 ECON 240A-2 L. PhillipsRandom VariablesIn our example the variance in the number of heads is:VAR(k) = (0 - p)2 (1- p) + (1 – p)2 p = p2 (1 – p) + (1 – p)2 p= p (1 – p) [p + (1 – p)]= p (1 – p).Let us expand the number of trials to two, a sequence of two independent or random experiments, consisting of the flip of a coin twice with outcomes given by the tree diagram in Figure 1.Figure 1: Tree Diagram for Two Coin Flips------------------------------------------------------------------------------------------------------------So it is possible to get zero heads with probability (1 – p)2, one head with probability (1 – p) p or one head with probability p (1 – p), or two heads with probability p2 . The expected value of the number of heads is: E(k) = 0*(1- p)2 + 1*(1 – p) p + 1* p (1 –p) + 2* p2 = 2 (1 – p) p + 2 p2 = 2 p [(1 – p) + p]= 2p.HTHTpHT1-pp1-pp1-pOct. 4, 2005 LEC #4 ECON 240A-3 L. PhillipsRandom VariablesSo the mean for the case of two trials is just twice the mean for one trial.The variance in the number of heads is VAR(k).VAR(k) = E(k – Ek)2 = (0-2p)2 (1-p)2 + (1-2p)2 (1 – p) p + (1-2p)2 p (1-p) + (2 – 2p)2 p2 = 4p2 (1-p)2 + 2(1 – 4p +4p2) (1-p) p + 4 (1-p)2 p2 = 8p2 (1-p)2 + 2(1-p)p –8 p2 (1-p) + 8 p3 (1-p) = 8p2 (1-p)2 + 2(1-p)p –8 p2 (1-p)(1-p)= 2(1 – p) p,i.e. twice the variance for one trial. As we shall see, for n trials the mean number of headsis np and the variance is n p(1 – p).III. Histograms of the Probability DistributionsIn the case of a single flip of a coin, the number of heads could take two values, zero or one, with probabilities ½ and ½, respectively, for a fair coin. This is illustrated in Figure 2------------------------------------------------------------------------------------------------------01ProbabilityNumber of Heads0 11/2Figure 2: Histogram for a Single FlipOct. 4, 2005 LEC #4 ECON 240A-4 L. PhillipsRandom VariablesIn the case of two successive flips, it is possible to get zero, one, two heads with probabilities, ¼, ½, ¼, respectively, for a fair coin. This is illustrated in Figure 3.----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Note from Figures 1 and 3 that the outcome of one head is more likely than zero or two heads. This is because you can obtain one head with two combinations HT or TH. The probability of either of these elementary outcomes is p (1 – p), and we have to account for the number of combinations of one head in two trials, denoted C2(1) = 2!/1!1! = 2.So the probability of obtaining one head in two trials for a fair coin is:P(k=2) = C2(1) p (1 – p) = 2 (1/2)(1/2) =1/2.IV. Pascal’s TriangleThe value of the number of combinations is given by Pascal’s triangle, illustrated in Figure 4.01ProbabilityNumber of Heads0 11/2Figure 3: Histogram for Two Flips21/4Oct. 4, 2005 LEC #4 ECON 240A-5 L. PhillipsRandom Variables11 11 2 11 3 3 1Figure 4: Pascal’s Triangle, Each Entry Is the Sum of the Two Numbers Above ItTo find Cn(k), start counting at zero, and count down to row n and, starting at zero, over to entry k. V. The Binomial Distribution Consider three successive flips of a coin, i.e. three successive random experiments, as illustrated in Figure 5.Figure 5: Three Flips of a Coin-------------------------------------------------------------------------------------------HTHTpHT1-pp1 - ppHTHTHTHTp1-pp1-pOct. 4, 2005 LEC #4 ECON 240A-6 L. PhillipsRandom VariablesThe probability of getting k heads in three trials, where k can take the values zero, one, two or three is:p(k) = C3(k) pk (1 – p)n-k .For a fair coin, the probability of zero heads is:P(k=0) = 3!/0!3! (1/2)0 (1/2)3 = 1/8, And the probability of obtaining one head is:P(k=1) = 3!/1!2! (1/2)1 (1/2)2 = 3 * 1/8 = 3/8.For three flips, the histogram of the probability of getting k heads is shown in Figure 6.--------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------From the histograms for one flip, two flips, and three flips, we can draw the suggestion that the probability distribution for a fair coin is symmetric and becomes more bell shaped as the number of trials increases.01ProbabilityNumber of Heads0 11/2Figure 6: Histogram for Three Flips21/41/833/8Oct. 4, 2005 LEC #4 ECON 240A-7 L. PhillipsRandom VariablesVI. Expected Value of the Sum of Random VariablesRecall that for a single flip of a coin, the expected value of the number of heads equals p. The probability of getting kI
View Full Document