From a Finite Probability Model to Variability
For a discrete random variable with only a few possible values, its probability mass function gives a direct route to both its center and its spread. The mean summarizes the probability-weighted location of the outcomes. The variance and standard deviation describe how far outcomes tend to lie from that mean. In a finite model, each quantity can be calculated with a short table, making it possible to check every contribution rather than rely on a shortcut.
The main care points are to use each probability with its matching outcome, square the outcome when calculating the raw second moment, and square the mean in the computational variance formula. These details matter because the raw second moment and variance are measured in squared units, while the standard deviation returns to the original units.
These formulas assume the stated values and probabilities describe the entire distribution. A finite distribution has finite moments, so the sums exist. If a table omits a possible outcome or its probabilities do not sum to one, it is not yet a valid complete probability model and the calculations should not proceed until the issue is resolved.
A Reliable Calculation Layout
A useful table includes the outcome, its probability, the contribution to the mean, and the contribution to the raw second moment. The last two columns are \(x_i p_i\) and \(x_i^2p_i\), respectively. Keeping them separate helps prevent confusing \(E[X^2]\) with \((E[X])^2\): the former averages the squared outcomes, whereas the latter squares the already-calculated mean.
Check that the listed outcomes cover the support and that the probabilities are nonnegative and sum to one.
Multiply each outcome by its probability and add the products.
Square each outcome first, multiply by its probability, and add those products.
Subtract the square of the mean from the raw second moment; then take the nonnegative square root for standard deviation.
Worked Example: Hypothetical Claim Payments
A hypothetical insurance payment \(X\), in dollars, has possible values \(0\), \(100\), and \(200\), with probabilities \(0.20\), \(0.50\), and \(0.30\), respectively. Find the mean payment, raw second moment, variance, and standard deviation. Treat these probabilities as the complete model; no interest or mortality assumption is involved.
Method and model check. This is a finite discrete distribution. The probabilities are nonnegative and sum to \(0.20+0.50+0.30=1.00\), so the table is a valid probability mass function.
| \(x_i\) (dollars) | \(p_i\) | \(x_i p_i\) | \(x_i^2p_i\) (dollars squared) |
|---|---|---|---|
| 0 | 0.20 | 0 | 0 |
| 100 | 0.50 | 50 | 5,000 |
| 200 | 0.30 | 60 | 12,000 |
| Total | 1.00 | 110 | 17,000 |
Mean. Add the weighted outcomes:
Raw second moment. Square each payment before weighting:
Variance and standard deviation. Apply the computational formula:
Check and common mistake avoided. The mean, \(\$110\), lies between the smallest and largest possible payments, \(\$0\) and \(\$200\). The variance is nonnegative, and the standard deviation is in dollars rather than dollars squared. A common mistake would be to report \(17{,}000\) as the variance; that is the raw second moment. Subtracting the squared mean gives the variance, \(\$4{,}900\) squared.
Why the Computational Formula Works
The variance is defined as the expected squared distance from the mean. For a finite distribution, this definition can be expanded directly. Write \(\mu=E[X]\). Since \(\mu\) is a constant, the squared deviation at an outcome \(x_i\) is \(x_i^2-2\mu x_i+\mu^2\). Weighting each deviation by its probability and summing gives
The penultimate line uses both defining properties of the model: \(\sum_i x_i p_i=E[X]=\mu\) and \(\sum_i p_i=1\). This also explains why it is the square of the mean that is subtracted, not the mean itself.
The definition and computational formula give the same result, but the computational formula is often faster. For a small support, the weighted squared deviations also provide a useful independent check: calculate \((x_i-\mu)^2p_i\) for each outcome and verify that their sum equals \(E[X^2]-(E[X])^2\).
Worked Example: A Discrete Inspection Delay
In a hypothetical scheduling model, inspection delay \(X\) is measured in minutes and can be \(0\), \(10\), \(20\), or \(30\). The corresponding probabilities are \(0.10\), \(0.20\), \(0.40\), and \(0.30\). Find \(E[X]\), \(E[X^2]\), the variance, and the standard deviation, and verify the variance using squared deviations.
Method and model check. The probabilities sum to \(0.10+0.20+0.40+0.30=1.00\). The model therefore covers a finite support with valid probabilities.
| \(x_i\) (minutes) | \(p_i\) | \(x_i p_i\) | \(x_i^2p_i\) (minutes squared) |
|---|---|---|---|
| 0 | 0.10 | 0 | 0 |
| 10 | 0.20 | 2 | 20 |
| 20 | 0.40 | 8 | 160 |
| 30 | 0.30 | 9 | 270 |
| Total | 1.00 | 19 | 450 |
The mean delay is \(0+2+8+9=19\) minutes, and the raw second moment is \(0+20+160+270=450\) minutes squared. Thus
For an independent check, the weighted squared deviations are
The mean of \(19\) minutes lies within the support from \(0\) to \(30\) minutes, and both variance calculations agree. The standard deviation is rounded to two decimal places. The common mistake avoided here is treating the raw second moment, \(450\), as though it were the variance; the squared mean, \(361\), must be subtracted.
Interpreting the Results and Checking the Support
The mean is a probability-weighted balance point, not necessarily a possible outcome. For a finite support with minimum \(a\) and maximum \(b\), it must satisfy \(a\leq E[X]\leq b\). A result outside that range signals a likely error in the probabilities, the outcome-probability pairings, or the arithmetic. The mean need not equal the most likely outcome.
Variance is an average of squared deviations, so it cannot be negative. It is zero exactly when every outcome with positive probability equals the mean; otherwise it is positive. Variance has squared units, such as dollars squared or minutes squared. Standard deviation is the nonnegative square root of variance and therefore uses the same units as \(X\). It describes a typical scale of distance from the mean, but it is not a guarantee that every outcome lies within one standard deviation.
Worked Example: A Finite Count With an Unusual Support
A hypothetical weekly service desk count \(X\) records the number of escalated cases. Its only possible values are \(0\), \(1\), \(2\), and \(4\), with probabilities \(0.25\), \(0.25\), \(0.40\), and \(0.10\), respectively. Find the four summary quantities and check the variance by the definition. The value \(3\) is not possible under this model.
Method and model check. The stated probabilities are nonnegative and sum to \(0.25+0.25+0.40+0.10=1.00\). Use exactly the listed support values; do not insert an outcome of \(3\).
| \(x_i\) | \(p_i\) | \(x_i p_i\) | \(x_i^2p_i\) |
|---|---|---|---|
| 0 | 0.25 | 0 | 0 |
| 1 | 0.25 | 0.25 | 0.25 |
| 2 | 0.40 | 0.80 | 1.60 |
| 4 | 0.10 | 0.40 | 1.60 |
| Total | 1.00 | 1.45 | 3.45 |
Therefore, \(E[X]=1.45\) cases and \(E[X^2]=3.45\) cases squared. The variance is
To check by squared deviations, the four contributions are
Their sum is \(0.525625+0.050625+0.121+0.65025=1.3475\), matching the computational formula. The mean lies between the support endpoints, \(0\) and \(4\). Rounding the standard deviation to two decimal places gives \(1.16\) cases. The key trap is to assume that integer values between the endpoints must all be possible; the calculation uses only the support specified by the model.
Common Calculation Traps
- Using the wrong probability with an outcome. Preserve each outcome-probability pairing from the model when setting up the calculation table.
- Forgetting to square the outcome. In the raw second moment, the contribution is \(x_i^2p_i\), not \(x_i p_i\) and not \((x_i p_i)^2\).
- Subtracting the mean instead of its square. The variance is \(E[X^2]-(E[X])^2\). For the inspection-delay model, subtracting \(19\) from \(450\) would give \(431\), not the correct variance of \(89\).
- Mixing units. If \(X\) is measured in dollars, \(E[X]\) and \(\operatorname{SD}(X)\) are in dollars, while \(E[X^2]\) and \(\operatorname{Var}(X)\) are in dollars squared.
- Skipping the final checks. Confirm probabilities sum to one, the mean lies within the support, the variance is nonnegative, and the square root returns to the original units.
Check Your Understanding
For each finite model, calculate the mean, raw second moment, variance, and standard deviation. Answers give the standard deviation to two decimal places where it is not exact.
- A hypothetical payment \(X\) can be \(0\), \(2\), or \(6\) dollars, with probabilities \(0.50\), \(0.25\), and \(0.25\). Find all four quantities. (Answer: \(E[X]=2\), \(E[X^2]=10\), \(\operatorname{Var}(X)=6\), \(\operatorname{SD}(X)=\sqrt{6}\approx2.45\).)
- A discrete measurement \(X\) takes values \(1\), \(2\), and \(4\) units with probabilities \(0.20\), \(0.50\), and \(0.30\). Find all four quantities and state the units for the second moment and variance. (Answer: \(E[X]=2.4\), \(E[X^2]=7\) units squared, \(\operatorname{Var}(X)=1.24\) units squared, \(\operatorname{SD}(X)\approx1.11\) units.)
- A hypothetical count \(X\) takes values \(0\), \(5\), and \(10\) with probabilities \(0.30\), \(0.40\), and \(0.30\). Find all four quantities and check whether the mean is a possible outcome. (Answer: \(E[X]=5\), \(E[X^2]=40\), \(\operatorname{Var}(X)=15\), \(\operatorname{SD}(X)=\sqrt{15}\approx3.87\); the mean is a possible outcome.)
- A count \(X\) has support \(0,1,3\) with probabilities \(0.40,0.40,0.20\). Calculate the moments and variance, then identify whether \(2\) belongs in the calculation. (Answer: \(E[X]=1\), \(E[X^2]=2.2\), \(\operatorname{Var}(X)=1.2\), \(\operatorname{SD}(X)\approx1.10\); \(2\) is not in the stated support and is not included.)
- A hypothetical benefit payment \(X\), in dollars, is \(0\), \(100\), or \(300\), with probabilities \(0.40\), \(0.40\), and \(0.20\). Find the mean, raw second moment, variance, and standard deviation. (Answer: \(E[X]=\$100\), \(E[X^2]=22{,}000\) dollars squared, \(\operatorname{Var}(X)=12{,}000\) dollars squared, \(\operatorname{SD}(X)\approx\$109.54\).)