Statistics
Standard error of the mean
stats.standard-errorAlso called standard error, standard error of the mean, sem, se
where
where
Estimated standard deviation of the sample mean: the sample standard deviation divided by the square root of n.
Notation
observations
x ∈ ℝn
number of observations
Size, at least 2
Result: the standard error
scalar
Worked examples
Each result is solved exactly and confirmed by two independent computations.
Given
Result
≈ 0.755928946018
Given
Result
≈ 0.645497224368
Given
Result
Common mistakes
Uses the population standard deviation
The standard deviation divides by n instead of n − 1 (scipy.stats.sem uses n − 1).
Fix: Use the sample standard deviation, ddof=1.
Divides by n instead of sqrt(n)
The standard deviation is divided by n, not by its square root.
Fix: Divide by sqrt(n).
Source
Casella and Berger 2002
Casella, George; Berger, Roger L. Statistical Inference. 2nd ed. Duxbury, 2002.