Random variables Otherwise, suppose that 1=0. Then we have Pr(s=0)=1-Pr(S=1)=5/6 and Pr(D,=t2=1/6 as before. Now the event S=0∩D consists of 5 outcomes: all of (a2, 1),(2, 2) 2, 6)except for(a2, 7-r2)There- fore, the probability of this event is 5/36. Since 5/6. 1 / 6=5/36, the independence condition is again satisfied Thus, the outcome of the first die roll is independent of the fact that the sum is 7. This a strange, isolated result; for example, the first roll is not independent of the fact that the um is 6 or 8 or any number other than 7. But this example shows that the mathematical notion of independent random variables- while closely related to the intutive notion of unrelated quantities"is not exactly the same thing 2 Probability Distributions a random variable is defined to be a function whose domain is the sample space of an experiment. Often, however, random variables with essentially the same properties show up in completely different experiments. For example, some random variable that come up in polling, in primality testing, and in coin flipping all share some common properties If we could study such random variables in the abstract, divorced from the details any particular experiment, then our conclusions would apply to all the experiments where that sort of random variable turned up. Such general conclusions could be very useful There are a couple tools that capture the essential properties of a random variable, but leave other details of the associated experiment behind The probability density function (pdf) for a random variable R with codomain V is a function PDFR: V-0, 1] defined by PDFR()=Pr(R= . a consequence of this definition is that ∑PDFn(x)=1 since the random variable always takes on exactly one value in the set v As an example, let's return to the experiment of rolling two fair, independent dice. As (2,, 12). A plot of the probability density function is shown below es in the set before, let t be the total of the two rolls. This random variable takes on val
� 6 Random Variables • Otherwise, suppose that x1 = 0. Then we have Pr (S = 0) = 1 − Pr (S = 1) = 5/6 and Pr (D1 = x2) = 1/6 as before. Now the event S = 0 ∩ D1 = x2 consists of 5 outcomes: all of (x2, 1), (x2, 2), . . . , (x2, 6) except for (x2, 7−x2). Therefore, the probability of this event is 5/36. Since 5/6 1· /6 = 5/36, the independence condition is again satisfied. Thus, the outcome of the first die roll is independent of the fact that the sum is 7. This is a strange, isolated result; for example, the first roll is not independent of the fact that the sum is 6 or 8 or any number other than 7. But this example shows that the mathematical notion of independent random variables— while closely related to the intutive notion of “unrelated quantities”— is not exactly the same thing. 2 Probability Distributions A random variable is defined to be a function whose domain is the sample space of an experiment. Often, however, random variables with essentially the same properties show up in completely different experiments. For example, some random variable that come up in polling, in primality testing, and in coin flipping all share some common properties. If we could study such random variables in the abstract, divorced from the details any particular experiment, then our conclusions would apply to all the experiments where that sort of random variable turned up. Such general conclusions could be very useful. There are a couple tools that capture the essential properties of a random variable, but leave other details of the associated experiment behind. The probability density function (pdf) for a random variable R with codomain V is a function PDFR : V → [0, 1] defined by: PDFR(x) = Pr (R = x) A consequence of this definition is that PDFR(x) = 1 x∈V since the random variable always takes on exactly one value in the set V . As an example, let’s return to the experiment of rolling two fair, independent dice. As before, let T be the total of the two rolls. This random variable takes on values in the set V = {2, 3, . . . , 12}. A plot of the probability density function is shown below:
Random variables 2345678910111 The lump in the middle indicates that sums close to 7 are the most likely. The total area of all the rectangles is 1 since the dice must take on exactly one of the sums in V {2,3 A closely-related idea is the cumulative distribution function(cdf) for a random vari ble R. This is a function CDFR: V-[0, 1]defined by CDFR(x)=Pr(R≤x) As an example, the cumulative distribution function for the random variable T is show below 1 CDFR() 1/2 x∈ The height of the i-th bar in the cumulative distribution function is equal to the sum of the heights of the leftmost i bars in the probability density function. This follows from the definitions of pdf and cdf CDFR(x)=Pr(R≤x) ∑Pr(R=y) PDF In summary, PDFR(a)measures the probability that R=x and CDFr(a)measur the probability that R s a. Both the PDFR and CDFR capture the same information
� � Random Variables 7 6/36 6 PDFR(x) 3/36 - 2 3 4 5 6 7 8 9 10 11 12 x ∈ V The lump in the middle indicates that sums close to 7 are the most likely. The total area of all the rectangles is 1 since the dice must take on exactly one of the sums in V = {2, 3, . . . , 12}. A closelyrelated idea is the cumulative distribution function (cdf) for a random variable R. This is a function CDFR : V → [0, 1] defined by: CDFR(x) = Pr (R ≤ x) As an example, the cumulative distribution function for the random variable T is shown below: 1 6 CDFR(x) 1/2 0 - 2 3 4 5 6 7 8 9 10 11 12 x ∈ V The height of the ith bar in the cumulative distribution function is equal to the sum of the heights of the leftmost i bars in the probability density function. This follows from the definitions of pdf and cdf: CDFR(x) = Pr (R ≤ x) = Pr (R = y) y≤x = PDFR(y) y≤x In summary, PDFR(x) measures the probability that R = x and CDFR(x) measures the probability that R ≤ x. Both the PDFR and CDFR capture the same information