The expected value of a random variable X, is denoted by E(X) and may be interpreted as the long-term average value of X. In the case of a discrete random variable, taking values x1, x2,…
For a continuous random variable with probability density function f,
E(X) is often referred to as the expectation of X or as the mean of X. The word ‘expectation’ has been used in this context since the use of ‘expectatio’ by Huygens in his 1657 treatise on the results of playing games of chance: De Ratiociniis in Ludo Aleae.
If g is any function, the expected value of g(X), E[g(X)], is defined by
in the case of a discrete random variable, and by
in the case of a continuous random variable. Thus
The expected value of a random variable may be thought of as the limiting value of the arithmetic mean of the observed values as the sample size increases. It should be noted that in the case of a discrete random variable the expected value is generally not a possible value. For example, when an unbiased coin is tossed once, the expected value of the number of heads is ½.
Some random variables (for example, those with a Cauchy distribution) do not have an expected value. There are also discrete random variables without expected values, though this situation can only arise when the set of possible values is infinite and the sum involved is the sum of a series that does not converge. For example, if , for r = 1, 2,…, where , then the expression for E(X) is , and this series diverges to ∞. For the expected values of sums and products of random variables, see expectation algebra.