diff --git a/source/ch-Expected-Value.ptx b/source/ch-Expected-Value.ptx index 1bad6f5..ce5ead9 100644 --- a/source/ch-Expected-Value.ptx +++ b/source/ch-Expected-Value.ptx @@ -4,33 +4,495 @@ Expected Value and Variance -

Text before the first section.

+

+ Text before the first section. +

- Expected Value + Expected Value -

Text of section.

+ + Discrete Expected Value +

+ A full probability distribution (for a discrete random variable) or a density function (for a continuous random variable) carry all of the probability information. + Often, we seek statistics, i.e., numbers that summarize a distribution in some way. +

+ + + +

+ Let X be a discrete random variable taking the values x_1, x_2, \dotsc, x_n. + The expected value (also called mean, or expectation) of X is the weighted average of the values of X, where the weights are the probabilities of X taking each value: + + \E(X) = \sum_{i=1}^n x_i \Pr(X = x_i). + +

+
+
+ + + +

+ If X takes on the values x_1, x_2, \dotsc, x_n uniformly (i.e., each value having probability \frac{1}{n}), then the expected value is the usual average: + + \E(X) \amp = x_1 \cdot \frac{1}{n} + x_2\cdot \frac{1}{n} + \dotsb + x_n \cdot \frac{1}{n} + \amp = \frac{x_1 + x_2 + \dotsb + x_n}{n} + + For example, the expected value of a fair 6-sided die roll R is: + + \E(R) = \frac{1 + 2 + \dotsb + 6}{6} = \frac{21}{6} = \frac{7}{2}. + +

+
+
+ + + +

+ Suppose we roll a fair 6-sided die two times, and let S be the sum of the rolls. + It's straightforward to check the distribution for S shown below. + We've also included a column containing the products k \Pr(S = k), which must be summed up to find \E(S). +

+ + + + + + + k + \Pr(S = k) + k \cdot \Pr(S = k) + + + + 2 + 1/36 + 2/36 + + + + 3 + 2/36 + 6/36 + + + + 4 + 3/36 + 12/36 + + + + 5 + 4/36 + 20/36 + + + + 6 + 5/36 + 30/36 + + + + 7 + 6/36 + 42/36 + + + + 8 + 5/36 + 40/36 + + + + 9 + 4/36 + 36/36 + + + + 10 + 3/36 + 30/36 + + + + 11 + 2/36 + 22/36 + + + + 12 + 1/36 + 12/36 + + +
+ +

+ The sum of the third column gives \E(S) = \frac{252}{36} = 7. +

+
+
+ + + +

+ Let X indicate an event A which has probability p. + Then: + + \E(X) = 0 \cdot (1-p) + 1 \cdot p = p. + + That is, the expected value of an indicator random variable is the probability of the event that it indicates. +

+
+
+ +

+ Having found the expected value for one named distribution, we may be tempted to run through our other discrete distributions (binomial, geometric, and Poisson) and find nice formulas for their expected values. + Unfortunately, both the geometric distribution and the Poisson distribution have infinitely many possible values, and the summation of infinitely many discrete terms is beyond the scope of this course. + (A Calculus 2 course covering series would give the right tools to find expected value formulas with full justification for these distributions.) +

+ +

+ The binomial distribution takes only finitely many values, and we have that lets us generate a distribution table reasonably quickly, given the parameters n and p. + Feel free to pick some parameter values (keep n fairly small!) to try this calculation by hand, but we'll use a powerful theorem a bit later to give a very nice general formula depending on n and p. +

+
+ + + + Continuous Expected Value + +

+

+
+ + + + Linearity of Expected Value + +

+

+
+ + + + +

+ Consider a random variable X with probability distribution below. + Find \E(X). +

+ + + + + + + x + \Pr(X = x) + + + + 1 + 0.1 + + + + 2 + 0.05 + + + + 3 + 0.2 + + + + 4 + 0.15 + + + + 5 + 0.15 + + + + 6 + 0.1 + + + + 7 + 0.05 + + + + 8 + 0.1 + + + + 9 + 0.1 + + +
+
+
+ + + +

