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.
Given a random variable X with values x1, x2, x3, . . . xn, and respective probabilities of p1, p2, p3, . . . pn, the expected value of X is given by the formula:
E(X) = x1p1 + x2p2 + x3p3 + . . . + xnpn.
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.