🇺🇸 Sample variance (AP Stats) 🇬🇧 Sample σₙ₋₁ (A-Level) 🇯🇵🇨🇳 Population σₙ 📊 Bessel's correction

Variance Calculator

Calculate variance and standard deviation for both population (÷n) and sample (÷n−1) from any data set. Shows the deviation table step-by-step.

Quick Answer
Sample variance s² = Σ(x−x̄)² / (n−1) — use for data samples (nearly always). Population σ² = Σ(x−μ)² / n — only if you have ALL the data. Excel STDEV() = sample. STDEVP() = population.
Country / Tool Default Formula Calculator Key Function
🇺🇸 US (AP Stats, Excel) Sample (÷n−1)Sx on TI-84STDEV() in Excel
🇬🇧 UK (A-Level, Casio) Sample (÷n−1)σn−1 on CasioSTDEV() in Excel
🇩🇪 Germany (Gymnasium) Sample (÷n−1)s on calcnumpy std(ddof=1)
🇯🇵 Japan (高校数学B) Population (÷n)σ on Casio FXnumpy std(ddof=0)
🇨🇳 China (高中数学) Population (÷n)σn on calcSTDEVP() in Excel
🇮🇳 India (CBSE/ISC) Population (÷n)σ on CASIO fx-82STDEVP() in Excel

Frequently Asked Questions

Why do Japan and China teach population variance as the default?

In Japan and China's high school curricula (数学B / 高中数学), descriptive statistics focuses on characterising a given data set rather than making inferences about a broader population. Since the data set in hand IS the "population" being described, dividing by n is appropriate. When students reach university-level statistics, they learn sample variance (÷n−1). US and UK curricula prioritise inferential statistics from early on, so ÷n−1 is introduced first.

How does Python calculate standard deviation?

Python's numpy uses population formula by default: numpy.std(data) divides by n. For sample standard deviation, use numpy.std(data, ddof=1). Python's statistics module uses sample formula by default: statistics.stdev(data) divides by n−1. pandas DataFrame.std() also uses n−1 by default. R's sd() function uses n−1. Always check the ddof (delta degrees of freedom) parameter.