加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > MsSql教程 > 正文

SQL – STDEVP或STDEV以及如何使用?

发布时间:2020-12-12 16:19:38 所属栏目:MsSql教程 来源:网络整理
导读:我有一张桌子: LocationId OriginalValue Mean1 0.45 3.99 2 0.33 3.993 16.74 3.994 3.31 3.99 等等… 我将如何使用此表格制定标准偏差,以及您将推荐什么 – STDEVP或STDEV? 解决方法 要使用它,只需: SELECT STDEVP(OriginalValue)FROM yourTable 从下面
我有一张桌子:
LocationId OriginalValue Mean
1          0.45         3.99  
2          0.33         3.99
3          16.74        3.99
4          3.31         3.99

等等…

我将如何使用此表格制定标准偏差,以及您将推荐什么 – STDEVP或STDEV?

解决方法

要使用它,只需:
SELECT STDEVP(OriginalValue)
FROM yourTable

从下面你可能想要STDEVP.

从here:

STDEV is used when the group of numbers being evaluated are only a partial sampling of the whole population. The denominator for dividing the sum of squared deviations is N-1,where N is the number of observations ( a count of items in the data set ). Technically,subtracting the 1 is referred to as “non-biased.”

STDEVP is used when the group of numbers being evaluated is complete – it’s the entire population of values. In this case,the 1 is NOT subtracted and the denominator for dividing the sum of squared deviations is simply N itself,the number of observations ( a count of items in the data set ). Technically,this is referred to as “biased.” Remembering that the P in STDEVP stands for “population” may be helpful. Since the data set is not a mere sample,but constituted of ALL the actual values,this standard deviation function can return a more precise result.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读