Expected Value Calculator

Enter the values X can take and the probability of each to find the expected value.

The values X can take, separated by commas or spaces.

One probability for each value, in the same order. They must add up to 1.

Try

Result

You enteredX∈{1, 2, 3, 4, 5, 6}X \in \left\{ 1,\ 2,\ 3,\ 4,\ 5,\ 6 \right\}

E(X)=3.5\displaystyle E(X) = 3.5

Variance

2.916667\displaystyle 2.916667

Standard deviation

1.707825\displaystyle 1.707825

Variance as a fraction

3512\displaystyle \frac{35}{12}
Show the work
  1. Expected value

    The expected value is the long-run average: each value xx is weighted by its probability P(x)P(x) and the results are added.

    E(X)=∑x P(x)=1×16+2×16+3×16+4×16+5×16+6×16=16+13+12+23+56+1=72=3.5\begin{aligned} E(X) &= \sum x\,P(x) \\ &= 1 \times \frac{1}{6} + 2 \times \frac{1}{6} + 3 \times \frac{1}{6} + 4 \times \frac{1}{6} + 5 \times \frac{1}{6} + 6 \times \frac{1}{6} \\ &= \frac{1}{6} + \frac{1}{3} + \frac{1}{2} + \frac{2}{3} + \frac{5}{6} + 1 \\ &= \frac{7}{2} \\ &= 3.5 \end{aligned}
  2. Mean of the squares

    The variance needs the average of the squared values, found in the same way with x2x^2 in place of xx.

    E(X2)=∑x2 P(x)=1×16+4×16+9×16+16×16+25×16+36×16=16+23+32+83+256+6=916≈15.166667\begin{aligned} E(X^2) &= \sum x^2\,P(x) \\ &= 1 \times \frac{1}{6} + 4 \times \frac{1}{6} + 9 \times \frac{1}{6} + 16 \times \frac{1}{6} + 25 \times \frac{1}{6} + 36 \times \frac{1}{6} \\ &= \frac{1}{6} + \frac{2}{3} + \frac{3}{2} + \frac{8}{3} + \frac{25}{6} + 6 \\ &= \frac{91}{6} \approx 15.166667 \end{aligned}
  3. Variance

    The variance measures the spread: the mean of the squares less the square of the mean. Here E(X)=72E(X) = \frac{7}{2} and E(X2)=916E(X^2) = \frac{91}{6}.

    Var(X)=E(X2)−(E(X))2=916−(72)2=916−494=3512≈2.916667\begin{aligned} \mathrm{Var}(X) &= E(X^2) - \left(E(X)\right)^2 \\ &= \frac{91}{6} - \left(\frac{7}{2}\right)^2 \\ &= \frac{91}{6} - \frac{49}{4} \\ &= \frac{35}{12} \approx 2.916667 \end{aligned}
  4. Standard deviation

    The standard deviation is the square root of the variance, which puts the spread back in the units of XX.

    σ=Var(X)=3512≈1.707825\begin{aligned} \sigma &= \sqrt{\mathrm{Var}(X)} \\ &= \sqrt{\frac{35}{12}} \approx 1.707825 \end{aligned}
  5. Result

    So E(X)=3.5E(X) = 3.5 and Var(X)=3512≈2.916667\mathrm{Var}(X) = \frac{35}{12} \approx 2.916667.

Worked examples