How to use the expected value calculator
Compute expected value and variance of a discrete variable. Enter outcomes, probabilities in the fields above; the expected value, variance, standard deviation are computed instantly and plotted on the chart so you can see how the answer changes.
Common searches this calculator answers include “expected payoff”, “weighted average”, “lottery value”, “calculate expected value”, “find expected value”.
Formula
Variables
- x — Outcomes
- p — Probabilities
Worked example
With outcomes = 0,1,2,3, probabilities = 0.1,0.3,0.4,0.2, the calculator gives expected value ≈ 1.7; variance ≈ 0.81; standard deviation ≈ 0.9.
Frequently asked questions
What is the expected value calculator used for?
Compute expected value and variance of a discrete variable. It helps with questions such as “expected payoff”, “weighted average”, “lottery value”.
What is the formula for the expected value calculation?
Expected value = sum(x.map(function(v,i){return v × p[i]})). Variance = sum(x.map(function(v,i){return p[i] × (v-[Expected value])^2})). Standard deviation = √([Variance]). Here x is outcomes, p is probabilities.
What inputs do I need for the expected value calculator?
You need outcomes, probabilities. Each field is pre-filled with a typical example so you can see how the result responds as you edit the numbers.
How do I use the expected value calculator?
Type values into the input fields. Results and the chart update instantly. Use Reset to restore the example values, Copy results to paste them elsewhere, or Share to copy a link that preserves your inputs.
Is the expected value result exact?
Calculations use standard formulas and double-precision arithmetic, then display about seven significant figures. Real-world measurements carry uncertainty, so treat results as estimates unless your inputs are exact.