Fundamentals of Statistics contains material of various lectures and courses of H. Lohninger on statistics, data analysis and here for more.


The mathematical expectation is a concept which is often misunderstood and confused with the mean. In fact the expectation could be the mean, but must not necessarily be the same. The expectation is a more general concept which provides a formalism to estimate the expected value of a random variable (a function) for a population with a known probability distribution function. The expectation of a continuous random variable can be calculated as follows

The corresponding equation for discrete random variables is

n .... number of observations
g(x) .... random variable
f(x) .... probability distribution function
p(xi) .... probability of the observation i

The expectation can be used to compute the mean by simply using g(x) = x as the random variable:

or for a discrete random variable:

If the probabilities of all n observations p() are equal, i.e. p() = 1/n, this equation can be reduced to

There are several rules concerning expectation values which can be applied to derive the expected values of more complicated random variables.

Last Update: 2012-10-08