Skip to content

Actuarial Statistics · Random sampling and sampling distributions

Sample Mean and Sample Variance Explained

Updated 11 October 2026 · Fact-checked

The sample mean X̄ = ΣXᵢ ÷ n and sample variance S² = Σ(Xᵢ − X̄)² ÷ (n − 1) are statistics computed from a random sample. For an iid sample, E[X̄] = μ, Var(X̄) = σ²/n and E[S²] = σ². Dividing by n − 1 makes S² unbiased.

Understand Sample Mean and Sample Variance

A statistic is any function of the sample data that does not involve unknown parameters. The sample mean and sample variance are the two most used statistics. Because the sample is random, each statistic is itself a random variable with its own distribution, called its sampling distribution.

Assume X₁, ..., Xₙ are independent and identically distributed (iid) with mean μ and variance σ². The sample mean X̄ averages them. Its expectation is μ, so X̄ is an unbiased estimator of μ. Its variance is σ²/n, so it gets more precise as n grows. The standard deviation of X̄, σ/√n, is called the standard error.

The sample variance S² measures spread around X̄, not around the unknown μ. Deviations from X̄ are smaller on average than deviations from μ, because X̄ is the point that minimises the sum of squared deviations for this sample. So dividing Σ(Xᵢ − X̄)² by n would give a value that is too small on average. Dividing by n − 1 corrects this exactly.

The proof rests on one identity: Σ(Xᵢ − μ)² = Σ(Xᵢ − X̄)² + n(X̄ − μ)². Take expectations. The left side gives nσ². The last term gives n × σ²/n = σ². So E[Σ(Xᵢ − X̄)²] = nσ² − σ² = (n − 1)σ². Divide by n − 1 and you get E[S²] = σ².

The population variance σ² is a fixed (usually unknown) parameter. The sample variance S² is a random quantity used to estimate it. Do not mix the two. If the population is normal, X̄ and S² are independent and (n − 1)S²/σ² follows a chi-square distribution with n − 1 degrees of freedom.

Key rules to remember

Sample mean
X̄ = (1/n) Σ Xᵢ
Sum over i = 1 to n.
Sample variance
S² = Σ(Xᵢ − X̄)² ÷ (n − 1) = (ΣXᵢ² − nX̄²) ÷ (n − 1)
The second form is faster for calculation. Know that the divisor is n − 1.
Expectation of X̄
E[X̄] = μ
Needs only that each Xᵢ has mean μ.
Variance of X̄
Var(X̄) = σ² ÷ n
Needs independence (or at least uncorrelated) and common variance σ².
Unbiasedness of S²
E[S²] = σ²
Holds for iid samples with finite variance, not only normal ones.
Key identity
Σ(Xᵢ − μ)² = Σ(Xᵢ − X̄)² + n(X̄ − μ)²
Used in the proof that E[S²] = σ².
Normal population result
(n − 1)S² ÷ σ² ~ χ² with n − 1 degrees of freedom
Normal population only. Then Var(S²) = 2σ⁴ ÷ (n − 1).
Distribution of X̄ (normal population)
X̄ ~ N(μ, σ²/n)
Exact for normal data; approximate for large n by the Central Limit Theorem.

How to solve Sample Mean and Sample Variance questions

Use this method for questions asking you to compute, derive or interpret the sample mean and variance.

  1. 1Write down the assumptions: are the Xᵢ iid, what are μ and σ², and is the population normal?
  2. 2Identify what is asked: a numerical value from data, an expectation, a variance, or a proof.
  3. 3For data, compute n, ΣXᵢ and ΣXᵢ². Then X̄ = ΣXᵢ ÷ n.
  4. 4Compute S² = (ΣXᵢ² − nX̄²) ÷ (n − 1). Check that the result is not negative.
  5. 5For theory, use linearity of expectation for E[X̄], and independence for Var(X̄) = σ²/n.
  6. 6For unbiasedness proofs, start from Σ(Xᵢ − X̄)² = ΣXᵢ² − nX̄² and take expectations using E[Xᵢ²] = σ² + μ² and E[X̄²] = σ²/n + μ².
  7. 7If a probability is asked, standardise X̄ using σ/√n, or use the chi-square result for S² when the population is normal.
  8. 8State the final answer with the assumption it relies on.

Quickest way: Shortcut formula and standard results

When to use it: Use when you have raw data or summary totals and limited time, or when a question asks for a standard expectation or variance.

  1. Use the computational form S² = (ΣX² − n X̄²) ÷ (n − 1). Do not subtract X̄ from each value.
  2. If you are given Σ(x − x̄)² directly, just divide by n − 1.
  3. Quote E[X̄] = μ and Var(X̄) = σ²/n without re-deriving unless the question says to prove it.
  4. For the unbiased proof, remember the result E[ΣXᵢ² − nX̄²] = n(σ² + μ²) − n(σ²/n + μ²) = (n − 1)σ².

