La Esperanza matemática en el caso discreto es:
$$ E[X] = \sum_{i} {x_i p(x_i)} $$
Para el caso continuo es:
$$ E[X] = \int_{-\infty}^{\infty} {x f(x)dx} $$
Links:
https://es.wikipedia.org/wiki/Esperanza_matemática
https://en.wikipedia.org/wiki/Expected_value
http://www.rapidtables.com/math/probability/Expectation.htm
http://revisionmaths.com/advanced-level-maths-revision/statistics/expectation-and-variance