Why Expected-Value Calculations Go Wrong
Most errors in an expected-value calculation happen before the arithmetic begins. A term may be omitted because part of the random variable’s range was overlooked, proposed probabilities may not add to one, or a density may be integrated over the wrong interval. A different error arises when a nonlinear function is applied to the mean instead of being averaged over the distribution.
A reliable calculation starts by identifying the distribution and its full support, then checking that its probability mass or density is valid. Only after those checks should the expectation be computed. This discipline is useful in any application, including hypothetical actuarial models in which a random loss is converted into a deductible payment or another function of the loss.
For a finite discrete random variable, the support consists of the values assigned positive probability. For a continuous distribution, an individual point usually has probability zero, so support cannot be defined as the set of points with positive point probability. A density may also be zero at some points in the distribution’s support, such as an endpoint, without removing those points from the support.
The standard formulas are compact, but they depend on a valid probability model. For a discrete random variable with possible values \(x_j\) and probability mass function \(p_X(x_j)\), the expectation is the sum over all its possible values. For a continuous random variable with density \(f_X\), it is the integral over the distribution’s support, provided the expectation exists.
If \(g\) is a function of \(X\), the corresponding formulas use \(g(x_j)\) or \(g(x)\) in place of \(x_j\) or \(x\). They do not generally permit replacing \(X\) by its mean inside \(g\). When the expectation is not finite, the formula must be treated with care; the earlier material on when an expected value exists addresses that issue.
Four Checks Before Calculating
These checks target four frequent sources of error. They are separate: a valid-looking calculation can still be wrong if even one check fails.
List every possible value for a discrete model, or state the interval or set on which a continuous model is distributed. Do not silently discard a tail or an endpoint.
For a discrete model, verify that each probability is nonnegative and that the probabilities sum to one. For a density, verify nonnegativity and that its integral over the support is one.
Use a weighted sum for a discrete random variable and a density integral for a continuous random variable. Include the probability or density factor in every term.
For a requested quantity \(g(X)\), calculate \(g(x)\) at each possible value, then average those transformed values using the distribution of \(X\).
Worked Examples
Worked Example: An Omitted Value in a Discrete Distribution
A hypothetical model assigns a random claim indicator \(X\) the values \(-2\), \(1\), and \(4\), with probabilities \(0.20\), \(0.50\), and \(0.30\), respectively. Calculate \(E[X]\), and diagnose a calculation that omits the negative value.
Method. Use the discrete expectation formula after checking the support and total probability. The complete support is \(\{-2,1,4\}\), and the probabilities sum to \(0.20+0.50+0.30=1.00\), so they define a probability distribution.
If the value \(-2\) is omitted, the incorrect calculation is \(1(0.50)+4(0.30)=1.70\). It is wrong because it drops the contribution \((-2)(0.20)=-0.40\), not because the remaining terms need to be renormalized: the original model still assigns probability \(0.20\) to \(-2\). The corrected mean is \(1.30\).
Check. The probabilities total one, and all three possible values appear in the sum. The negative outcome lowers the mean by \(0.40\) from the sum of the other two contributions, as the result shows. The common mistake avoided is omitting a part of the support because its value is negative.
Worked Example: Normalizing Discrete Weights Before Averaging
A hypothetical quality score \(X\) can be \(0\), \(1\), or \(2\). Its probability is proportional to \(x+1\), meaning \(p_X(x)=c(x+1)\) on these three values. Find the normalizing constant \(c\) and calculate \(E[X]\).
Method. First make the weights into probabilities. The unnormalized weights are \(1\), \(2\), and \(3\), whose total is \(1+2+3=6\). Since probabilities must sum to one, \(c(1+2+3)=1\), so \(c=1/6\). Thus the probabilities are \(1/6\), \(2/6\), and \(3/6\), which are nonnegative and sum to \(6/6=1\).
Check. The mean is between the smallest and largest possible values, \(0\) and \(2\). Treating the raw weights as probabilities would give \(0(1)+1(2)+2(3)=8\), which cannot be the mean of a variable that never exceeds \(2\). The common mistake avoided is using unnormalized weights directly as probabilities.
Worked Example: Integrating a Density Over Its Support
In a hypothetical model, a continuous random variable \(X\) has density \(f_X(x)=2x\) for \(0<x<1\), and density zero elsewhere. Verify the density and calculate \(E[X]\).
Method. Check the density on its stated support, then integrate \(x f_X(x)\) over that same support. The density is nonnegative for \(0<x<1\), and its total integral is
It is therefore normalized. The expectation is
A common incorrect calculation is \(\int_0^1 x\,dx=1/2\), which omits the density \(2x\). Another error would be integrating over an interval unrelated to the stated support. The correct integrand is \(x f_X(x)=2x^2\), and the correct limits are \(0\) and \(1\).
Check. The density integrates to one, and the mean \(2/3\) lies in the interval \([0,1]\). The common mistake avoided is either dropping the density factor or using inappropriate integration limits.
Worked Example: Average the Transformed Values, Not the Mean
A hypothetical model gives a random operating deviation \(X\) the values \(0\), \(2\), and \(4\), with probabilities \(0.25\), \(0.50\), and \(0.25\). A diagnostic index is \(g(X)=X^2\). Find \(E[g(X)]\), and compare it with \(g(E[X])\).
Method. The probabilities are nonnegative and total \(0.25+0.50+0.25=1\). First calculate the mean of \(X\):
Now square each possible value and average using its original probability:
By contrast, applying \(g\) to the mean gives \(g(E[X])=g(2)=2^2=4\). Therefore \(E[g(X)]=6\), while \(g(E[X])=4\); these are not interchangeable.
Check. The transformed values are \(0\), \(4\), and \(16\), all nonnegative, so a mean of \(6\) is plausible. The common mistake avoided is assuming that the expectation operation commutes with a nonlinear function such as squaring.
Why the Transformation Formula Works
For a discrete random variable, the event \(X=x_j\) has probability \(p_X(x_j)\). On that event, \(g(X)\) equals the fixed number \(g(x_j)\). Thus the outcomes for \(g(X)\) inherit their probabilities from the corresponding outcomes for \(X\), and the weighted-average definition of expectation gives the following formula.
For a continuous random variable with density \(f_X\), the same principle gives \(E[g(X)]=\int g(x)f_X(x)\,dx\) over the support, when the expectation exists. The density supplies the probability weight for each range of \(x\); \(g(x)\) supplies the value being averaged. Replacing this integral by \(g(E[X])\) changes the calculation and is generally unjustified. Equality does hold for linear functions \(g(x)=a+bx\), because linearity gives \(E[a+bX]=a+bE[X]\), but not for arbitrary nonlinear functions.
Common Traps and a Final Audit
A useful final check is to ask whether the numerical answer is compatible with the model. A discrete mean must lie between the smallest and largest possible values when the support is bounded. A continuous mean of a variable confined to an interval must also lie in that interval. These checks can expose errors, though passing them does not prove a calculation correct.
- Leaving out a possible outcome: write the full support before summing or integrating. A negative or unusual value still contributes if its probability is positive.
- Using weights as probabilities: a proportionality rule gives relative weights, not probabilities, until the normalizing constant is found.
- Dropping the density: for a continuous expectation, the integrand is \(x f_X(x)\), or \(g(x)f_X(x)\) for a transformed quantity.
- Confusing support with positive density points: support is defined through positive probability in every neighborhood. A density’s value at an individual point, including an endpoint, does not by itself determine membership in support.
- Applying a nonlinear function after averaging: calculate the transformed value at each outcome first, then take its expectation.
This careful setup is aligned with the SOA VEE Mathematical Statistics syllabus. In exam-style calculations, explicitly writing the support, normalization check, and expectation expression makes a method easier to verify and helps locate an error before it propagates through later work.
Check Your Understanding
For each problem, write down the support or interval and check the probability model before calculating.
- A hypothetical discrete variable takes values \(-1\), \(2\), and \(5\) with probabilities \(0.10\), \(0.60\), and \(0.30\). Find its mean. (Answer: \(2.6\))
- A variable \(X\) takes values \(1\), \(2\), and \(3\), with probabilities proportional to \(x\). Find the normalizing constant and \(E[X]\). (Answer: \(c=1/6,\ E[X]=7/3\))
- A continuous variable has density \(f_X(x)=2(1-x)\) for \(0<x<1\), and zero elsewhere. Verify normalization and find \(E[X]\). (Answer: The density integrates to \(1\), and \(E[X]=1/3\))
- A variable takes values \(0\), \(1\), and \(3\) with probabilities \(0.20\), \(0.50\), and \(0.30\). For \(g(X)=(X-1)^2\), calculate \(E[g(X)]\) and \(g(E[X])\). (Answer: \(E[g(X)]=1.4,\ g(E[X])=0.16\))
- A hypothetical continuous model has density \(f_X(x)=x/2\) on \(0<x<2\), and zero elsewhere. Verify normalization and calculate \(E[X]\), showing the density in the integrand. (Answer: The density integrates to \(1\), and \(E[X]=4/3\))