Find expressions for the mean and variance of X.

183 Views Asked by At

We say that $X$ is a discrete uniform random variable if $X$ takes any of the values $1, 2, . . . , n$ equally likely. That is, $P[X = i] = 1/n$ for $i = 1, . . . , n$.

Find expressions for the mean and variance of X.

My attempt:

$E[X] = \sum{xp(x)} =\sum_{i=1}^n{ i×1/n} = \sum_{i=1}^n{i/n}$

$Var[X] = \frac{\sum_{i=1}^n(i-\sum_{i=1}^n{i/n})^2}{n}$

Is my attempt correct, how do I continue expressing $Var[X]$?

1

There are 1 best solutions below

0
On BEST ANSWER

$$\mathbb{E}[X]=\frac{1}{n}\sum_{i=1}^n i=\frac{n+1}{2}$$

$$\mathbb{V}[X]=\mathbb{E}[X^2]-\mathbb{E}^2[X]$$

that is

$$\mathbb{V}[X]=\frac{1}{n}\sum_{i=1}^n i^2-\left(\frac{n+1}{2}\right)^2=$$

$$=\frac{n(n+1)(2n+1)}{6n}-\left(\frac{n+1}{2}\right)^2=...$$