SQL - STDEVP or STDEV and how to use it?

后端 未结 3 1854
灰色年华
灰色年华 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:17

    Generally, you should use STDEV when you have to estimate standard deviation based on a sample. But if you have entire column-data given as arguments, then use STDEVP.

    In general, if your data represents the entire population, use STDEVP; otherwise, use STDEV.

    Note that for large samples, the functions return nearly the same value, so better use STDEV in this case.

提交回复
热议问题