Mathwords logoMathwords

Sample Standard Deviation — Definition, Formula & Examples

Sample standard deviation is a number that tells you how far the values in a sample typically fall from the sample mean. You use it when your data are a sample taken from a larger population, and you want to estimate the spread of that whole population.

For a sample x1,x2,…,xnx_1, x_2, \dots, x_n with n≥2n \ge 2 and sample mean xˉ\bar{x}, the sample standard deviation ss is the nonnegative square root of the sample variance s2=1n−1∑i=1n(xi−xˉ)2s^2 = \frac{1}{n-1}\sum_{i=1}^{n}(x_i - \bar{x})^2. The divisor n−1n-1 (Bessel's correction) makes s2s^2 an unbiased estimator of the population variance σ2\sigma^2. The square root ss itself still slightly underestimates σ\sigma on average.

Key Formula

s=∑i=1n(xi−xˉ)2n−1s = \sqrt{\frac{\sum_{i=1}^{n}(x_i - \bar{x})^2}{n-1}}
Where:
  • ss = sample standard deviation
  • xix_i = the i-th data value in the sample
  • xˉ\bar{x} = sample mean, the sum of the values divided by n
  • nn = number of values in the sample (sample size)
  • n−1n-1 = degrees of freedom, the divisor used for a sample

How It Works

First find the sample mean. Then measure how far each value is from it, square those deviations, and add them up. Divide the total by n−1n-1 instead of nn, and take the square root. The result has the same units as the data. A small ss means the values cluster tightly around the mean. A large ss means they are spread out.

Worked Example

Problem: A random sample of 5 students reported how many hours they slept last night: 7, 7, 11, 11, 14. Find the sample standard deviation.
Step 1: Find the sample mean.
xˉ=7+7+11+11+145=505=10\bar{x} = \frac{7+7+11+11+14}{5} = \frac{50}{5} = 10
Step 2: Subtract the mean from each value, square each result, and add the squares. The deviations are −3,−3,1,1,4-3, -3, 1, 1, 4.
9+9+1+1+16=369 + 9 + 1 + 1 + 16 = 36
Step 3: Divide by n−1=4n - 1 = 4 to get the sample variance.
s2=364=9s^2 = \frac{36}{4} = 9
Step 4: Take the square root to return to the original units (hours).
s=9=3s = \sqrt{9} = 3
Answer: The sample standard deviation is s=3s = 3 hours.

Why It Matters

In AP Statistics, ss appears in almost every inference procedure. It is the key ingredient in the standard error s/ns/\sqrt{n}, which you use for one-sample t-intervals and t-tests. Researchers, quality-control engineers, and pollsters rarely have whole-population data, so the sample standard deviation is the version they actually compute.

Common Mistakes

Mistake: Dividing by n instead of n − 1 when the data are a sample.
Correction: Dividing by nn gives the population standard deviation σ\sigma. In the example, 36/5≈2.68\sqrt{36/5} \approx 2.68, which is too small. Use n−1n - 1 whenever the data come from a sample. On a calculator, choose sxs_x, not σx\sigma_x.
Mistake: Forgetting to take the square root, which reports the variance as the standard deviation.
Correction: The variance s2=9s^2 = 9 is in squared units (hours squared). Take the square root so the answer, s=3s = 3 hours, is in the same units as the data.

Related Terms