2

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?

develarist
  • 3,009
  • 8
  • 31

1 Answers1

3

It could be continuous. Think about uniform distributions in the intervals you mention. That would be a continuous distribution, agreed?

Setting aside a technical issue of absolute continuity that I think is inappropriate to address at this level, a continuous random variable has a continuous CDF.

Dave
  • 28,473
  • 4
  • 52
  • 104
  • 1
    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 https://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
  • It depends on what you mean by "take any real number." If "take" means every real number has a nonzero probability, the situation is vacuous: there is no such distribution. Attempting to understand "take" as meaning "the density of each real number is positive" makes it self-fulfilling: by assuming a density even exists, you are assuming the distribution is continuous. Thus, I think we are compelled to understand "take" in the meaning of the *support* of the distribution, which is the smallest closed set having 100% probability. – whuber Jul 31 '20 at 16:16
  • @whuber Yes, I take it to mean support on all of an interval like $[0,1]$. – Dave Jul 31 '20 at 16:25
  • 1
    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
  • That looks like it would not have support on the irrational numbers. What would be $P((\mathbb{R} \setminus \mathbb{Q})\cap [0,1])?$ In any event, I have made a small but meaningful edit to the answer, as I think the original question was along the lines of whether or not a continuous random variable must be able to take any real number. – Dave Jul 31 '20 at 17:34
  • The key concept here, Dave, is *closed* set: by definition, the support is the smallest closed set with unit probability. The smallest closed set containing a dense subset is (by definition of "dense") the entire set. This is far from a mere "technical issue," because the whole question concerns the distinction between continuous and discrete distributions (not about absolute continuity vs. continuity). Your edit looks like it misses these main points. – whuber Jul 31 '20 at 18:55