# Demonstrations of the expectation and variance of discrete uniform distribution

I'm studying for my exam of probability distributions and in my study book got these equalities:

=

Also mention that: is equal to

how to reach these inequalities?

-
Hint: For the first inequality, the denominator of each summand is the same and can be pulled out of the summation as a common factor. Do you know a formula for the sum $1+2+\cdots+j$? Might there be a typographical error in the lower limit of the sum? –  Dilip Sarwate Nov 10 '11 at 20:22
Do you know a formula for the sum 1+2+⋯+j?... i dont understand what do you mean, I do not think there is a typographical error in the lower limit of the sum, because the teacher also copied it in the same way –  franvergara66 Nov 10 '11 at 20:29
"Do you know a formula for the sum 1+2+⋯+j?" means do you know an expression $f(j)$ (e.g. $[(j+1)^2 - j - 1]/2$) for the sum of the first $j$ positive integers? And if your study book or your teacher expects you to prove the first "equality" exactly as stated, then there is a problem because the result is false unless $i=1$. –  Dilip Sarwate Nov 10 '11 at 20:39
The variable range is {i, i +1, i +2, ...., j-1, j, The variable range is {i, i +1, i +2, ...., j-1, j} with i, j integer i <j –  franvergara66 Nov 10 '11 at 20:51
All right, since you insist that there is no typo. Let us take $i=2,j=3$. Then, $j-i+1=2$, and $$\sum_{x=1}^j\frac{x}{j-i+1} = \sum_{x=1}^3 \frac{x}{2} = \frac{1}{2}+\frac{2}{2}+\frac{3}{2}= 3 \neq \frac{i+j}{2}=\frac{5}{2}.$$ Now what? –  Dilip Sarwate Nov 10 '11 at 20:57

There appears to be a typo in the equations (not "equalities"). As Dilip pointed out in the comments, they are false as written. However, they become rather less mysterious if the lower limit of the sum is $i$ instead of $1$, which indeed seems to be the intention, judging from your comments. (It would have been preferable if you'd corrected the equation when Dilip pointed out the error rather than just responding in a comment.)
With this change, this is merely an expression for the average of the numbers from $i$ to $j$, since there are $i-j+1$ of these. Clearly the average of the numbers from $i$ to $j$ is halfway between them at $(i+j)/2$.