Skip to main content
v2026.11,858 entries · CC-BY 4.0

What Is an Unbiased Estimator? Definition, Formula and Examples

What an unbiased estimator is, with the formula, a worked n versus n−1 variance example and software defaults.

Written and maintained by CASRAI Editorial Board

Last updated

An unbiased estimator is a rule for calculating an estimate from sample data whose average value, over many repeated samples, equals the true population parameter it targets. The sample mean is an unbiased estimator of the population mean, and the sample variance with an n − 1 divisor is an unbiased estimator of the population variance. The divisor is the part most analysts get wrong, so this guide puts the same seven numbers through both divisors, shows which statistical software uses which, and explains why unbiased does not always mean best.

What is an unbiased estimator? Definition in one paragraph

An estimator is a formula applied to sample data to estimate an unknown population parameter such as a mean, a variance or a proportion. An estimator is unbiased when its expected value equals the parameter: across all the samples you could draw, the estimates are centred on the truth, with no systematic overshoot or undershoot. Unbiasedness is a property of the formula over repeated sampling, not of any single estimate. One unbiased estimate can still land far from the truth, and a biased estimator can sometimes land closer on average (see the section on mean squared error below).

Unbiased estimator formula

The bias of an estimator is the gap between its expected value and the parameter:

Bias(θ̂) = E[θ̂] − θ

  • θ is the true (unknown) population parameter, for example the population mean μ or variance σ².
  • θ̂ is the estimator, a function of the sample such as the sample mean.
  • E[θ̂] is the expected value of the estimator: its average over all possible samples of the same size.

The estimator is unbiased when Bias(θ̂) = 0, which is the same as E[θ̂] = θ. If the bias is positive, the estimator overshoots on average; if negative, it undershoots.

Unbiased estimator examples: sample mean and sample variance

The sample mean

For independent observations X1, …, Xn drawn from a population with mean μ, the sample mean X̄ = (X1 + … + Xn) / n has E[X̄] = μ. It is an unbiased estimator of the population mean.

The sample variance and the n − 1 divisor

The uncorrected sample variance, S²n = Σ(Xi − X̄)² / n, is biased: its expected value is ((n − 1) / n) × σ², so it underestimates the population variance. The reason is that deviations are measured from the sample mean, which sits closer to the data than the unknown true mean does. Multiplying by n / (n − 1), which is the same as dividing the sum of squares by n − 1, removes the bias. This is Bessel’s correction. The related idea of degrees of freedom is covered in degrees of freedom in statistics, and the variance calculation itself in how to find sample variance.

The R manual states this directly for var, cov and cor: “The denominator n – 1 is used which gives an unbiased estimator of the (co)variance for i.i.d. observations.” The Python statistics documentation says the same of variance(): with Bessel’s correction, for independent and identically distributed data points the result “should be an unbiased estimate of the true population variance.”

Worked example: dividing by n versus n − 1

Take the seven observations used in the Python statistics documentation: 2.75, 1.75, 1.25, 0.25, 0.5, 1.25, 3.5.

  1. Mean. Sum = 2.75 + 1.75 + 1.25 + 0.25 + 0.5 + 1.25 + 3.5 = 11.25. Mean = 11.25 / 7 = 1.6071.
  2. Squared deviations from the mean. (2.75 − 1.6071)² = 1.3061; (1.75 − 1.6071)² = 0.0204; (1.25 − 1.6071)² = 0.1276; (0.25 − 1.6071)² = 1.8418; (0.5 − 1.6071)² = 1.2258; (1.25 − 1.6071)² = 0.1276; (3.5 − 1.6071)² = 3.5829.
  3. Sum of squares. 1.3061 + 0.0204 + 0.1276 + 1.8418 + 1.2258 + 0.1276 + 3.5829 = 8.2321.
  4. Divide by n = 7 (biased): 8.2321 / 7 = 1.1760.
  5. Divide by n − 1 = 6 (unbiased): 8.2321 / 6 = 1.3720.

Check: 1.1760 × 7 / 6 = 1.3720, so the two results differ by exactly the factor n / (n − 1). The Python documentation reports variance() of this data as 1.3720238095238095. With n = 7 the correction raises the estimate by about 17%; with n = 700 it would raise it by about 0.14%, which is why the choice of divisor matters most in small samples. The sample standard deviation is the square root of the sample variance, here √1.3720 = 1.1713.

Interpretation: reading the result

Property What it asks How it is judged
Unbiased Is the estimator centred on the true value on average? E[θ̂] = θ
Consistent Does the estimate approach the true value as the sample grows? Behaviour as n increases
Efficient Among unbiased estimators, does it have the smallest variance? Comparison of estimator variances

These are separate properties. An estimator can be unbiased but not consistent, or consistent but biased in small samples; the uncorrected variance S²n is biased yet its bias shrinks as n grows.

Is unbiased always better?

