Variance of a uniform distribution

Task number: 3550

Let \(X\) be a random variable that takes on the values \(1{,}2,…,n\) with a uniform probability distribution. Determine the variance of this random variable.

  • Hint

    Use the equation \(var(X)=E[(X-EX)^2]=E[X^2]-(EX^2)\).

    Also note that \(\sum\limits_{i=1}^n i^2 =\frac{n(n+1)(2n+1)}6\).

  • Solution

    \( EX=\sum\limits_{i=1}^n i\cdot \frac{1}{n}= \frac{n+1}2\).

    \( EX^2=\sum\limits_{i=1}^n i^2\cdot \frac{1}{n}= \frac{(n+1)(2n+1)}6\).

    And so \( var(X)=\left(\frac{n+1}2\right)^2-\frac{(n+1)(2n+1)}6=\frac{(n+1)(n-1)}{12}.\)

  • Answer

    The variance of the random variable \(X\) is \(\frac{(n+1)(n-1)}{12}\).

Difficulty level: Easy task (using definitions and simple reasoning)
Routine calculation training
Cs translation
Send comment on task by email