# Math Help - Discrete Uniform Random Variable

1. ## Discrete Uniform Random Variable

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

2. 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.

3. im sorry, i dont understand what you are saying?

4. am i not right in thinking that E[X] = $\frac{1}{b-a+1}$ x $\frac{b+a}{2}$?

as $\frac{b+a}{2}$ would be moo of all the values k will take and $\frac{1}{b-a+1}$ is the probability of all these values?