diff --git a/source/ch-Expected-Value.ptx b/source/ch-Expected-Value.ptx index 8700af2..7dbdeb7 100644 --- a/source/ch-Expected-Value.ptx +++ b/source/ch-Expected-Value.ptx @@ -1,5 +1,7 @@ + + Expected Value and Variance @@ -676,15 +678,47 @@

We'll omit the proofs and just casually observe that these are reasonable properties. X + \alpha is a shift of X, and shifting shouldn't change how spread out the distribution is. - \alpha X scaled X by a constant, so it should scale the spread of the distribution by the same constant. + \alpha X scaled X by a constant, so it should scale the spread of the distribution by the same constant. But recall that the variance calculation involves squaring; it's an indirect measure of spread. So it's reasonable that scaling the distribution by a constant should scale the variance by its square.

+

+ Let's put these properties to use in a pair of related examples: +

+ + + +

+ Let X indicate an event A which has probability p. + In , we saw \E(X) = p. + Notice that X takes the values 0 and 1 (with probabilities 1 - p and p, respectively). + But 0^2 = 0, and 1^1 = 1, so the expected value calculation for X^2 is precisely the same as for X! + + \E\left(X^2\right) \amp = 0^2 \cdot (1-p) + 1^2 \cdot p = p. + + So: + + \Var(X) \amp \E\left(X^2\right) - \left(\E(X)\right)^2 = p - p^2 = p(1 - p). + +

+
+
+

- TODO + Recall the setup from : a binomial random variable S is the sum H_1 + H_2 + \dotsb + H_n of n indicator random variables, each with parameter p. + The results of different coin flips are independent from each other, so the random variables H_1, \dotsc, H_n are independent from each other. + From , we know that \Var(H_i) = p(1-p) for each i. + Therefore: + + \Var(S) \amp = \Var(H_1 + H_2 + \dotsb + H_n) + \amp = \Var(H_1) + \Var(H_2) + \dotsb + \Var(H_n) + \amp = \underbrace{p(1-p) + p(1-p) + \dotsb + p(1-p)}_{n \text{ times}} + \amp = np(1-p). + + Remember this formula! We'll make frequent use of it.