Skip to content
CalculatorAtlas

Expected Value Calculator

Tested

Expected value and variance of a discrete distribution.

Tested, not yet published. The formula for this calculator is implemented and passes its automated checks. This page stays non-indexable until it is reviewed and published.

Results

Enter your values and press Calculate. Results appear here.

  • • Result

Quick answer

The expected value is E[X] = Σ xᵢpᵢ and the variance is Var(X) = Σ pᵢ(xᵢ − E[X])². Values 1, 2, 3 with probabilities 0.2, 0.3, 0.5 give E[X] = 2.3 and variance 0.61.

Enter the values and their probabilities. The calculator returns the expected value and variance.

Related tools: P-Value Calculator: P-value from a z, t, chi-square or F statistic. Probability Calculator: Probability of A and B, and A or B, for independent or mutually exclusive events. Dice Average Calculator: Average, minimum and maximum of rolling several dice.

How to use the Expected Value Calculator

  1. Type values, for example 1, 2, 3.
  2. Type probabilities, for example 0.2, 0.3, 0.5.
  3. Press Calculate to see the result, and use Reset to start again.
Inputs of the Expected Value Calculator
InputWhat to enterAllowed values
ValuesText, such as 1, 2, 3—
ProbabilitiesText, such as 0.2, 0.3, 0.5—

Formula and method

Formula

E[X] = Σ xᵢ pᵢ; Var(X) = Σ pᵢ (xᵢ − E[X])²

IEEE-754 double precision; shown to at most 6 decimal places.

Probabilities must be non-negative and sum to 1 (tolerance 1e-9).

Worked examples

These examples are verified: each one is an automated test case that the live calculator must reproduce exactly.

Example 1

Inputs: Values = 1, 2, 3; Probabilities = 0.2, 0.3, 0.5.

Results of example 1
ResultValue
Expected value E[X]2.3
Variance0.61

Example 2

Inputs: Values = 0 1; Probabilities = 0.5 0.5.

Results of example 2
ResultValue
Expected value E[X]0.5
Variance0.25

The first line is the headline result (expected value E[X]). Below it the expected Value Calculator lists variance, which describe the same case from other angles. IEEE-754 double precision; shown to at most 6 decimal places.

Worked example

E[X] = 0.2 + 0.6 + 1.5 = 2.3. Variance: 0.2(1.3)² + 0.3(0.3)² + 0.5(0.7)² = 0.338 + 0.027 + 0.245 = 0.61. The standard deviation is 0.781.

Decisions

Expected value is the long-run average, used for games and bets: a $1 lottery ticket with a 1 in 10 million chance of $5 million has E = $0.50. The lists must be the same length and probabilities must sum to 1.

What happens with invalid input

These messages are produced by the calculator itself, so you know what to fix.

  • Probabilities: entering "0.5" shows "Provide one probability for each value." beside that field and no result.

Choosing between the Expected Value Calculator and similar calculators

Each row shows what a related calculator on this site asks for and what it returns, so you can pick the one that matches your question.

Choosing between the Expected Value Calculator and similar calculators
CalculatorYou enterIt returns
[P-Value Calculator](/statistics/p-value/)test statistic, statistic value and test typep-value
[Probability Calculator](/statistics/probability-calculator/)p, p and events areP(A and B)
[Dice Average Calculator](/statistics/dice-average/)number of dice and sides per dieAverage roll
[Permutation and Combination Calculator](/statistics/permutation-and-combination-calculator/)total items and chosen itemsCombinations (nCr)
[Bayes' Theorem Calculator](/statistics/bayes-theorem-calculator/)prior P, p and pP(A | B)

Background: probability and distributions

A probability model only applies when its conditions hold. The binomial model needs a fixed number of independent trials with two outcomes and a constant success probability; its mass function gives the chance of exactly k successes. The normal density is f(x) = 1 ÷ (σ√(2π)) × e^(−(x − μ)² ÷ (2σ²)).

A cumulative probability adds up everything at or below a value, a density or mass function gives the value at a point. For a standard normal variable, z = −1.96 leaves 0.025 in the lower tail, which is why ±1.96 bounds a 95% interval.

Assumptions and limitations

  • Lists must have the same length
  • Probabilities must sum to 1

If a required value is empty, not a number, or outside its allowed range, the form marks that field with a message and shows no result instead of a misleading number. The automated checks deliberately try invalid entries for probabilities to confirm this.

Frequently asked questions

Is expected value a possible outcome?

Not necessarily: the expected value of a fair die is 3.5, a number you can never roll.

What if probabilities don't sum to 1?

The calculator rejects them.

What is variance?

The spread around the expected value.

What does the Expected Value Calculator calculate?

Expected value and variance of a discrete distribution. It returns Expected value E[X] and Variance.

What formula does the Expected Value Calculator use?

E[X] = Σ xᵢ pᵢ; Var(X) = Σ pᵢ (xᵢ − E[X])². Probabilities must be non-negative and sum to 1 (tolerance 1e-9).

What do I need to enter in the expected Value Calculator?

You enter Values and Probabilities.

How is the result rounded or limited?

IEEE-754 double precision; shown to at most 6 decimal places. Lists must have the same length.

What are the limits of this calculator?

Lists must have the same length. Probabilities must sum to 1.

What is an example of a expected Value result?

With values 1, 2, 3 and probabilities 0.2, 0.3, 0.5, the expected value E[X] is 2.3.

Sources

  • Standard statistics definition (e.g. NIST/SEMATECH e-Handbook of Statistical Methods)

Content last reviewed 2026-11-04. Formulas and worked examples are checked by automated tests against independently computed values.