There are, in fact, two different formulas for standard deviation here: The population standard deviation and the sample standard deviation .

If denote all values from a population, then the (population) standard deviation is where is the mean of the population.

If denote values from a sample, however, then the (sample) standard deviation is where is the mean of the sample.

The reason for the change in formula with the sample is this: When you're calculating you are normally using (the sample variance) to estimate (the population variance). The problem, though, is that if you don't know you generally don't know the population mean , either, and so you have to use in the place in the formula where you normally would use . Doing so introduces a slight bias into the calculation: Since is calculated from the sample, the values of are on average closer to than they would be to , and so the sum of squares turns out to be smaller on average than . It just so happens that that bias can be corrected by dividing by instead of . (Proving this is a standard exercise in an advanced undergraduate or beginning graduate course in statistical theory.) The technical term here is that (because of the division by ) is an unbiased estimator of .

Another way to think about it is that with a sample you have independent pieces of information. However, since is the average of those pieces, if you know , you can figure out what is. So when you're squaring and adding up the residuals , there are really only independent pieces of information there. So in that sense perhaps dividing by rather than makes sense. The technical term here is that there are degrees of freedom in the residuals .

For more information, see Wikipedia's article on the sample standard deviation.

Answer from Mike Spivey on Stack Exchange
🌐
ThoughtCo
thoughtco.com › population-vs-sample-standard-deviations-3126372
Population vs. Sample Standard Deviations
May 11, 2025 - Add together all of these squared deviations. Now the calculation of these standard deviations differs: If we are calculating the population standard deviation, then we divide by n, the number of data values.
Top answer
1 of 1
106

There are, in fact, two different formulas for standard deviation here: The population standard deviation and the sample standard deviation .

If denote all values from a population, then the (population) standard deviation is where is the mean of the population.

If denote values from a sample, however, then the (sample) standard deviation is where is the mean of the sample.

The reason for the change in formula with the sample is this: When you're calculating you are normally using (the sample variance) to estimate (the population variance). The problem, though, is that if you don't know you generally don't know the population mean , either, and so you have to use in the place in the formula where you normally would use . Doing so introduces a slight bias into the calculation: Since is calculated from the sample, the values of are on average closer to than they would be to , and so the sum of squares turns out to be smaller on average than . It just so happens that that bias can be corrected by dividing by instead of . (Proving this is a standard exercise in an advanced undergraduate or beginning graduate course in statistical theory.) The technical term here is that (because of the division by ) is an unbiased estimator of .

Another way to think about it is that with a sample you have independent pieces of information. However, since is the average of those pieces, if you know , you can figure out what is. So when you're squaring and adding up the residuals , there are really only independent pieces of information there. So in that sense perhaps dividing by rather than makes sense. The technical term here is that there are degrees of freedom in the residuals .

For more information, see Wikipedia's article on the sample standard deviation.

Top answer
1 of 3
13

The two forms of standard deviation are relevant to two different types of variability. One is the variability of values within a set of numbers and one is an estimate of the variability of a population from which a sample of numbers has been drawn.

The population standard deviation is relevant where the numbers that you have in hand are the entire population, and the sample standard deviation is relevant where the numbers are a sample of a much larger population.

For any given set of numbers the sample standard deviation is larger than the population standard deviation because there is extra uncertainty involved: the uncertainty that results from sampling. See this for a bit more information: Intuitive explanation for dividing by when calculating standard deviation?

For an example, the population standard deviation of 1,2,3,4,5 is about 1.41 and the sample standard deviation is about 1.58.

2 of 3
0

My question is similar pnd1987's question. I wish to use a standard deviation in order to appraise the repeatability of a measurement. Suppose I'm measuring one stable thing over and over. A perfect measuring instrument (with a perfect operator) would give the same number over and over. Instead there is variation, and let's assume there's a normal distribution about the mean.

We'd like to appraise the measurement repeatability by the SD of that normal distribution. But we take just N measurements at a time, and hope the SD of those N can estimate the SD of the normal distribution. As N increases, sampleSD and populationSD both converge to the distribution's SD, but for small N, like 5, we get only weak estimates of the distribution's SD. PopulationSD gives an obviously worse estimate than sampleSD, because when N=1 populationSD gives the ridiculous value 0, while sampleSD is correctly indeterminate. However, sampleSD does not correctly estimate the disribution's SD. That is, if we measure N times and take the sampleSD, then measure another N times and take the sampleSD, over and over, and average all the sampleSDs, that average does not converge to the distribution's SD. For N=5, it converges to around 0.94× the distribution SD. (There must be a little theorem here.) SampleSD doesn't quite do what it is said to do.

If the measurement variation is normally distributed, then it would be very nice to know the distribution's SD. For example, we can then determine how many measurements to take in order tolerate the variation. Averages of N measurements are also normally distributed, but with a standard deviation 1/sqrt(N) times the original distribution's.

Note added: the theorem is not so little -- Cochran's Theorem

🌐
Laerd Statistics
statistics.laerd.com › statistical-guides › measures-of-spread-standard-deviation.php
Standard Deviation | How and when to use the Sample and Population Standard Deviation - A measure of spread | Laerd Statistics
However, in statistics, we are usually presented with a sample from which we wish to estimate (generalize to) a population, and the standard deviation is no exception to this. Therefore, if all you have is a sample, but you wish to make a statement about the population standard deviation from which the sample is drawn, you need to use the sample standard deviation.
🌐
Reddit
reddit.com › r/learnmath › population standard deviation vs. sample standard deviation?
r/learnmath on Reddit: Population standard deviation vs. Sample standard deviation?
May 21, 2019 -

why is the population standard deviation the square root of the sum of the (values - means)^2 ÷ n , while the sample standard deviation is all that over n - 1? I don't understand why you have to subtract 1 from the number of things.

Top answer
1 of 4
8
I think part of the problem is that the terms "population standard deviation" and "sample standard deviation" are confusing, because almost everyone seems to think that the "sample standard deviation" is the standard deviation of the sample. It's actually a different concept entirely; it's an "estimator" for the population standard deviation. Imagine that we're making precisely calibrated rulers, and we want to make sure that the lengths of all 1 million of the rulers we made today have a very small standard deviation. That is, we want to know the population standard deviation of the lengths of the rulers. However, no one has the time to literally measure 1 million rulers, so our only choice is to draw a small random sample and figure out how to guess the population standard deviation from the limited data we have. That's what we use the sample standard deviation for. It's a value that we calculate from the sample in order to estimate the true value of the population standard deviation. So, why don't we divide by N in the sample standard deviation? Why isn't the standard deviation of the sample a good estimate of the standard deviation of the population? It turns out that it's biased to give values that are too small. The problem is that we want to find the population standard deviation, which measures variation around the true mean, but the standard deviation of the sample only gives us variation around the sample mean. Naturally, the members of a sample are biased to be closer to their sample mean, so they tend to have a smaller standard deviation than the whole population. That's why we need a different formula for the sample standard deviation. We use N-1 because that's the value that turns the sample standard deviation into an "unbiased estimator", whose average value approaches the true population standard deviation.
2 of 4
6
Here is an article explaining it. https://www.statisticshowto.datasciencecentral.com/bessels-correction/
🌐
Wikipedia
en.wikipedia.org › wiki › Standard_deviation
Standard deviation - Wikipedia
2 days ago - The formula for the population standard deviation (of a finite population) can be applied to the sample, using the size of the sample as the size of the population (though the actual population size from which the sample is drawn may be much larger).
🌐
Statology
statology.org › home › population vs. sample standard deviation: when to use each
Population vs. Sample Standard Deviation: When to Use Each
August 23, 2021 - The formula to calculate a sample ... the population and the sample standard deviation: When calculating the sample standard deviation, we divided by n-1 instead of N....
🌐
Uedufy
uedufy.com › home › blog › population vs sample standard deviation formula: complete guide
Population vs Sample Standard Deviation Formula: Complete Guide
March 22, 2022 - The population standard deviation formulacalculates the standard deviation for an entire population and requires the population mean to be known. The sample standard deviation formulais used to compute the standard deviation for a population sample and requires the sample mean to be known.
Find elsewhere
🌐
ScienceDirect
sciencedirect.com › topics › mathematics › population-standard-deviation
Population Standard Deviation - an overview | ScienceDirect Topics
The smaller the number of items (N or n), the larger the difference between these two formulas. With 10 items, the sample standard deviation is 5.4% larger than the population standard deviation. With 25 items, there is a 2.1% difference, which narrows to 1.0% for 50 items and 0.5% for 100 items.
🌐
Cuemath
cuemath.com › sample-standard-deviation-formula
What Is Sample Standard Deviation Formula? Examples
The sample has greater variability and thus the standard deviation of the sample is almost always greater than that of the population. While calculating the population standard deviation, we divide by n, the number of data values.
🌐
ScienceDirect
sciencedirect.com › topics › mathematics › sample-standard-deviation
Sample Standard Deviation - an overview | ScienceDirect Topics
The smaller the number of items (N or n), the larger the difference between these two formulas. With 10 items, the sample standard deviation is 5.4% larger than the population standard deviation. With 25 items, there is a 2.1% difference, which narrows to 1.0% for 50 items and 0.5% for 100 items.
🌐
Quora
quora.com › What-is-the-difference-between-sample-standard-deviation-and-population-standard-deviation
What is the difference between sample standard deviation and population standard deviation? - Quora
Answer (1 of 4): When dealing with an entire population the standard deviation is simply the deviation from the mean: determined as follows: \sqrt { \frac { \sum { { (x-\bar { x } ) }^{ 2 } } }{ n } } When dealing with a sample the maximum ...
🌐
Macroption
macroption.com › population-sample-variance-standard-deviation
Population vs. Sample Variance and Standard Deviation - Macroption
As a result, the calculated sample variance (and therefore also the standard deviation) will be slightly higher than if we would have used the population variance formula.
🌐
Qlik Community
community.qlik.com › t5 › QlikView-Documents › Standard-Deviation-Population-vs-Sample › ta-p › 1478210
Standard Deviation (Population vs. Sample) - Qlik Community - 1478210
February 20, 2024 - Inspired by swuehl‌'s response here: Help with Standard deviation Full population No... | Qlik Community I thought it make sense to share a way to calculate population standard deviation as QlikView's Stdev() seems to be a sample standard deviation. The difference between the two becomes negligible ...
🌐
Math Forums
mathforums.com › home › high school math › probability & statistics
Standard Deviation, sample vs population | Math Forums
July 18, 2021 - The sample variance uses the sample mean, so to make E(sample variance)=E(population variance), n-1 is needed, because it includes the error term for the sample mean. Write the expression for the sample variance and take E. ... Mathman's explanation ...
🌐
YouTube
youtube.com › watch
STOP Using the Wrong Formula! | Population or Sample Formula for Variance & Standard Deviation? - YouTube
This statistics tutorial explains when to use the population formula vs the sample formula to calculate variance and standard deviation. Why we divide by (n-...
Published   March 30, 2025
🌐
Statalist
statalist.org › forums › forum › general-stata-discussion › general › 1381078-calculating-population-standard-deviation
Calculating population standard deviation - Statalist
There are no built-in functions or -egen- functions that calculate the population standard deviation. In most situations, the sample standard deviation is what is wanted. And it is not hard to transform the sample estimate into the population standard deviation: just multiply by sqrt((N-1)/N).
🌐
DataCamp
datacamp.com › tutorial › sample-standard-deviation
Sample Standard Deviation: The Key Ideas | DataCamp
September 26, 2024 - ... Note that when calculating the sample standard deviation, we use n-1 in the denominator to correct the sample bias. This is known as Bessel’s correction. If we were interested in the population standard deviation, we would use n in the denominator instead.
🌐
Calculator.net
calculator.net › home › math › standard deviation calculator
Standard Deviation Calculator
As such, the "corrected sample standard deviation" is the most commonly used estimator for population standard deviation, and is generally referred to as simply the "sample standard deviation." It is a much better estimate than its uncorrected version, but still has a significant bias for small sample sizes (N<10).