What is the difference between discrete interval and continous interval I'm looking at my math textbook and it says for discrete distribution where the range is from a to b, $$f(x) = \frac{1}{b-a+1}$$
While for continuous distribution it states that $$f(x) = \frac{1}{b-a}$$
What is it different?

The discrete interval from $a$ to $b$ (when both are integers) consists of the integers
$$
a, a+1, \ldots, b-1, b;$$
there are $s = b-a + 1$ of these, so with equal weighting, they each get probability $1/s$. 
The continuous interval consists of all real numbers $x$ with $a \le x \le b$. Its length is $b-a$, so the uniform probability density function must be $\frac{1}{b-a}$ in order to have it integrate to $1$. 
