Expectation

Definition taught in Random variables and distributions, part of Probability

Expectation

Type Definition
Taught in Random variables and distributions
Part Probability
Properties 2
Worked examples 3
Questions using it 10

If X is discrete with mass function f, its expectation is \mathbb{E} X=\sum_x x\,f(x), when the sum converges absolutely. If X is continuous with density f, \mathbb{E} X=\int_{-\infty}^{\infty} x\,f(x)\,\,\mathrm{d} x, when the integral converges absolutely.

Properties

Expectation of a function

If g is a real function and X is discrete with mass function f, then \mathbb{E} g(X)=\sum_x g(x)\,f(x). If X is continuous with density f, then \mathbb{E} g(X)=\int_{-\infty}^{\infty} g(x)\,f(x)\,\,\mathrm{d} x, whenever the sum or integral converges absolutely.

In the discrete case, group the outcomes on which g takes the value y. The mass at y is \sum_{x:g(x)=y}f(x), so \mathbb{E} g(X)=\sum_y y\sum_{x:g(x)=y}f(x)=\sum_x g(x)\,f(x).

Tower property

Main article: Tower property

If the expectations exist, then \mathbb{E}\bigl(\mathbb{E}(Y\mid X)\bigr)=\mathbb{E} Y. More generally, \mathbb{E}\bigl(\mathbb{E}(Y\mid X,Z)\mid X\bigr)=\mathbb{E}(Y\mid X).

Examples

Three-point expectation

Question page: Three-point expectation

A random variable takes the values 0, 2 and 5 with probabilities 1/2, 1/3 and 1/6. Find its expectation.

\mathbb{E} X=0\cdot(1/2)+2\cdot(1/3)+5\cdot(1/6)=4/6+5/6=3/2.

Expected number of red balls

Ten balls are drawn from an urn with 25 red balls and 75 white balls. Find the expected number of red balls in the draw. Does the answer change if the draw is without replacement rather than with replacement?

With replacement the count is \operatorname{Bin}(10,1/4). Without replacement it is hypergeometric, 10 draws from 100 balls of which 25 are red. The distributions differ. The expectation is 10\times(25/100)=2.5 in both cases, by linearity applied to the ten indicator variables. Dependence changes the variance, not the mean.

A game on the sum of two dice

Two fair dice are thrown and Z is the sum of the faces.

  1. Give the probability mass function of Z.

  2. Calculate \operatorname{Var}(Z).

  3. A player is paid (Z-7)^2 and pays 5 to play. Find the expected profit from 100 independent plays.

  1. Of the 36 equally likely ordered pairs, 6-|z-7| have sum z, so

\mathbb{P}(Z=z)=\frac{6-|z-7|}{36},\qquad z=2,3,\ldots,12.

  1. Z is the sum of two independent faces, each with mean 7/2 and variance 35/12, so \mathbb{E} Z=7 and \operatorname{Var}(Z)=2\times35/12=35/6\approx5.83.

  2. The payout is (Z-7)^2, whose expectation is \operatorname{Var}(Z)=35/6. The expected profit per play is 35/6-5=5/6, so over 100 independent plays it is 100\times5/6\approx83.3.

Used in

See also

Discrete distribution · Covariance · Expectation vector and covariance matrix · Moment generating function · Tower property · Variance · Random variable · Cumulative distribution function

Glossary and index