[Math] Discrete Uniform Distribution SOA Practice Problem

probabilityuniform distribution

X has a discrete uniform distribution on the integers 0,1,2,…n and Y has a discrete uniform distribution on the integers 1,2,3,…n.

Find Var[X] -Var[Y]

the answer in the book is $ \frac{2n+1}{12}$ and it gave no explanation other than the Variance of X is $\frac{(n+1)^2 – 1}{12}$ Why is that? I understand that it has something to do with the fact that the integers start at 0, but I don't understand how he derived this formula. Any help understanding this would be amazing, thank you in advance.

Best Answer

Note that $Var(X)=E(X^{2})-(E(X))^{2}$ thus since $$E(X)=\frac{1}{n+1}\sum_{i=0}^{n}i=\frac{1}{n+1}\frac{(n+1)n}{2}=\frac{n}{2}$$ and $$E(X^{2})=\frac{1}{n+1}\sum_{i=0}^{n}i^{2}=\frac{1}{n+1}\frac{n(n+1)(2n+1)}{6}=\frac{n(2n+1)}{6}$$ Thus we have $$Var(X)=\frac{n(2n+1)}{6}-\left(\frac{n}{2}\right)^{2}=\frac{n^{2}+2n}{12}=\frac{(n+1)^{2}-1}{12}$$

Thus the derivation really relies on the fact that you know what sum of first n natural numbers is and sum of first n squared natural numbers. Hopefully this gives you the insight to do rest of problem.

Related Question