SQL - STDEVP or STDEV and how to use it?

后端 未结 3 1836
灰色年华
灰色年华 2020-12-30 19:37

I have a table:

LocationId OriginalValue Mean
1          0.45         3.99  
2          0.33         3.99
3          16.74        3.99
4          3.31                


        
3条回答
  •  有刺的猬
    2020-12-30 20:31

    In statistics there are two types of standard deviations: one for a sample and one for a population. The sample standard deviation, generally notated by the letter s, is used as an estimate of the population standard deviation. The population standard deviation, generally notated by the Greek letter lower case sigma, is used when the data constitutes the complete population. It is difficult to answer your question directly -- sample or population -- because it is difficult to tell what you are working with: a sample or a population. It often depends on context. Consider the following example. If I want to know the standard deviation of the age of students in my class, then I u=would use STDEVP because the class is my population. But if I want the use my class as a sample of the population of all students in the school (this would be what is known as a convenience sample, and would likely be biased, but I digress), then I would use STDEV because my class is a sample. The resulting value would be my best estimate of STDEVP. As mentioned above (1) for large sample sizes (say, more than thirty), the difference between the two becomes trivial, and (2) generally you should use STDEV, not STDEVP, because in practice we usually don't have access to the population. Indeed, one could argue that if we always had access to populations, then we wouldn't need statistics. The entire point of inferential statistics is to be able to make inferences about a population based on the sample.

提交回复
热议问题