+ Let X and Y be random variables each taking the values 1, 2, 3, 4, 5. + Write different distribution tables for X and Y so that they have the same expected value. +

+
+
+ + + +

+ Suppose we flip a coin n = 100 times, and let N count the number of heads. + If the coin comes up heads on a flip with probability p = 0.4, what is \E(N)? What if n = 80 and p = 0.6? What if n = 200 and p = 0.5? +

+
+
+ + + +

+ If \E(X) = 3, \E(Y) = -2, and \E(Z) = 1, what is \E(4X + 5Y - Z + 3)? +

+
+
+ + + +

+ A continuous random variable X taking values in [0, 1] has p.d.f. + f(x) = 2x. + What is \E(X)? +

+
+
+ + + +

+ A continuous random variable X taking values in [-1, 1] has p.d.f. + f(x) = \frac{3x^2}{2}. + What is \E(X)? +

+
+
+ + + +

+ A continuous random variable X taking values in [1, 4] has p.d.f. + f(x) = \frac{4}{3x^2}. + What is \E(X)? +

+
+
+ + + +

+ A continuous random variable X taking values in [1, 4] has p.d.f. + f(x) = k(x - \sqrt{x}) for some constant k. + In a previous problem, you found the value of k. + Now, find \E(X). +

+
+
+ + + +

+ A continuous random variable X taking values in [1, 2] has p.d.f. + \displaystyle{f(x) = \frac{1}{2}\left(\frac{1}{x^2} + x\right)}. + Find \E(X). +

+
+
+
-
- Variance + Variance -

Text of section.

+

+ Text of section. +

+ + + +

+ Consider a random variable X with probability distribution below. + Find \Var(X). +

+ + + + + + + x + \Pr(X = x) + + + + 1 + 0.1 + + + + 2 + 0.05 + + + + 3 + 0.2 + + + + 4 + 0.15 + + + + 5 + 0.15 + + + + 6 + 0.1 + + + + 7 + 0.05 + + + + 8 + 0.1 + + + + 9 + 0.1 + + +
+
+
+ + + +

+ Let X be a random variable taking the values 1, 2, 3, 4, 5. + Write a distribution table for X, then use your table to write a distribution for X^2. + Then, find \Var(X). +

+
+
+ + + +

+ Suppose we flip a coin n = 100 times, and let N count the number of heads. + If the coin comes up heads on a flip with probability p = 0.4, what is \Var(N)? What if n = 80 and p = 0.6? What if n = 200 and p = 0.5? +

+
+
+ + + +

+ If \E(X) = 3, \Var(X) = 2, what is \E(X^2)? +

+
+
+ + + +

+ A continuous random variable X taking values in [0, 1] has p.d.f. + f(x) = 2x. + What is \Var(X)? +

+
+
+ + + +

+ A continuous random variable X taking values in [-1, 1] has p.d.f. + f(x) = \frac{3x^2}{2}. + What is \Var(X)? +

+
+
+ + + +

+ A continuous random variable X taking values in [1, 4] has p.d.f. + f(x) = \frac{4}{3x^2}. + What is \Var(X)? +

+
+
+ + + +

+ A continuous random variable X taking values in [1, 4] has p.d.f. + f(x) = k(x - \sqrt{x}) for some constant k. + In a previous problem, you found the value of k. + Now, find \Var(X). +

+
+
+ + + +

+ A continuous random variable X taking values in [1, 2] has p.d.f. + \displaystyle{f(x) = \frac{1}{2}\left(\frac{1}{x^2} + x\right)}. + Find \Var(X). +

+
+
+
- - -
+
Covariance -

Text of section.

- -
- - +

+ Text of section. +

+ + + +

+

+
+
+
+
\ No newline at end of file diff --git a/source/docinfo.ptx b/source/docinfo.ptx index 7f104f3..ccf7d92 100644 --- a/source/docinfo.ptx +++ b/source/docinfo.ptx @@ -31,6 +31,10 @@ \DeclareMathOperator{\Geom}{Geom} \DeclareMathOperator{\Poiss}{Poiss} \DeclareMathOperator{\Exp}{Exp} + + + \DeclareMathOperator{\E}{E} + \DeclareMathOperator{\Var}{Var}