Skip to content
MoneyDeck

Discrete Probability Distribution Calculator

Expected value, variance and standard deviation from a probability table

Updated · Free, no signup

Possible values of the random variable, separated by commas, spaces or new lines.

Decimals such as 0.25 or fractions such as 1/4.

Mean / expected value E(X)

1.95

Variance Var(X)

1.2475

Standard deviation σ

1.1169

E(X²)

5.05

Sum of probabilities entered

1

Distribution check

Valid probability distribution.

P(X ≤ c)

0.7

P(X < c)

0.35

P(X ≥ c)

0.65

Mode (most likely value)

2
  • On average X = 1.95, with a typical spread of ±1.1169 (variance 1.2475).
  • P(X ≤ 2) = 0.7 and P(X ≥ 2) = 0.65.

Probability distribution P(X = x)

Expected value and variance working

xP(x)x·P(x)(x − μ)²·P(x)P(X ≤ x)
00.100.38030.1
10.250.250.22560.35
20.350.70.00090.7
30.20.60.22050.9
40.10.40.42031
Total11.951.2475

About the Discrete Probability Distribution Calculator

This discrete probability distribution calculator works out the key summary numbers for any discrete random variable defined by a table of values and probabilities. Enter the possible values x and their probabilities P(x) — or raw frequencies, which it converts to probabilities — and it returns the mean or expected value E(X), the variance, the standard deviation, E(X²), and the cumulative probabilities P(X ≤ c), P(X < c) and P(X ≥ c) for a cut-off you choose.

It is built for statistics and AP/IB students checking probability-distribution homework, teachers preparing worked solutions, and anyone modelling outcomes such as the number of defects per batch, customers per hour, insurance claims or game payouts. The step-by-step table shows x·P(x), (x − μ)²·P(x) and the running cumulative probability for every row, so the working is easy to follow.

A valid probability distribution needs every probability between 0 and 1 and a total of exactly 1. The calculator checks this (allowing for rounding within 0.001) and tells you if the table is invalid. Choose "frequencies" if your second column contains counts or weights rather than probabilities.

With the default inputs, the mean / expected value e(x) is 1.95. Change any value above to recalculate instantly.

How to use the discrete probability distribution calculator

  1. 1Enter the possible values of X in the first box.
  2. 2Enter the matching probabilities (or frequencies) in the same order in the second box.
  3. 3Choose whether the second column holds probabilities or frequencies.
  4. 4Enter a cut-off c if you need P(X ≤ c), P(X < c) or P(X ≥ c).
  5. 5Read the mean, variance and standard deviation, and follow the working table.

Formula and method

E(X) = μ = Σ x·P(x); Var(X) = Σ (x − μ)²·P(x) = E(X²) − μ²; σ = √Var(X)

The expected value is the probability-weighted average of the possible values: multiply each x by its probability and add the products. It is the long-run average you would see if the experiment were repeated many times, and it does not have to be one of the possible values.

The variance is the probability-weighted average of the squared distances from the mean, and the standard deviation is its square root, in the same units as x. The shortcut Var(X) = E(X²) − μ² gives the same answer. Cumulative probabilities add P(x) over every value at or below (or above) the cut-off c. In frequency mode each weight is divided by the total first, which turns counts into relative frequencies.

x
A possible value of the random variable X
P(x)
Probability that X takes the value x
μ, E(X)
Mean (expected value)
Var(X), σ
Variance and standard deviation
c
Cut-off for cumulative probabilities

Worked examples

Number of defects per item (0–4)

E(X) = 0×0.1 + 1×0.25 + 2×0.35 + 3×0.2 + 4×0.1 = 1.95. E(X²) = 0 + 0.25 + 1.4 + 1.8 + 1.6 = 5.05, so Var(X) = 5.05 − 1.95² = 1.2475 and σ = 1.117. The probability of at most 2 defects is 0.1 + 0.25 + 0.35 = 0.70.

Raffle ticket payout

A $5 ticket loses $5 with probability 0.95, nets $20 with probability 0.04 and nets $495 with probability 0.01. E(X) = −4.75 + 0.80 + 4.95 = $1.00, a small positive expected value per ticket. E(X²) = 23.75 + 16 + 2,450.25 = 2,490, so the variance is 2,490 − 1² = 2,489 and the standard deviation is about $49.89 — almost all of it from the rare big prize.

Frequencies from a survey of household size

The counts total 100, so they become probabilities 0.28, 0.35, 0.15, 0.14 and 0.08. The mean household size is 0.28 + 0.70 + 0.45 + 0.56 + 0.40 = 2.39, the variance is 7.27 − 2.39² = 1.558, and 78% of households have three or fewer people.

Frequently asked questions

How do you find the mean of a discrete probability distribution?+

Multiply each value by its probability and add the results: E(X) = Σ x·P(x). For values 0, 1, 2 with probabilities 0.2, 0.5, 0.3, the mean is 0 + 0.5 + 0.6 = 1.1.

How do you calculate the variance and standard deviation?+

Compute Σ (x − μ)²·P(x), or equivalently E(X²) − μ², where E(X²) = Σ x²·P(x). The standard deviation is the square root of the variance and is measured in the same units as X.

What makes a probability distribution valid?+

Every probability must be between 0 and 1 inclusive, and the probabilities of all possible values must add up to exactly 1. The calculator flags tables that break either rule, allowing 0.001 for rounding.

What is the difference between P(X ≤ c) and P(X < c)?+

For a discrete variable they differ by P(X = c). P(X ≤ c) includes the value c itself, while P(X < c) excludes it. P(X ≥ c) equals 1 − P(X < c).

Does the expected value have to be a possible outcome?+

No. The expected value is a long-run average, so it can fall between possible values — the expected number of heads in one coin flip is 0.5 even though you can only get 0 or 1.

Can I use counts instead of probabilities?+

Yes. Choose “Frequencies or weights” and enter counts; each count is divided by the total to form relative frequencies, which are then used exactly like probabilities.

Related tools