Why divide by n − 1?
Deviations from the sample mean are always a little smaller than deviations from the true population mean, because the sample mean is fitted to those same data. Dividing by n − 1 instead of n (Bessel's correction) removes that bias from the variance. The difference matters for small samples: with n = 5 the sample SD is about 12% larger than the population formula.
Using the SD in planning
The SD from a pilot or earlier study is the key input for sizing a study that estimates a mean (sample size calculator) and for turning a raw difference into Cohen's d (effect size calculator). Pilot SDs are noisy; a common safeguard is to use the upper confidence limit of the pilot SD.
Frequently asked questions
Sample or population standard deviation?
Use the sample SD (dividing by n − 1) when your data are a sample from a larger population, which is almost always the case in research. Use the population SD (dividing by n) only when you have every member of the population.
How is standard deviation calculated?
Find the mean, subtract it from each value, square the differences, add them up, divide by n − 1 (sample) or n (population), and take the square root.
What is the standard error of the mean?
SE = s/√n. It measures how precisely the sample mean estimates the population mean, and shrinks as n grows, unlike the SD, which describes spread among individuals.
How are quartiles calculated here?
With linear interpolation between order statistics (type 7), the default in R and Excel’s QUARTILE.INC. Other software may use slightly different conventions for small samples.