Skip to content

Expectation

Definition

For an integrable real-valued random variable XX, its expectation is the probability-weighted mean. The formulas are

EX=∑xx pX(x)for discrete X,EX=∫RxfX(x) dxwhen X has a density.\begin{aligned} \mathbb{E}X&=\sum_x x\,p_X(x) \quad\text{for discrete }X,\\ \mathbb{E}X&=\int_{\mathbb{R}}x f_X(x)\,\mathrm{d}x\quad \text{when }X\text{ has a density}. \end{aligned}

Finite expectation requires E∣X∣<∞\mathbb{E}|X|<\infty: respectively ∑x∣x∣pX(x)<∞\displaystyle \sum_x|x|p_X(x)<\infty or ∫R∣x∣fX(x) dx<∞\int_{\mathbb{R}}|x|f_X(x)\,\mathrm{d}x<\infty. More generally, write X=X+−X−X=X^+-X^- with positive part X+=max⁡(X,0)X^+=\max(X,0) and negative part X−=max⁡(−X,0)X^-=\max(-X,0); the extended expectation is defined if at least one of EX+\mathbb{E}X^+ and EX−\mathbb{E}X^- is finite. If both are infinite, EX\mathbb{E}X is undefined.


Interpretation

Expectation describes the centre of a distribution by weighting each outcome by its probability. Sums and integrals express the same idea for discrete variables and variables with densities.

Probability bars at 1, 2, 3 and 4 with masses 0.1 to 0.4, balanced on a fulcrum at the mean 3.

For the illustrated masses, the mean is E[X]=1(0.1)+2(0.2)+3(0.3)+4(0.4)=3\mathbb{E}[X]=1(0.1)+2(0.2)+3(0.3)+4(0.4)=3. This probability-weighted average is the balance point of the masses and the long-run average of i.i.d. draws.

For a discrete variable, the probability mass function supplies the weight attached to each possible value in the expectation sum. These are probability weights, not equal weights unless the distribution is uniform.


Key Results

  • For nonnegative XX, expectation is well-defined in [0,∞][0,\infty], even when it is not finite.
  • For X≥0X\ge0, EX=∫0∞P(X>t) dt\mathbb{E}X=\int_0^\infty\mathbb{P}(X>t)\,\mathrm{d}t, possibly +∞+\infty.

Examples

  • For a fair die, EX=(1+2+3+4+5+6)/6=3.5\mathbb{E}X=(1+2+3+4+5+6)/6=3.5.
  • If fX(x)=2xf_X(x)=2x for 0<x<10<x<1 and zero elsewhere, then EX=∫012x2 dx=2/3\mathbb{E}X=\int_0^1 2x^2\,\mathrm{d}x=2/3.

Prerequisites

Sources

Aliases: expected value, expectation value, mathematical expectation, population mean Keywords: mean, first moment, average, Expectation of a Discrete Random Variable, Expectation of a Continuous Random Variable Symbols: infinity, integral, real numbers, sum

Last updated: 22 October 2026 19:04