\begin{definition}[Definition:Expectation]
The '''expectation''' of a random variable is the arithmetic mean of its values.
The expectation of an arbitrary integrable random variable can be handled with a single definition, the general definition given here suffices for this purpose. 
Particular types of random variable give convenient formulas for computing their expectation. 
In particular, familiar formulas for the expectation of integrable discrete random variables (in terms of their mass function) and integrable absolutely continuous random variables (in terms of their density function) can be obtained.
However, in elementary discussions of probability theory (say, of (early) undergraduate level), tools in measure theory are not usually accessible, so it is more usual to give these formulas ''as definitions'' instead.
On this page we present all three definitions, and then give proofs of consistency. 
We also give a slightly less usual formula for the expectation of a general integrable continuous random variables, given as a Riemann-Stieltjes integral, and again prove consistency.
\end{definition}