Expected value is a measurement of the center of a probability distribution. The formula is derived from that of the mean. Over the long run of several repetitions of the same probability experiment, if we averaged out all of our values of the random variable we would obtain the expected value.

### The Formula

Given a random variable *X* with values *x*_{1}, *x*_{2}, *x*_{3}, . . . *x*_{n}, and respective probabilities of *p*_{1}, *p*_{2}, *p*_{3}, . . . *p*_{n}, the expected value of *X* is given by the formula:

E(*X*) = *x*_{1}*p*_{1} + *x*_{2}*p*_{2} + *x*_{3}*p*_{3} + . . . + *x*_{n}*p*_{n}.

### An Example

Flip a coin three times and let *X* be the random variable of the number of heads. This has probability distribution of 1/8 for *X* = 0, 3/8 for *X* = 1, 3/8 for *X* = 2, 1/8 for *X* = 3. Use the expected value formula to obtain:

(1/8)0 + (3/8)1 + (3/8)2 + (1/8)3 = 12/8 = 1.5

There are many applications for the expected value of a random variable. In this example we see that in the long run we will average a total of 1.5 heads from this experiment.