How to Calculate an Expected Value

Calculates the expected value as Σ(value × its probability), together with the variance and the standard deviation. The probabilities must add up to 1.

The expected value is the average of outcomes weighted by their probabilities. Multiply each value by the chance of getting it and add everything up.

E[X]=ixipi=x1p1+x2p2++xnpnE[X] = \sum_{i} x_i \, p_i = x_1 p_1 + x_2 p_2 + \cdots + x_n p_n

Think of it as the average per trial if you repeated the experiment many times. The variance and standard deviation come with it.

V[X]=ipi(xiE[X])2V[X] = \sum_{i} p_i (x_i - E[X])^2

Example

Take a loaded die where 1 and 2 each come up with probability 0.1, while 3 through 6 each come up with probability 0.2.

E[X]=1(0.1)+2(0.1)+3(0.2)+4(0.2)+5(0.2)+6(0.2)=0.1+0.2+0.6+0.8+1.0+1.2=3.9E[X] = 1(0.1) + 2(0.1) + 3(0.2) + 4(0.2) + 5(0.2) + 6(0.2) = 0.1 + 0.2 + 0.6 + 0.8 + 1.0 + 1.2 = 3.9

The expected value is 3.9, the variance is 2.49 and the standard deviation is 2.49=1.578\sqrt{2.49} = 1.578.

A fair die has an expected value of 3.5, so this one is biased towards the high faces.

Watch out