# Is a bounded real-number random variable discrete or continuous?

A discrete random variable is countable (such as integers and natural numbers), whereas a continuous r.v. is not countable (like the real numbers $$\mathbb{R}$$).

If I have a dataset whose observations can only be real numbers between 0 and 1, which are respectively the lower and upper bounds of the r.v., is the r.v. discrete or continuous? Does the same answer apply to an r.v. whose bounds are -1 and 1?

• The reals in an interval are not countable. – Glen_b Jul 31 '20 at 3:33

• This answer is incorrect (or at least needs careful interpretation to be correct). The variable could be either discrete or continuous or neither: boundedness is completely unrelated. See stats.stackexchange.com/questions/103969 for an explicit, illustrated description of a discrete variable supported on $[0,1].$ – whuber Jul 31 '20 at 16:06
• @whuber I'm now seeing some issues with my answer beyond Cantor distribution-type of pathology, but I think you'd agree that a distribution that can take any real number on $[0,1]$ can't be discrete, right? The example in your linked post wouldn't have support on $\sqrt{2}/2$, for instance. – Dave Jul 31 '20 at 16:12
• @whuber Yes, I take it to mean support on all of an interval like $[0,1]$. – Dave Jul 31 '20 at 16:25
• Well, then, consider any countable subset of $[0,1]$ whose closure is $[0,1]$ (such as all rational numbers between $0$ and $1$), which by definition of "countable" may be indexed $\{x_1,x_2,\ldots,x_n,\ldots\}.$ Take any sequence $(a_n)$ of non-negative real values that has a positive sum $a.$ Define a distribution on $[0,1]$ by setting the probability of $x_i$ to $a_i/a.$ This is a discrete distribution whose support is $[0,1].$ That provides myriad counterexamples to your initial conclusion that the distribution must be continuous. – whuber Jul 31 '20 at 17:28