Actuarial Notes

Sample Variance

Study guide: Exam MAS-I

A Sample Variance is the sum of the squared deviations of a random sample from its sample mean \bar{X}, divided by one less than the number of observations. It is the usual estimator of the variance \sigma^2 of the distribution. The sample variance S^2 of a random sample X_1, \ldots, X_n is

S^2 = \frac{1}{n-1}\sum_{i=1}^{n} \left(X_i - \bar{X}\right)^2

  • n - 1 is the degrees of freedom of S^2, the number of observations less the one used in estimating \mu by \bar{X}.

The sample standard deviation S is the square root of S^2. Applied to the differences d_1, \ldots, d_n of paired observations, the same formula gives the sample variance of the differences, s_d^2.

The sum of squared deviations equals the sum of squares less n\bar{X}^2, so the sample variance is also

S^2 = \frac{1}{n-1}\left(\sum_{i=1}^{n} X_i^2 - n\bar{X}^2\right)

Five claim amounts, in thousands, are 4, 6, 9, 11 and 20. What is the sample variance?

  • The sample mean is \bar{x} = 50/5 = 10.
  • The sum of squares is 16 + 36 + 81 + 121 + 400 = 654.
  • The sample variance is s^2 = (654 - 5 \times 10^2)/4 = 154/4 = 38.5.

Unbiasedness of the sample variance

The expected sum of squared deviations from the sample mean is (n-1)\sigma^2. Dividing it by n - 1 makes the sample variance an unbiased estimator of \sigma^2:

E[S^2] = \sigma^2

For a random sample from a normal distribution, S^2 is the minimum variance unbiased estimator of \sigma^2.

The estimator that divides by n is \hat{\sigma}^2 = \frac{n-1}{n}S^2, the maximum likelihood estimator of \sigma^2 for a normal sample. Its expected value is

E[\hat{\sigma}^2] = \frac{n-1}{n}\sigma^2

The estimator \hat{\sigma}^2 underestimates \sigma^2 by \sigma^2/n on average, and this bias goes to 0 as n grows. For a normal sample, \hat{\sigma}^2 has a smaller mean square error than S^2, because its smaller variance outweighs its squared bias.

A random sample of 10 observations is drawn from a normal distribution with variance 50. What are the bias and the mean square error of S^2 and of \hat^2?

  • S^2 is unbiased. For a normal sample \text{Var}(S^2) = 2\sigma^4/(n-1) = 2 \times 2{,}500/9 = 555.6, which is its mean square error.
  • E[\hat{\sigma}^2] = 0.9 \times 50 = 45, so the bias of \hat{\sigma}^2 is -5.
  • \text{Var}(\hat{\sigma}^2) = 0.9^2 \times 555.6 = 450, so the mean square error of \hat{\sigma}^2 is 450 + (-5)^2 = 475.
  • The biased estimator \hat{\sigma}^2 has the smaller mean square error.

Sample variance of a normal sample

For a random sample from a normal distribution, the sample variance is independent of the sample mean, and

\frac{(n-1)S^2}{\sigma^2} \sim \chi^2(n-1)

A random sample of 10 observations is drawn from a normal distribution with variance 4. What value does the sample variance exceed with probability 0.05?

  • 9S^2/4 has a chi-squared distribution with 9 degrees of freedom.
  • The value that \chi^2(9) exceeds with probability 0.05 is 16.92.
  • The sample variance exceeds 16.92 \times 4/9 = 7.52 with probability 0.05.

Dividing by n for an unbiased estimate Dividing the sum of squared deviations by n gives \hat{\sigma}^2, which underestimates \sigma^2 on average. For the five claims above it gives 154/5 = 30.8, not the unbiased estimate 38.5.

Practice questions

Actuarial Notes