E(X)=∑(k=1-->n)k/n=(n+1)/2
E(X^2)=∑(k=1-->n)k^2/n=n(n+1)(2n+1)/6n=(n+1)(2n+1)/6
(平方和公式即1^2+2^2+3^2+…+n^2=n(n+1)(2n+1)/6)
V(X)=E(X^2)-(E(X))^2=(n^2-1)/12
E(X)=∑(k=1-->n)k/n=(n+1)/2
E(X^2)=∑(k=1-->n)k^2/n=n(n+1)(2n+1)/6n=(n+1)(2n+1)/6
(平方和公式即1^2+2^2+3^2+…+n^2=n(n+1)(2n+1)/6)
V(X)=E(X^2)-(E(X))^2=(n^2-1)/12