Let X be the random variable taking values $1, 2, \ldots, n$ for a fixed positive integer n. If $P(X=k)=\frac{1}{n}$ for $1\le k\le n$, then the variance of X is
- (1)
$\frac{n^2-1}{12}$
- (2)
$\frac{n^2+1}{12}$
- (3)
$\frac{n^2-1}{6}$
- (4)
$\frac{(n+1)(n+2)}{6}$
Show answer
Option (1) is correct.
The council's preliminary key