方差迭代计算公式

匿名 (未验证) 提交于 2019-12-02 23:34:01

方差迭代计算过程推导

术语约定

(1)En=1ni=1nxi E_n =\frac{1}{n} \sum_{i=1}^{n}x_i \tag{1}

(2)F(n)=i=1n(x2En) F(n) = \sum_{i=1}^{n}{(x^2-E_n)} \tag{2}
(3)V(n)=1ni=1n(x2En)=F(n)n V(n) = \frac{1}{n}\sum_{i=1}^{n}{(x^2-E_n)} = \frac{F(n)}{n} \tag{3}

递推公式

F(n)=i=1n(xi2En)=i=1nxi22i=1nxiEn+nEn2En=1ni=1nxinEn=i=1nxi, F(n) = \sum_{i=1}^ {n}{(x_i^ 2-E_n)} = \sum_{i=1}^ {n}{x_i^ 2}-2\sum_{i=1}^ {n}{x_iE_n}+nE_n^2 \\ 由E_n =\frac{1}{n} \sum_{i=1}^ {n}x_i可导出,nE_n = \sum_{i=1}^{n}x_i,故
(4)F(n)=i=1nxi22i=1nxiEn+nEn2=i=1nxi22nEn2+nEn2=i=1nxi2nEn2 F(n) = \sum_{i=1}^{n}{x_i^2}-2\sum_{i=1}^{n}{x_iE_n}+nE_n^2 = \sum_{i=1}^{n}{x_i^2} - 2nE_n^2 + nE_n^2 = \sum_{i=1}^{n}{x_i^2} - nE_n^2 \tag{4}
另外,平均数的递推公式有
(5)nEn=(n1)En1+xn nE_n = (n-1)E_{n-1} + x_n \tag{5}

过程推导

F(n)F(n1)=(i=1nxi2nEn2)(i=1n1xi2(n1)En12)=xn2nEn2+(n1)En12 \begin{aligned} F(n)-F(n-1) &= ( \sum_{i=1}^{n}{x_i^2} - nE_n^2)-( \sum_{i=1}^{n-1}{x_i^2} -( n-1)E_{n-1}^2) \\ &=x_n^2-nE_n^2+(n-1)E_{n-1}^2 \\ \end{aligned}
由(5)知,nEn=(n1)En1+xnnE_n = (n-1)E_{n-1} + x_n(n1)En1=nEnxn(n-1)E_{n-1} = nE_n - x_n,则有:
F(n)F(n1)=xn2nEn2+(n1)En12=xn2En[(n1)En1+xn]+En1(nEnxn)=xn2nEnEn1+EnEn1Enxn+nEn1EnEn1xn=xn2+EnEn1EnxnEn1xn=(xnEn)(xnEn1) \begin{aligned} F(n)-F(n-1) &=x_n^2-nE_n^2+(n-1)E_{n-1}^2 \\ &=x_n^2-E_n[(n-1)E_{n-1}+x_n]+E_{n-1}(nE_n-x_n) \\ &= x_n^2-nE_nE_{n-1}+E_nE_{n-1}-E_nx_n+nE_{n-1}E_n-E_{n-1}x_n \\ &=x_n^2+E_nE_{n-1}-E_nx_n-E_{n-1}x_n \\ &=(x_n-E_n)(x_n-E_{n-1}) \end{aligned}
显然有F(1)=0F(1)=0

文章来源: https://blog.csdn.net/weixin_44479136/article/details/90510374
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!