How to calculate the standard deviation of a sample
The sample standard deviation measures the dispersion of a dataset relative to its mean by taking the square root of the sample variance. It applies when your data represents a subset of a larger population, requiring Bessel's correction () to provide an unbiased estimate of the population variance.
The setup
Identify your sample dataset containing independent observations, denoted as . You will use the sample standard deviation formula: .
The steps
- Calculate the sample mean () by summing all data points and dividing by . 2. Subtract the mean from each data point to find the deviations (). 3. Square each deviation to ensure positive values (). 4. Sum all the squared deviations (). 5. Divide the sum by to find the sample variance (). 6. Take the square root of the variance to find the sample standard deviation ().
Checking the result
The standard deviation must be non-negative (). It equals zero if and only if all data points are identical. The units of the standard deviation must match the units of the original data.
Common errors
Dividing by instead of calculates the population standard deviation rather than the sample standard deviation. Rounding intermediate values prematurely can lead to significant propagation of error in the final result.
Worked example
Calculate the sample standard deviation for the dataset: 4, 8, 6, 5, 3.
Step 1: . Mean . Step 2 & 3: Compute squared deviations: ; ; ; ; . Step 4: Sum squared deviations = . Step 5: Divide by to get variance . Step 6: Standard deviation .
FAQ
Run your own problem
References: OpenStax Introductory Statistics, Chapter 2 · Khan Academy: Summarizing quantitative data
See also