codecamp

Statistics - Standard Deviation of Discrete Data Series

当数据与其频率一起给出时。 下面是离散系列的例子:

项目 5 10 20 30 40 50 60 70
频率 2 5 1 3 12 0 5 7

对于离散系列,可以使用以下公式计算标准偏差。

$\sigma = \sqrt{\frac{\sum_{i=1}^n{f_i(x_i-\bar x)^2}}{N}}$

其中 -

  • $ {N} $ =观察值= $ {\\ sum f} $。

  • $ {f_i} $ =频率f的不同值。

  • $ {x_i} $ =变量x的不同值。

例子

问题陈述:

计算以下离散数据的标准偏差:

项目 5 15 25 35
频率 2 1 1 3

解决方案:

基于给定的数据,我们有:

意思

${ \bar x = \frac{5 \times 2 + 15 \times 1 + 25 \times 1 + 35 \times 3}{7} \\[7pt] = \frac {10 + 15 + 25 + 105}{7} = 22.15 }$
项目
x
频率
f
$ {\\ bar x} $ $ {x- \\ bar x} $ $ f({x- \\ bar x})^ 2 $
5 2 22.15 -17.15 580.25
15 1 22.15 -7.15 51.12
25 1 22.15 2.85 8.12
35 3 22.15 12.85 495.36
  ${N=7}$     $ {\\ sum {f(x- \\ bar x)^ 2} = 1134.85} $

基于上述公式,标准偏差$ \\ sigma $将是:

${ \sigma =\sqrt{\frac{\sum_{i=1}^n{f_i(x_i-\bar x)^2}}{N}} \\[7pt] \, = \sqrt{\frac{1134.85}{7}} \, = 12.73}$

给定数字的标准偏差为12.73。


Statistics - Arithmetic Mode of Continous Series
Statistics - Geometric Mean of Individual Series
温馨提示
下载编程狮App,免费阅读超1000+编程语言教程
取消
确定
目录

Statistics Tutorial

Statistics Useful Resources

关闭

MIP.setData({ 'pageTheme' : getCookie('pageTheme') || {'day':true, 'night':false}, 'pageFontSize' : getCookie('pageFontSize') || 20 }); MIP.watch('pageTheme', function(newValue){ setCookie('pageTheme', JSON.stringify(newValue)) }); MIP.watch('pageFontSize', function(newValue){ setCookie('pageFontSize', newValue) }); function setCookie(name, value){ var days = 1; var exp = new Date(); exp.setTime(exp.getTime() + days*24*60*60*1000); document.cookie = name + '=' + value + ';expires=' + exp.toUTCString(); } function getCookie(name){ var reg = new RegExp('(^| )' + name + '=([^;]*)(;|$)'); return document.cookie.match(reg) ? JSON.parse(document.cookie.match(reg)[2]) : null; }