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∈{10, −5}X \in \left\{ 10,\ -5 \right\}

E(X)=−2\displaystyle E(X) = -2

Variance

36\displaystyle 36

Standard deviation

6\displaystyle 6
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)=10×0.2+(−5)×0.8=2+(−4)=−2\begin{aligned} E(X) &= \sum x\,P(x) \\ &= 10 \times 0.2 + \left(-5\right) \times 0.8 \\ &= 2 + \left(-4\right) \\ &= -2 \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)=100×0.2+25×0.8=20+20=40\begin{aligned} E(X^2) &= \sum x^2\,P(x) \\ &= 100 \times 0.2 + 25 \times 0.8 \\ &= 20 + 20 \\ &= 40 \end{aligned}
  3. Variance

    The variance measures the spread: the mean of the squares less the square of the mean. Here E(X)=−2E(X) = -2 and E(X2)=40E(X^2) = 40.

    Var(X)=E(X2)−(E(X))2=40−(−2)2=40−4=36\begin{aligned} \mathrm{Var}(X) &= E(X^2) - \left(E(X)\right)^2 \\ &= 40 - \left(-2\right)^2 \\ &= 40 - 4 \\ &= 36 \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)=36=6\begin{aligned} \sigma &= \sqrt{\mathrm{Var}(X)} \\ &= \sqrt{36} \\ &= 6 \end{aligned}
  5. Result

    So E(X)=−2E(X) = -2 and Var(X)=36\mathrm{Var}(X) = 36.

Worked examples