# Is my random variable discrete or continuous?

Suppose I have a discrete set of (finite) data (values are only positive integers) (which always remains discrete whenever the observation/survey is taken), divided into some identical categories . Now, I want to calculate the mean values of some random variable for each category, hence getting a sequence of mean values. Considering mean as a random variable (let's call it $M$), it's taking decimal values also (obviously possible). But I am not sure if $M$ is a discrete or a continuous random variable.

My intuition suggest me that it should be discrete. Since, my original data from which I calculated the sets of mean is discrete so the mean can take finitely many values which I suppose is not the case with a continuous random variable where the mean can take infinitely many values within an interval. So is my intuition right or wrong? Is it true that a discrete random variable takes finitely many values and continuous R.V. can take infinitely many possible values?

• Why does it matter? For instance, on a computer all random variables are discrete. "Discrete" and "continuous" are modeling decisions you make.
– whuber
Aug 19 '16 at 14:29
• Yeah but that's on a computer. In reality the picture is different. Their are several assumptions required to say or to propose any rule or such statement which is not the case with computers. Aug 19 '16 at 14:33
• My last sentence was intended to be independent of the others. Forget computers: why does it matter? For some analyses it might be fruitful to view a random variable as discrete and for others you might want to model it as continuous. It is rare that the actual number of distinct values it might have, or potentially take on in the "real world," should determine your choice. Other considerations are more important.
– whuber
Aug 19 '16 at 14:40
• Note that a there exist discrete variables that take on a (countable) infinite number of values
– user83346
Aug 19 '16 at 15:15
• See stats.stackexchange.com/questions/103969 for examples of discrete variables that have positive probabilities for every rational number within a given interval. (The sum of such a variable with a variable supported on the integers would have positive probabilities at all rational numbers!)
– whuber
Aug 19 '16 at 18:06

If you have a finite number of samples then your intuition is correct that the sample mean cannot take certain values. You mention that the discrete values are integers so clearly their mean cannot be irrational.

We know from the central limit theory that the sample mean tends to a continuous distribution as the sample size becomes large.

Even though a finite sample size doesn't technically create a continuous distribution, if your sample size is large or if the distance between discrete values is small for your purposes then you really should consider modelling it as a continuous variable.

• So if I have a very large population data, then in that case although the mean is discrete r.v. I should treat it as a continuous r.v. ? Aug 19 '16 at 13:59
• What do you mean "population data"?. What is the range of your discrete variable?
– Hugh
Aug 19 '16 at 14:20
• It's a human population data from a census. Lower limit varies from few thousands to millions and so does the upper limit to millions. Aug 19 '16 at 14:23
• When you get the average what is your sample size? Also how many discrete categories do you have for the data?
– Hugh
Aug 19 '16 at 14:27
• I think you're confusing terminology. You might be using "population" to refer to people, you might not be. If you have knowledge of the entire population then your mean isn't a random variable, it can only take one value. The variable X which you are getting a mean from has a lower limit of about 1 thousand or 1 million and an upper limit of around several million, correct? The range of X is over 1 million wide but you are splitting that into 6 discrete categories and getting a mean. Honestly there is so much that's unclear, you should post a new question and include an example data table.
– Hugh
Aug 19 '16 at 17:16

It is in the nature of a continuous variable, that it can take infinite number of values within any given range. In reality, this is almost never the case. If you measure the length of a board, you measure in meters, centimeters, millimeters, whatever. These are rounded values. An astronomer rounds to lightyears, a carpenter to millimeters, an machinist to tens of millimeters, but every measurement is discrete in the sense, that it is always rounded to some precision. Nevertheless, we use mathematical methods on these values as if they were continuous. As long as there are enough discrete steps so that discreteness makes no difference.

As to statistics: Psychologists often compute statistics from item counts, as if these were continuous (like the mean of a sum score of a likert scale).

Continous in this sense is not a boolean value. The question is, whether your mean is "continuous enough" to justify quasi-continuous computations.

• +1 By "infinitesimal" (smaller than any finite number in size) don't you really mean (uncountably) "infinite"?
– whuber
Aug 19 '16 at 14:31
• Thank you for pointing out my language mishap. "Infinite" is the right word. I did edit my answer accordingly. Aug 19 '16 at 14:52

Addressing a minor side point: "Is it true that a discrete random variable takes finitely many values?"

Not necessarily. Consider the random variable "number of times that I toss a coin before it comes up heads". This is discrete but has infinitely many possible values.