What is the difference between stdev.p and stdev.s & which should I use?

JenniferMurphy

Well-known Member
Joined
Jul 23, 2011
Messages
2,525
Office Version
  1. 365
Platform
  1. Windows
The stdev.p function returns the std dev for a population, whereas the stdev.s does so for a sample, presumably less than the entire population.

These 2 pages from Microsoft appear identical except for the denominator. It's n for stdev.p and n-1 for stdev.s, so stdev.p will always be slightly larger than stdev.s.
But it doesn't say anything about when to use one or the other.


Based on this example, where I am using the std dev to calculate z scores, it doesn't really matter which I use. The z scores based on stdev.s are slightly more spread out, but the order doesn't change. The raw data is prices and Amazon-style 5-star ratings. If these were selected products, they would clearly be a sample, not the entire population.

Cell Formulas
RangeFormula
C2:D2D2=AVERAGE(MrExcel[Price])
F2:G2G2=AVERAGE(MrExcel[Rtg])
C3C3=STDEV.S(MrExcel[Price])
F3F3=STDEV.S(MrExcel[Rtg])
D4D4=STDEV.P(MrExcel[Price])
G4G4=STDEV.P(MrExcel[Rtg])
C7:C21C7=ZScore([@Price],@Mean,@StdDevP,FALSE)
D7:D21D7=ZScore([@Price],@Mean,@StdDevS,FALSE)
F7:F21F7=ZScore([@Rtg],@Mean,@StdDevP)
G7:G21G7=ZScore([@Rtg],@Mean,@StdDevS)
H7:H21H7=[@[Price Z(P)]]+[@[Rtg Z(P)]]
I7:I21I7=[@[Price Z(S)]]+[@[Rtg Z(S)]]
J7:J21J7=RANK.EQ([@[Sum Z(P)]],[Sum Z(P)])
K7:K21K7=RANK.EQ([@[Sum Z(S)]],[Sum Z(S)])
L7:L21L7=[@[Rank X(S)]]-[@[Rank X(P)]]
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Hello,

Use STDEV.P if you need to calculate the standard deviation for a whole population. If you just need to calculate the standard deviation of a sample of a population, use the STDEV.S function.

So, are you looking at the whole Population, or just at some part (a sample) of it?

Hint: In case you look at all your games with your grand kids so far, it's the whole population, so use STDEV.P.

Regards,
Bernd
 
Upvote 0
Hello,

Use STDEV.P if you need to calculate the standard deviation for a whole population. If you just need to calculate the standard deviation of a sample of a population, use the STDEV.S function.

So, are you looking at the whole Population, or just at some part (a sample) of it?

Hint: In case you look at all your games with your grand kids so far, it's the whole population, so use STDEV.P.

Regards,
Bernd
Yes, I understand the difference between a sample of a pop[u;ation and the whole population.

Perhaps I wasn't clear enough in my question. I would like to know why STDEV.S is more accurate than STDEV.P when applied to a sample? Why is dividing the terms by n+1 more accurate than by just n?
 
Upvote 0
The link took me to the editing version, maybe the below is a bit better

Yes, that is a better description. The difference mathematically is that for the population std dev, the denominator is N, whereas for the sample std dev it's N-1.

Now why this correction is necessary is a little more complicated than I have time to study right now. But I am convinced that I should use stdev.s if I don't have the entire population, which I will rarely have.

Thanks
 
Upvote 0
The link took me to the editing version, maybe the below is a bit better

 
Upvote 0
The link takes me to a more readable version today probably due to note at the bottom of the Wikipedia page
1666697118950.png


but it still only gives me the option to go to the edit pages (on a laptop)
1666697366514.png
 
Upvote 0

Forum statistics

Threads
1,214,523
Messages
6,120,047
Members
448,940
Latest member
mdusw

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top