方差一瞥

\[\frac{1}{m}\sum\limits_{i=1}^m(a_i-\frac{sum}{m})^2\\=\frac{1}{m}\sum\limits_{i=1}^ma_i^2+\frac{sum^2}{m^2}-2\times a_i\times\frac{sum}{m}\\=\frac{1}{m}\times m\times\frac{sum^2}{m^2}-\frac{2}{m}\times sum\times\frac{sum}{m}+\frac{1}{m}\sum\limits_{i=1}^ma_i^2\\=-\frac{sum^2}{m^2}+\frac{1}{m}\sum\limits_{i=1}^ma_i^2 \]

乘上\(m^2\)后就变成了

\[-sum^2+m\sum\limits_{i=1}^ma_i^2 \]

posted @ 2022-02-05 17:55  Feyn618  阅读(17)  评论(0编辑  收藏  举报