You're placing equal probability on the numbers a, a+1,...,b.
The mean is the 'midpoint'.
Just add the integers from a to b and divide by the number of terms, b-a+1.
A discrete uniform random variable, X, has PMF of the form
px(k) = {(1/b-a+1), k = a, a+1....b,
0 otherwise}
where a and b are two integers with a < b
how do i sketch the PMF of X?
how do i work out E[X]?
Sorry about lack of LaTex Math