No. Unbiasedness says nothing about how spread out the estimates are. The usual yardstick that combines both is mean squared error: MSE = variance of the estimator + (bias)². An estimator that accepts a little bias can have a smaller MSE than an unbiased one. For normally distributed data, dividing the sum of squares by n + 1 rather than n − 1 gives the smallest MSE for estimating the variance, even though it is biased. Shrinkage methods such as ridge regression make the same bias-for-variance trade deliberately. The practical rule: use the unbiased form when you want estimates that are right on average, as in standard descriptive reporting, and judge other estimators on MSE. Resampling methods such as the jackknife and bootstrap can be used to estimate the bias of an estimator when no formula is available.

Assumptions and common mistakes

  • Independence. The R and Python statements about unbiased variance apply to independent, identically distributed observations. Clustered or autocorrelated data break the guarantee.
  • Population versus sample formulas. Use the n divisor only when you have the whole population, or when the true mean is known and you divide by n around that known mean. Python’s pvariance() applied to a sample gives the biased sample variance.
  • Assuming the standard deviation is unbiased too. The n − 1 correction makes the variance unbiased; it does not carry over to its square root, so do not describe the sample standard deviation as an unbiased estimator of σ.
  • Confusing bias with sampling error. Any one sample’s estimate differs from the truth by chance. That is variability, not bias. See sampling distributions.
  • Confusing statistical bias with study bias. Estimator bias is a mathematical property of a formula. Selection or measurement bias in a study is a design problem that no choice of divisor fixes.

How to report it (APA example)

State which estimator you used and the sample size. A typical phrasing: “The sample variance, computed with the n − 1 divisor, was s² = 1.37 (N = 7).” For the mean: “The mean was M = 1.61 (SD = 1.17).” Name the software and its function if a reader might otherwise assume the population formula, for example “variance computed with R’s var()“. A confidence interval conveys the uncertainty an unbiased point estimate cannot; see confidence intervals explained.

How to calculate it in Excel, R or Python

Excel

With the seven values in cells A1:A7, =VAR.S(A1:A7) uses the n − 1 divisor (unbiased) and returns 1.3720. =VAR.P(A1:A7) uses the n divisor, which is biased when applied to a sample, and returns 1.1760.

R

x <- c(2.75, 1.75, 1.25, 0.25, 0.5, 1.25, 3.5)
var(x)                        # n - 1 divisor: 1.372024
var(x) * (length(x) - 1) / length(x)   # n divisor: 1.176020

Python

import statistics as st
x = [2.75, 1.75, 1.25, 0.25, 0.5, 1.25, 3.5]
st.variance(x)    # n - 1 divisor: 1.3720238095238095
st.pvariance(x)   # n divisor: 1.1760204081632653

Frequently asked questions

What is an unbiased estimator?

An estimator whose expected value equals the parameter it estimates, so that across repeated samples it is neither systematically too high nor too low. The sample mean for μ and the n − 1 sample variance for σ² are the standard examples.

Why does the sample variance divide by n − 1?

Because deviations are taken from the sample mean rather than the true mean, the sum of squares is on average smaller than it should be by a factor of (n − 1) / n. Dividing by n − 1 cancels that shrinkage.

Is a biased estimator ever preferable?

Yes, when its smaller variance more than offsets its bias, giving a lower mean squared error.

Is the sample standard deviation an unbiased estimator?

The n − 1 correction makes the variance unbiased, not the standard deviation, which is the square root of it. Treat it as the standard descriptive statistic, not as an unbiased estimator of σ.

Sources

Online sources checked 2026-10-29.

Follow CASRAI

Research-administration guidance, standards updates and independent tool reviews.

Ask CASRAI · free to try

Ask about What Is an Unbiased Estimator? Definition, Formula and Examples

Ask your first 2 questions free below. Subscribers get 150 a day for $29 a month.

An AI assistant specialized in research administration. It cites the sources behind every answer, labels web answers and says when it can't answer.

Answers draw on CASRAI's guides and dictionary plus the federal and funder documents we index: Federal Register, Grants.gov, Regulations.gov and UKRI.

Works on this site and inside Claude, Cursor and the AI tools you already use.

Everything CASRAI publishes — this page, the dictionary, the guides and the news — stays free to read, with no account and no card.

Referenced across the research world

University of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logoUniversity of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logo
  • University of Cambridge logo
  • Columbia University logo
  • Crossref logo
  • University of Edinburgh logo
  • Harvard University logo
  • University of Oxford logo
  • Princeton University logo
  • Stanford School of Medicine logo
  • University College London logo
  • ORCID logo

View CASRAI adoption →

Ask CASRAI · Regulatory Radar

Research-admin question? Get an answer that links its sources.

An AI assistant specialized in research administration. Every answer links its sources to check before you act. 2 questions free, no account. $29/month after.

  • Answers draw on CASRAI's guides and dictionary plus the federal and funder documents we index: Federal Register, Grants.gov, Regulations.gov and UKRI.
  • Every answer numbers its sources and links each one, so you can check the source yourself.