Questo post elabora le risposte nei commenti alla domanda.
X=(X1,X2,…,Xn)e1∈Rn(e1,e2,…,en)
(e1⋅X)2||X||2=(e1⋅X)2X21+X22+⋯+X2n
e1e1=(1,0,0,…,0)
X21X21+X22+⋯+X2n.(1)
XiσY1,…,Ynσ2Γ(1/2)n−1Γ(1/2)Γ((n−1)/2)(1)
σ2Uσ2U+σ2V=UU+V
U=X21/σ2∼Γ(1/2)V=(X22+⋯+X2n)/σ2∼Γ((n−1)/2)(1/2,(n−1)/2)XYX∼(1,K−1)Y∼2K
X1+⋯+Xn=(1,1,…,1)⋅(X1,X2,⋯,Xn)=n−−√e1⋅X
e1=(1,1,…,1)/n−−√Z(n−−√)2=n(1/2,(n−1)/2)n≥2
fZ(z)=n1−n/2B(12,n−12)(n−z)n−3z−−−−−−−−−√
(0,n)
100,000Zσ=1n=2,3,10
R
sum(x)^2 / sum(x^2)
Zx
n
rnorm
for
apply
hist
curve
for (n in c(2, 3, 10)) {
z <- apply(matrix(rnorm(n*1e5), nrow=n), 2, function(x) sum(x)^2 / sum(x^2))
hist(z, freq=FALSE, breaks=seq(0, n, length.out=50), main=paste("n =", n), xlab="Z")
curve(dbeta(x/n, 1/2, (n-1)/2)/n, add=TRUE, col="Red", lwd=2)
}