# Definition:Expectation

## Definition

The expectation of a random variable is the arithmetic mean of its values.

Its precise definition depends on the nature of the random variable, as follows:

### Discrete Random Variable

Let $X$ be a discrete random variable.

The expectation of $X$ is written $\expect X$, and is defined as:

$\expect X := \displaystyle \sum_{x \mathop \in \image X} x \, \map \Pr {X = x}$

whenever the sum is absolutely convergent, that is, when:

$\displaystyle \sum_{x \mathop \in \image X} \size {x \, \map \Pr {X = x} } < \infty$

### Continuous Random Variable

Let $X$ be a continuous random variable over the probability space $\struct {\Omega, \Sigma, \Pr}$.

Let $F = \map \Pr {X < x}$ be the cumulative probability function of $X$.

The expectation of $X$ is written $\expect X$, and is defined over the probability measure as:

$\expect X := \displaystyle \int_{x \mathop \in \Omega} x \rd F$

whenever the integral is absolutely convergent, i.e. when:

$\displaystyle \int_{x \mathop \in \Omega} \size x \rd F < \infty$

## Also known as

The expectation of a random variable $X$ is also called the expected value of $X$ or the mean of $X$, and (for a given random variable) is often denoted $\mu$.

The terminology is appropriate, as it can be seen that an expectation is an example of a normalized weighted mean.

This follows from the fact that a probability mass function is a normalized weight function.

Various forms of $E$ can be seen to denote expectation:

$\map E X$
$\map {\mathrm E} X$
$E \sqbrk X$
$\mathop {\mathbb E} \sqbrk X$

and so on.

## Historical Note

The concept of expectation was first introduced by Christiaan Huygens in his De Ratiociniis in Ludo Aleae ($1657$).

The notation $\expect X$ was coined by William Allen Whitworth in his Choice and Chance: An Elementary Treatise on Permutations, Combinations, and Probability, 5th ed. of $1901$.

## Linguistic Note

Don't you dare call it expectoration, you disgusting children.

## Technical Note

The $\LaTeX$ code for $\expect {X}$ is \expect {X} .

When the argument is a single character, it is usual to omit the braces:

\expect X