For an array \(x=\{x_1,x_2,\cdots,x_n\}\), we say
\[s^2=\frac{1}{n}\sum_{1\leq i\leq n}(x_i-\bar x)^2. \]stands for the varience of \(x\). Now we consider to calculate it.
Let \(\alpha_k=\sum_{1\leq i\leq n}x_i^k,\bar x=\frac{1}{n}\alpha\),then:
\[\begin{aligned} s^2\times n^2&=n\sum_{1\leq i\leq n}(x_i-\bar x)^2\\ &=\sum_{1\leq i\leq n}n(x_i-\frac{1}{n}\alpha)^2\\ &=\sum_{1\leq i\leq n}(nx_i^2-2x_i\alpha+\frac{1}{n}\alpha^2)\\ &=n\alpha_2-2\alpha^2+\alpha^2=n\alpha_2-\alpha^2. \end{aligned}\]So, \(s^2=\dfrac{n\sum_{i}x_i^2-(\sum_i x_i)^2}{n^2}\).
标签:bar,frac,方差,sum,leq,关于,alpha,aligned From: https://www.cnblogs.com/caijianhong/p/16992798.html