[Math] Why must a discrete uniform random variable be sequential

random variables

My probability book defines a discrete uniform random variable as a variable X such that P(X=x) = \frac{1}{b-a+1}, for all x=a,a+1…b. My doubt is, in a discrete uniform distribution must the numbers that the random variable may take on always be intenger and sequential? And if so, why? I mean, could there be a uniform distribution of the following form?

$$P(X=x) = \begin{cases}\frac{1}{4} &,& \text{if }x \in\{ 3,5,6.4,9\} \\
0 &, & \text{otherwise} \end{cases}$$
Athough it does make sense to me (since there are 4 possible outcomes with equal probability, so each individual probability must = 1/4), it doesn't seem to fit that definition: $\frac{1}{b-a+1} = \frac{1}{9-3+1}$ is different from $\frac{1}{4}$.

What am I getting wrong? Thanks in advance.

Best Answer

Your probability mass function is indeed that of a uniform discrete random variable; although not a standard one so the usual formula does not apply.

It is just, because the support is not a set of consecutive integer values, that the count of elements in the sample space is not conveniently counted by subtracting its minimum from its maximum and adding 1.

$$X\sim\mathcal{U}\{ 3,5,6.4,9\} ~\iff~ \mathsf P(X=x) = \begin{cases}\frac{1}{4} &,& \text{if }x \in\{ 3,5,6.4,9\} \\0 &, & \text{otherwise} \end{cases}$$

We have three unequally-spaced, non-unit-length steps between the four massive points.   However, those points do have a uniform probability distribution.