\documentclass[a4paper,12pt]{article}

\newcommand{\ds}{\displaystyle}
\begin{document}
\parindent=0pt

{\bf Question}

Suppose that an integer between (including) 1 and 100 is chosen at
random and that $X$ denotes the number obtained. Determine the
distribution of $X$, and find the mean and variance of $X$.


\medskip

{\bf Answer}

From the assumption that $X$ has a discrete uniform distribution
over

$1,2,....,100$ i.e. $P\{X=k\}=\frac{1}{100},\ \ k=1,2,...,100.$

$E(X) = \frac{1}{100} {\ds \sum_{1}^{100} k} = 50.5$

$E(X^2) = \frac{1}{100}{\ds \sum_1^{100} k^2} = 3383.5$

$var(X) = E(X^2)-\{E(X)\}^2=833.25$

$\ds \sum_1^N i = \ds \frac{N(N+1)}{2}$

$\ds \sum_1^N i^2 = \ds \frac{N(N+1)(N+2)}{6}$

$var(X) = \ds \frac{N^2 - 1}{12}\ {\rm for\ discrete\ uniform}$


\end{document}
