# Expectation

The average value of a function evaluated over every possible outcome of a random number or numbers.
For example, for a function $$f$$ and a discrete random variable with a set of possible outcomes $$X$$ it is given by
$\mathrm{E}\left[f(X)\right] = \sum_{x \in X} p(x) \times f(x)$
where $$p(x)$$ is the probability of observing $$x$$, $$\sum$$ is the summation sign and $$\in$$ means within.
For a continuous random variable with a set of values $$X$$, it is given by the integral
$\mathrm{E}\left[f(X)\right] = \int_{x \in X} p(x) \times f(x) \mathrm{d}x$
where $$p(x)$$ is the probability density function.

### Gallimaufry

 AKCalc ECMA Endarkenment Turning Sixteen

This site requires HTML5, CSS 2.1 and JavaScript 5 and has been tested with

 Chrome 26+ Firefox 20+ Internet Explorer 9+