= Expected value
{title2=$\mathbb E[X]$}
{wiki}
= Expectation
{synonym}
= Mean
{synonym}
= Ensemble average
{synonym}
An <expected value> is the <probability>-weighted <arithmetic mean> of a <real-valued random variable>. On a <probability space> $(\Omega,\mathcal F,\mathbb P)$, its general definition is the <Lebesgue integral>
$$
\mathbb E[X]=\int_\Omega X\,d\mathbb P=\int_{\mathbb R}x\,d\mu_X(x),
$$
where $\mu_X$ is the <probability distribution> of $X$. For an <integrable random variable>, this is a finite <real number>. With a <probability mass function> $p_X$, use $\sum_x xp_X(x)$; with a <probability density function> $f_X$, use $\int_{\mathbb R}xf_X(x)\,dx$. These are two ways of computing the same weighted average, rather than different definitions for different experiments.
For example, suppose $X$ takes the values $-1,2,8$ with <probabilities> $1/2,3/10,1/5$. Then
$$
\boxed{\mathbb E[X]=(-1)\frac12+2\frac3{10}+8\frac15=\frac{17}{10}=1.7.}
$$
The most likely outcome is $-1$, and $1.7$ is not a possible outcome at all. The <expected value> summarizes all outcomes and their weights; it need not predict the result of one trial. Geometrically, placing <masses> equal to the <probability masses> at the outcome positions gives a <center of mass> at $1.7$, since $\sum_xp_X(x)(x-1.7)=0$. This balance-point interpretation also explains the connection to a <weighted arithmetic mean>. https://ocw.mit.edu/courses/18-05-introduction-to-probability-and-statistics-spring-2022/mit18_05_s22_class04-prep-b.pdf[Orloff and Bloom, expected value: probability weights and center of mass]{ref}.
For the dimensionless <random variable> $Y$ with <probability density function> $f_Y(y)=2y$ on $[0,1]$, the <expected value> is $\mathbb E[Y]=\int_0^1y(2y)\,dy=2/3$. Integrating the <probability density function> itself gives one; to compute the <expected value>, multiply by the outcome first. https://ocw.mit.edu/courses/18-05-introduction-to-probability-and-statistics-spring-2022/mit18_05_s22_class06-prep-a.pdf[Orloff and Bloom, expectation for continuous random variables]{ref}.
\Image[/expected-value-balance.png]
{title=<Expected value> balances <probability masses>, or integrates outcomes weighted by a <probability density function>}
{description=The left panel's dashed line marks $1.7$, even though the only possible outcomes are $-1,2,8$. In the right panel, the shaded <area> under $y f_Y(y)=2y^2$ is $2/3$; the <area> under the dashed <probability density function> is one. Both examples use dimensionless outcomes.}
Why is this useful? <Linearity of expectation> lets us compute an average total by adding average contributions, even for <dependent random variables>. And for <independent and identically distributed> <integrable random variables>, the <strong law of large numbers> says their <sample mean> approaches their common <expected value> <almost surely>. The theorem supplies the link to repeated observations; the weighted-average definition itself does not promise that any particular finite run will be close to the <expected value>.
There is a useful historical connection to valuing uncertain rewards. In his 1657 \i[De ratiociniis in ludo aleae], <Christiaan Huygens> assigns the value $(a+b)/2$ to equally likely rewards $a,b$, and $(pa+qb)/(p+q)$ when they have $p,q$ equally likely chances. These are the finite weighted-average formulas for <expected value>. His opening discussion asks how to divide the stakes when a game stops before completion, connecting <probability> to a concrete question about an unfinished contest. https://math.dartmouth.edu/~doyle/docs/huygens/huygens.pdf[Huygens, De ratiociniis in ludo aleae, 1657; reprint of the 1714 English translation, introduction and Propositions I–III]{ref}.
Back to article page