Variance of Uniform Distribution
Let the corresponding probabilities are $\frac{1}{n+1}$ for all at the points $\{0,1,2,\cdots,n+1\}$
The general formula is $\sigma^2 = E[x^2]-(E[X])^2$
Let's first calculate $E[X]=0\cdot \frac{1}{n+1}+1\cdot \frac{1}{n+1}+\cdots+n\cdot \frac{1}{n+1}=\frac{0+1+2+\cdots+n}{n+1}=\frac{n(n+1)}{2(n+1)}=\frac{n}{2}$
Now lets calculate $E[X]=0^2\cdot \frac{1}{n+1}+1^2\cdot \frac{1}{n+1}+\cdots+n^2\cdot \frac{1}{n+1}=\frac{0^2+1^2+2^2+\cdots+n^2}{n+1}=\frac{n(n+1)(2n+1)}{6(n+1)}=\frac{n(2n+1)}{6}$
Therefore $\sigma^2 = \frac{n(2n+1)}{6}-\left ( \frac{n}{2}\right )^2 $
$\Rightarrow \frac{n(2n+1)}{6}-\frac{n^2}{4}$
$\Rightarrow \frac{2n(2n+1)-3n^2}{12}$
$\Rightarrow \frac{4n^2+2n-3n^2}{12}$
$\Rightarrow \frac{n^2+2n}{12}=\frac{n(n+2)}{12}$
Now suppose we have same $n+1$ terms shifted from $a$ to $b$ in that case the variance becomes $\frac{(b-a)(b-a+2)}{12}$
Labels: Uniform Distribution, Variance
0 Comments:
Post a Comment
<< Home