-
- の係数はのうち、2回は、残り回はなので
- [tex:=\frac{1}{n^2}\sum_{i=1}^n *1x_i^2 - \sum_{i \ne j}(2(n-1)\times 2-2\times (n-2))x_ix_j]
- 例
- [tex:*2^2]からは
- が、
- [tex:*3^2]からは
- が、
- [tex:*4^2]からも
- が出てくるので
- [tex:*5x_1^2]が得られる。これはすべてのに共通。
- とととがに出てくるので、
- がの係数
x <- rnorm(167)
sum((x-mean(x))^2)/length(x)
sum((outer(x,x,"-"))^2)/(2*length(x)^2)
mean(x)
sum(outer(x,x,"+")^1)/(2*length(x)^2)
> x <- rnorm(167)
> sum((x-mean(x))^2)/length(x)
[1] 1.144598
> sum((outer(x,x,"-"))^2)/(2*length(x)^2)
[1] 1.144598
> mean(x)
[1] -0.1518104
> sum(outer(x,x,"+")^1)/(2*length(x)^2)
[1] -0.1518104