Expected Value, Variance and Standard Deviation
Expected value describes a probability-weighted centre, while variance and standard deviation describe the spread of a random variable around that centre. In brief: a variable taking 0, 1 and 2 with probabilities 1/4, 1/2 and 1/4 has mean 1, variance 1/2 and standard deviation √(1/2). Its most likely outcome is not guaranteed on any one trial.
These summaries describe a probability distribution rather than merely a list of observed data. Their formulas weight each possible value by its probability. This guide develops a complete discrete example, explains alternative variance calculations and shows how sums, scaling and the distinction between counts and averages affect interpretation.
What is expected value?
For a discrete random variable X with values x and probabilities p(x), the expected value is E(X) = Σxp(x), provided the relevant sum is well-defined and finite for the interpretation used here. Multiply each value by its probability and add the products. Probabilities act as weights summing to 1.
Expected value is also called the mean of the distribution, often written μ. It represents a long-run average under suitable repeated-sampling assumptions, not necessarily an outcome that can occur. A fair die has expectation 3.5 even though no face is labelled 3.5.
The expectation has the same unit as X. If X measures a count, the expectation is an expected count; if X measures distance, it has a distance unit. A fractional expectation for a whole-number count is valid because it averages across possible experiments rather than describing a fractional event in one run.
How do you calculate expected value from a probability table?
Let X take values 0, 1 and 3 with probabilities 0.2, 0.5 and 0.3. First verify that the probabilities are nonnegative and sum to 1. Then E(X) = 0 × 0.2 + 1 × 0.5 + 3 × 0.3 = 1.4.
The value 1.4 lies between the minimum and maximum possible values, as a weighted mean of a finite distribution must. It is not itself an allowed value of X, which is not a problem. The most probable value is 1, but the upper value 3 pulls the mean above it.
A long sequence of independent observations from this distribution would have an average tending toward 1.4 under the law of large numbers. Any particular finite sequence can have a different average. Expectation describes the model’s centre rather than a fixed quota that every block of observations must satisfy.
What is variance and how do you calculate it?
Variance is the expected squared deviation from the mean: Var(X) = E[(X − μ)²]. For a discrete distribution, calculate Σ(x − μ)²p(x). Squaring makes every contribution nonnegative and prevents positive and negative deviations from cancelling.
For the example with μ = 1.4, the squared deviations at 0, 1 and 3 are 1.96, 0.16 and 2.56. Weighting them gives 1.96 × 0.2 + 0.16 × 0.5 + 2.56 × 0.3 = 0.392 + 0.08 + 0.768 = 1.24.
Variance is nonnegative and equals zero exactly when the variable is constant with probability 1, in the finite setting considered here. Its unit is the square of the variable’s unit. If X is measured in centimetres, variance is measured in square centimetres, which is why its square root is often easier to interpret.
| x | p(x) | xp(x) | (x − 1.4)²p(x) |
|---|---|---|---|
| 0 | 0.2 | 0 | 0.392 |
| 1 | 0.5 | 0.5 | 0.080 |
| 3 | 0.3 | 0.9 | 0.768 |
| Total | 1 | 1.4 | 1.240 |
How does the shortcut variance formula work?
An equivalent formula is Var(X) = E(X²) − [E(X)]² when the second moment is finite. The first term is the mean of squared values, while the second is the square of the mean. Their order and grouping matter because they are generally different quantities.
For the example, E(X²) = 0² × 0.2 + 1² × 0.5 + 3² × 0.3 = 3.2. Subtracting 1.4² = 1.96 gives variance 1.24, matching the direct squared-deviation calculation.
Do not replace E(X²) by [E(X)]²; their difference is precisely the variance. For numerical work with very large, closely clustered values, subtracting nearly equal rounded quantities can lose precision, so a direct or stable computational method may be preferable. In hand calculations, keep exact fractions or sufficient digits throughout.
What does standard deviation tell you?
Standard deviation is σ = √Var(X). For variance 1.24, the standard deviation is approximately 1.1136. It returns the spread measure to the original unit, making it easier to compare with the values of X and the mean.
A larger standard deviation generally indicates more dispersion around the mean, but it does not specify the entire distribution. Two distributions can have the same mean and standard deviation while differing in symmetry, tail behaviour or the number of clusters. These summaries should be interpreted alongside the model’s shape.
Do not assume that a fixed percentage of observations lies within one standard deviation for every distribution. Familiar normal-distribution percentages require an appropriate normal model. Without that assumption, general bounds such as Chebyshev’s inequality may apply when variance is finite, but they provide different and usually broader statements.
How do scaling and shifting change expectation and variance?
For Y = aX + b, expectation is E(Y) = aE(X) + b. Variance is Var(Y) = a²Var(X), and standard deviation is |a|σ. Adding a constant shifts all values and the mean together, leaving deviations unchanged; multiplying scales the deviations and therefore their squares.
If X has mean 1.4 and variance 1.24, then Y = 2X + 5 has mean 7.8 and variance 4 × 1.24 = 4.96. Its standard deviation is twice that of X. The added 5 changes the centre but contributes no additional random spread.
Unit conversions follow the same rules. Converting a length from metres to centimetres multiplies the mean and standard deviation by 100, while variance multiplies by 10,000. The physical variability is unchanged; the numerical values respond to the new measurement scale.
How do expected values and variances combine for sums?
Expectation is linear: E(X + Y) = E(X) + E(Y) whenever the expectations are suitably finite. Independence is not required for this identity. A count of successes can be written as a sum of indicator variables, giving expected count np when each of n indicators has success probability p.
Variance requires information about dependence. In general, Var(X + Y) = Var(X) + Var(Y) + 2Cov(X, Y). For independent variables with finite variances, covariance is zero and the variances add. Standard deviations themselves do not generally add.
For n independent identically distributed observations with variance σ², their sum has variance nσ² and their average has variance σ²/n. The average’s standard deviation is σ/√n. This shrinking spread of averages is central to estimation, while the variability of a single future observation remains σ under the unchanged model.
What mistakes should you avoid with distribution summaries?
The background purpose of these quantities is to summarise uncertain numerical outcomes before or beyond a particular observed sample. A probability distribution supplies weights, while an ordinary unweighted data mean gives every recorded observation equal weight. Sample variance formulas with n − 1 serve an estimation role and should not replace a fully specified distribution’s probability-weighted variance formula.
Do not confuse expected value with the most likely outcome, variance with standard deviation or E(X²) with [E(X)]². Check that probability weights sum to 1 before using them. If they are frequencies, divide by the total or explicitly treat them as weights with the appropriate normalisation.
Finally, report units and assumptions. Not every distribution has a finite mean or variance, and adding variances needs independence or another reason for zero covariance. A complete interpretation states what X measures, which distribution is assumed and whether the result describes one observation, a total or an average.