Why Compare the Two Variances?
Mean imputation replaces each missing value in a variable with the mean of that variable’s observed values. The completed data then contain both the original observations and several identical values at their mean. Calculating the variance of this completed column is straightforward, but interpreting the result requires care: the calculation describes the completed values, not the uncertainty about the missing values.
This tutorial compares two descriptive quantities: the sample variance among observed values and the sample variance after those values are augmented by mean imputations. The comparison is useful because it shows exactly how the number of imputations changes the completed-data variance. It does not show that the completed variance is an unbiased estimate of the variance that would have been obtained with complete data.
These definitions use the usual sample-variance denominator: one less than the number of values included in the calculation. The arithmetic result below requires that the imputed values are all exactly the observed mean and that the completed variance is calculated using that same convention. It does not require a particular missingness mechanism. A separate question is whether the observed data are representative of the values that are missing.
The Variance Relationship
The completed-data mean remains equal to the observed-data mean. The observed values sum to \(n_o\bar{x}_{obs}\), and the imputed values add \(n_m\bar{x}_{obs}\). Thus the completed sum is \(N\bar{x}_{obs}\), giving \(\bar{x}_{comp}=\bar{x}_{obs}\). Each imputed value consequently has zero deviation from the completed mean.
The completed sum of squared deviations therefore consists only of the observed values’ sum of squared deviations. The numerator is unchanged, while the variance denominator increases from \(n_o-1\) to \(N-1\). This yields the exact comparison:
Because \(N\geq n_o\), the factor \((n_o-1)/(N-1)\) is at most 1. It equals 1 if no values are imputed and is less than 1 if at least one value is imputed. Thus, when \(s_{obs}^2\) is positive, mean imputation reduces the completed-data sample variance. If the observed values are all identical, both variances are zero: adding their common mean adds no spread.
Worked Comparisons
Worked Example: Two Mean-Imputed Values
Suppose a hypothetical measurement, recorded in arbitrary units, has three observed values: 2, 4, and 10. Two other entries are missing and will be replaced with the observed mean. First calculate the observed mean:
\(\bar{x}_{obs}=(2+4+10)/3=16/3\approx5.333\) units.
The observed squared deviations sum to \((2-16/3)^2+(4-16/3)^2+(10-16/3)^2\). Writing the deviations with denominator 3 gives \((100+16+196)/9=312/9=104/3\approx34.67\) squared units. Therefore,
The two imputed values are both \(16/3\). Each has zero deviation from the completed mean, which remains \(16/3\). The completed sample size is \(N=3+2=5\), so
Equivalently, the count factor is \((3-1)/(5-1)=1/2\), and \((1/2)(52/3)=26/3\). The completed-data variance is half the observed-data variance. This is a property of the completed column, not evidence that the unobserved values truly have no spread around the mean.
Worked Example: More Imputations, Same Observed Values
Consider a second hypothetical set of observed measurements: 1, 3, 8, and 12 units. We will compare completing it with one missing value versus three missing values. The observed mean is \((1+3+8+12)/4=6\) units. The observed sum of squared deviations is \((1-6)^2+(3-6)^2+(8-6)^2+(12-6)^2=25+9+4+36=74\) squared units.
With four observed values, the observed-data variance is \(74/(4-1)=74/3\approx24.67\) squared units. If one value is missing, then \(N=5\), and mean imputation gives
If instead three values are missing, then \(N=7\), while the observed values and their squared deviations are unchanged. The completed variance is
The corresponding count factors are \(3/4\) and \(3/6\). More imputations mean a larger denominator with the same numerator, so the completed-data variance is smaller. In each case the values have been filled with 6, but those added values contribute no squared deviations.
Worked Example: Missing-Row Locations Do Not Affect the Variance
Suppose the observed values in a hypothetical data column are 4, 6, 10, and 12 units, with two entries missing. Whether those missing entries occur in the first and fifth rows or the second and sixth rows, the observed values and their count are the same. The observed mean is \((4+6+10+12)/4=8\) units, and the observed squared deviations sum to \(16+4+4+16=40\) squared units.
The observed variance is \(40/(4-1)=40/3\approx13.33\) squared units. After inserting two copies of 8, the completed sample size is 6, the completed mean remains 8, and the sum of squared deviations remains 40. Hence,
The count formula gives the same result: \([(4-1)/(6-1)](40/3)=(3/5)(40/3)=8\). Rearranging which row labels are missing does not change this marginal variance, provided the observed values themselves remain the same. Row locations can matter for relationships with other variables, but that is not captured by this one-variable variance calculation.
How to Audit the Calculation
For a small dataset, it is usually safest to calculate the observed mean and sum of squared deviations first, then check the completed variance in two ways. First, include the imputed mean values explicitly; each contributes zero to the squared-deviation sum. Second, apply the count factor to the observed variance. Agreement between these calculations is a useful arithmetic check.
Count them, calculate \(\bar{x}_{obs}\), and calculate the sum of squared deviations around that mean.
Divide the observed squared-deviation sum by \(n_o-1\), not by \(n_o\).
Add \(n_m\) copies of \(\bar{x}_{obs}\). The completed mean is still \(\bar{x}_{obs}\), and each added value has zero deviation.
Divide the unchanged squared-deviation sum by \(N-1\), or multiply \(s_{obs}^2\) by \((n_o-1)/(N-1)\).
The count comparison separates two influences. The ratio \(s_{comp}^2/s_{obs}^2\), when \(s_{obs}^2>0\), depends only on \(n_o\) and \(n_m\); the absolute variance depends also on the spread of the observed values. Therefore, datasets with the same counts can have the same proportional reduction but very different variances in squared units.
Common Mistakes, Alternatives, and Limits
- Wrong: “The imputed values equal the mean, so the variance is unchanged.” Correction: The squared-deviation sum is unchanged, but the sample-variance denominator grows from \(n_o-1\) to \(N-1\), reducing the variance when values are imputed.
- Wrong: “Every imputed value contributes a positive squared deviation.” Correction: Under this method, each imputed value equals the completed mean and contributes zero to the sum of squared deviations.
- Wrong: “The same count factor means two datasets have the same variance.” Correction: The factor gives the same proportional change, not the same absolute variance; the observed spreads may differ.
- Wrong: “The smaller completed-data variance is a corrected estimate of the variance with no missing data.” Correction: It is the variance of the constructed column. It does not restore the missing-value variation or account for uncertainty about those values.
Complete-case analysis calculates summaries using only observed values, so it does not add mean-valued records, but it also uses a reduced sample and may not represent the full-data population. Mean imputation keeps all rows in the completed column, yet creates a point mass at one value and produces the variance reduction derived here. Multiple imputation addresses missing-value uncertainty by creating multiple completed datasets and combining information across them; its analysis is distinct from simply calculating one completed-data variance. The appropriate approach depends on the scientific estimand and missing-data assumptions, not on which variance is numerically larger.
The variance identity is exact for the specified calculation, but its interpretation has limits. It concerns one variable’s marginal sample variance and says nothing by itself about associations with other variables, standard errors for an analysis, or whether missingness is ignorable. A reduced variance can be a warning that the completed values are less dispersed, but it is not a diagnostic test of the missingness mechanism.
Check Your Understanding
Try each calculation, then compare with the solutions below.
- Observed values are 5, 7, and 8 units, with one value missing. Find the observed and completed sample variances.
- If \(n_o=5\) and \(n_m=4\), what fraction of the observed variance is the completed variance?
- Observed values are 2 and 6 units, and two values are missing. Calculate the observed and completed sample variances.
- For the same observed values and number of imputations, does moving the missing entries to different row positions change the one-variable completed variance? Explain.
Solutions. (1) The mean is \(20/3\). The squared-deviation sum is \((25+1+16)/9=42/9=14/3\), so \(s_{obs}^2=(14/3)/2=7/3\approx2.333\) squared units. The completed sample size is 4, so \(s_{comp}^2=(14/3)/3=14/9\approx1.556\) squared units. (2) The factor is \((5-1)/(9-1)=4/8=1/2\); the completed variance is half the observed variance. (3) The observed mean is 4 units, the squared-deviation sum is \(4+4=8\), and \(s_{obs}^2=8/(2-1)=8\) squared units. The completed size is 4, so \(s_{comp}^2=8/(4-1)=8/3\approx2.667\) squared units. (4) No. With the observed values and counts fixed, the observed mean and squared-deviation sum are fixed; row positions do not enter the marginal variance formula.