Statistics & probability

Discrete expected value

Calculate an outcome distribution’s mean, variance and standard deviation.

Discrete expected value
Esc to restore

Your inputs

Use the example headings. UTF-8 CSV/TSV files stay on this device; maximum 25 MB.

Up to 25 MB per file, 50,000 data rows, 200 columns and 2 million data cells. Fully blank rows and columns are ignored before row, column and cell limits are checked. Individual tools may have smaller result or chart limits.

Results update as you type. Larger files run when you press Update result.

Your result

LOCAL & PRIVATE

Your result will appear here.

Your inputs stay in this browser. Nothing is uploaded or saved.

A clear answer. Here’s how.

Requires 1–1,000 finite numeric outcomes and non-negative probabilities summing to 1 within a tolerance of 1e−9. Normalises accepted rounding differences, then computes E[X], E[X²] via centred deviations and standard deviation. Duplicate outcome values are allowed; this calculator does not estimate probabilities.

See a worked example

Worked example

A fixed demonstration, separate from the values you enter above.

CSV: Outcome,Probability
Outcome,Probability
-10,0.5
0,0.3
30,0.2

Example result

Expected value
1
Variance
229
Standard deviation
15.1327459504
Outcomes
3