Common mistakes in Sample Mean and Sample Variance

  • Dividing by n instead of n − 1 when finding S².

    Students copy the population variance formula.

    Fix: For a sample used to estimate σ², divide by n − 1. Use n only if the question defines the variance of the data as a population or asks for the maximum likelihood estimate under a normal model.

  • Writing Var(X̄) = σ² instead of σ²/n.

    Confusing the variance of one observation with that of the average.

    Fix: Var(ΣXᵢ) = nσ², then divide by n² to get σ²/n.

  • Using σ/n as the standard error.

    Forgetting the square root when taking the standard deviation.

    Fix: Standard error = √(σ²/n) = σ/√n.

  • Claiming S is an unbiased estimator of σ.

    Since E[S²] = σ², students assume E[S] = σ.

    Fix: The square root is a non-linear function, so E[S] < σ in general. Only S² is unbiased for σ².

  • Applying Var(X̄) = σ²/n without independence.

    The condition is forgotten.

    Fix: State that the sample is iid or the Xᵢ are uncorrelated. With correlation, covariance terms must be added.

  • Using E[Xᵢ²] = μ² in the proof.

    Mixing up E[X²] and (E[X])².

    Fix: E[X²] = Var(X) + (E[X])² = σ² + μ².

Worked examples

Example 1

A sample of 5 claim amounts (in ₹ thousands) is 12, 15, 9, 14, 10. Calculate the sample mean and the unbiased sample variance.

Show the solution
  1. n = 5. ΣX = 12 + 15 + 9 + 14 + 10 = 60.
  2. X̄ = 60 ÷ 5 = 12.
  3. ΣX² = 144 + 225 + 81 + 196 + 100 = 746.
  4. nX̄² = 5 × 144 = 720.
  5. Σ(X − X̄)² = 746 − 720 = 26.
  6. S² = 26 ÷ (5 − 1) = 6.5.

Answer: Sample mean = ₹12 thousand; sample variance S² = 6.5 (in squared ₹ thousands).

Example 2

X₁, ..., Xₙ are iid with mean μ and variance σ². Show that S² = Σ(Xᵢ − X̄)² ÷ (n − 1) is an unbiased estimator of σ².

Show the solution
  1. Write Σ(Xᵢ − X̄)² = ΣXᵢ² − nX̄².
  2. Use E[Xᵢ²] = σ² + μ², so E[ΣXᵢ²] = n(σ² + μ²).
  3. Since E[X̄] = μ and Var(X̄) = σ²/n, E[X̄²] = σ²/n + μ².
  4. So E[nX̄²] = σ² + nμ².
  5. E[Σ(Xᵢ − X̄)²] = nσ² + nμ² − σ² − nμ² = (n − 1)σ².
  6. Divide by n − 1: E[S²] = σ².

Answer: E[S²] = σ², so S² is unbiased for σ². Dividing by n would give E = (n − 1)σ²/n, which is biased low.

Exam tips

  • Examiners often ask for the proof of E[S²] = σ². Learn the ΣXᵢ² − nX̄² route; it is the shortest.
  • Always state iid and finite variance before using σ²/n.
  • In multiple-choice questions check whether the data are described as a sample or a whole population before choosing the divisor.
  • For normal data, link S² to the chi-square distribution and note the n − 1 degrees of freedom.
  • In computer-based papers, check whether the software's variance function divides by n − 1; R's var() and sd() do.

Practice questions from Random sampling and sampling distributions

Sample Mean and Sample Variance in other exams

The same ground in other exams, if you are preparing for more than one or want another angle on it.

Sample Mean and Sample Variance: frequently asked questions

What are the expected value and variance of the sample mean?

For an iid sample with mean μ and variance σ², E[X̄] = μ and Var(X̄) = σ²/n. The variance falls as the sample size rises.

Why do we divide by n − 1 in the sample variance?

Deviations are measured from X̄, which is fitted to the same data and so sits closer to the observations than μ does. This makes Σ(Xᵢ − X̄)² too small, with expectation (n − 1)σ². Dividing by n − 1 removes that bias.

What is the difference between sample variance and population variance?

Population variance σ² is a fixed parameter describing the whole population. Sample variance S² is a statistic calculated from data, used to estimate σ², and it varies from sample to sample.

Is the sample standard deviation unbiased for σ?

No. Although E[S²] = σ², taking the square root gives E[S] < σ in general. The bias is usually small for large n.