# AP Statistics Curriculum 2007 Distrib MeanVar

### From Socr

## Contents |

## General Advance-Placement (AP) Statistics Curriculum - Expectation (Mean) and Variance

### Expectation (Mean)

#### Example

Suppose 10% of the human population carries the green-eye allele. If we choose 1,000 people randomly and let the RV X be the number of green-eyed people in the sample. Then the distribution of X is binomial distribution with n = 1,000 and p = 0.1 (denoted as . In a sample of 1,000 people, how many of them are we expecting to have this allele? Clearly the count of individuals that carry the green-eye allele will vary between different samples of 1,000 subjects. How much dispersion between the samples can we expect, in terms of the number of individuals carrying this allele? These questions will be answered by computing the mean and the variance (or standard deviation) for this process.

#### Definition

The Expected Value, Expectation or Mean, of a discrete random variable X is defined byE[X] = | ∑ | xP(X = x). |

x |

The expectation of a continuous random variable Y is analogously defined by , where the integral is over the domain of Y and P(y) is the probability density function of Y.

#### Properties of Expectation

- Expectation is a linear functional. That is, the expected value operator is
**linear**in the sense that

- for any two random variables
*X*and*Y*(which need to be defined on the same probability space) and any real numbers*a*and*b*. This property follows directly from the definition of expectation. For instance, - where
*g(x)*is any real-valued function.

### Variance

The Variance, of a discrete random variable X is defined byVAR[X] = | ∑ | (x − E[X])^{2}P(X = x). |

x |

#### Properties of Variance

- The Variance is
**not**quite a linear function. It has the following properties:

- (Data shifts do not affect the dispersion.)
- If X and Y are uncorrelated,
- If X and Y are dependent (correlated),
- An alternative formula for calculating the variance is:
*V**A**R*(*X*) =*E*(*X*^{2}) − (*E*(*X*))^{2}.

- The
**Covariance**between two real-valued random variables*X*and*Y*, with corresponding expected values and is defined as

- In general, if we have {} correlated variables, then the
*variance of their sum is the sum of their covariances*:

- If the correlation between to identically distributed variables (not necessarily independent) is defined by:

Then the *variance of their sum is*:

- The SOCR Bivariate Normal Distribution Experiment demonstrates the synergy between the theoretical (model) and empirical (sample-driven estimates) in computing variances of sums of random variables (in the case of 2 variables). Change the correlation coefficient between the two variables, Corr(X,Y), and observe how this change affects the additivity property of the variance. Is Var(X+Y) ~ Var(X) + Var(Y), when ?

### Standard Deviation

The Standard Deviation, of a discrete random variable X is defined by The standard deviation of a continuously-values random variable Y is analogously defined by , where the integral is over the domain of Y and P(y) is the probability density function of Y.

### Higher Moments

#### Raw Moments

The*k*

^{th}

**Raw Moment**for a discrete random variable

*X*is defined by

E[X^{k}] = | ∑ | x^{k}P(X = x). |

x |

*k*

^{th}

**Raw Moment**for a continuously-values random variable

*Y*is analogously defined by where the integral is over the domain of

*Y*and

*P(y)*is the probability density function of

*Y*.

#### Centralized Moments

The*k*

^{th}

**Centralized Moment**for a discrete random variable

*X*is defined by

E_{c}[X^{k}] = | ∑ | (x − μ)^{k}P(X = x), |

x |

*X*. The

*k*

^{th}

**Centralized Moment**for a continuously-values random variable

*Y*is analogously defined by where μ is the expected value of

*Y*, the integral is over the domain of

*Y*and

*P(y)*is the probability density function of

*Y*.

#### Standardized Moments

The *k*^{th} **Standardized Moment** for a discrete random variable *X* is defined by

The *k*^{th} **Standardized Moment** for a continuously-values random variable *Y* is analogously defined by

- where the integral is over the domain of
*Y*and*P(y)*is the probability density function of*Y*

#### Notable Moments

In addition to the mean and variance, the Skewness and the Kurtosis are two notable (3-rd and 4-th) moments, respectively.

#### Sample Moments

Sample Moments are, of course, analogously computed to their theoretical counterparts, using a sample of observations {}. For example, the sample skewness and kurtosis (the 3-rd and 4-th sample standardized moments) are defined by

- where and
*s*are the sample mean and sample standard deviation, respectively.

- where and
*s*are the sample mean and sample standard deviation, respectively.

#### Why are the higher moments important?

Moments can completely describe the (nice) distributions!

- There are distributions for which knowing all moments does not determine the distribution (e.g., Log-Normal).
- For distributions with finite range, the moments always uniquely determine the distributions.
- For infinite-range distributions, the moments uniquely determine the distribution if these series
**diverge**(where \( \mu_{2j} \) is the 2j-th moment):

- , for , and
- , for .

### Examples

#### A Game of Chance

- Suppose we are offered to play a game of chance under these conditions: it costs us to play $1.5 and the awarded prices are {$1, $2, $3}. Assume the probabilities of winning each price are {0.6, 0.3, 0.1}, respectively. Should we play the game? What are our chances of winning/loosing? Let's let X=awarded price. Then X={1, 2, 3}.

x | 1 | 2 | 3 |

P(X=x) | 0.6 | 0.3 | 0.1 |

x*P(X=x) | 0.6 | 0.6 | 0.3 |

Then the mean of this game (i.e., expected return or expectation) is computed as the weighted (by the outcome probabilities) average of all the outcome prices: . In other words, the expected return of this came is $1.5, which equals the entry fee, and hence the game is fair - neither the player nor the house has an advantage in this game (on the long run) Of course, each streak of n games will produce different outcomes and may give small advantage to one side. However, on the long run, no one will make money.

The variance for this game is computed by *V**A**R*[*X*] = (*x*_{1} − 1.5)^{2}*P*(*X* = *x*_{1}) + (*x*_{2} − 1.5)^{2}*P*(*X* = *x*_{2}) + (*x*_{3} − 1.5)^{2}*P*(*X* = *x*_{3}) =
. Thus, the standard deviation is .

- Suppose now we
*alter the rules for the game of chance*and the new pay-off is as follows:

x | 0 | 1.5 | 3 |

P(X=x) | 0.6 | 0.3 | 0.1 |

x*P(X=x) | 0 | 0.45 | 0.3 |

- What is the
*new expected return*of the game? Remember, the old expectation was equal to the entrance fee of $1.50, and the game was fair! - The change in the pay-off of the game may be represented by this linear transformation . Therefore, by our rules for computing expectations of linear functions, , and the game became clearly biased. Note how easy it is to compute
*E[Y]*, using this formula. At the same time, we could have computed the expectation of*Y*using first-principles (adding the values of the last row in the revised table above)!

- You can play similar games under different conditions for the probability distribution of the prices using the SOCR Binomial Coin or Die experiments.

#### Children Gender Expectation Example

Suppose we conduct an (unethical!) experiment involving young couple planning to have children. Suppose, the couples are interested in the number of girls they will have, and each couple agrees to have children until one of the following 2 *stopping* criteria is met: (1) the couple has at least one child of each gender, or (2) the couple has at most 3 children! Let's denote the RV X ={number of Girls}. The distribution of X is given by:

Observable Outcomes | {BBB} | {BG; GB; BBG} | {GGB} | {GGG} |

x | 0 | 1 | 2 | 3 |

P(X=x) | 1/8 | 5/8 | 1/8 | 1/8 |

x*P(X=x) | 0 | 5/8 | 2/8 | 3/8 |

Therefore, the expected number of girls that each couple participating in this ("odd") experiment will have is given by *E*[*X*] = 0 + 5 / 8 + 2 / 8 + 3 / 8 = 1.25. What is the interpretation of this expectation?

*Can you calculate the variance and standard deviation for this random variable?*

### Problems

### References

- SOCR Home page: http://www.socr.ucla.edu

Translate this page: