# Please solve my problems with difference between discrete and continuous variable.

#### Sindy

##### New Member
Hey Guys! I cant understand what is difference between discrete and continuous variable. Any advice will appreciate.

#### obh

##### Active Member
Hi Sindy,

Length for example is continuous you can get any value 3 3.1 3.1235 3.12323455333
But if you measure the length in the centimeters only (3cm, 4cm, 5cm) it is a discrete variable.

the number of children is discrete, you can't have 3.123 children in the class.

#### Sindy

##### New Member
Hi Sindy,

Length for example is continuous you can get any value 3 3.1 3.1235 3.12323455333
But if you measure the length in the centimeters only (3cm, 4cm, 5cm) it is a discrete variable.

the number of children is discrete, you can't have 3.123 children in the class.
By the way. You almost right. I find interesting article and compare your defenition with information on this site https://differencebtwn.com/difference-between-discrete-and-continuous-variable

Last edited:

#### hlsmith

##### Not a robit
For simplicity I typically define it as @obh

Continuous can take on any finite or nuanced value, like weight. And discrete are integers, usually counts, e.g., number of pets in a house.

#### Miner

##### TS Contributor
My sole disagreement with @obh is the centimeters example. That is a measurement resolution issue, not a discrete example. With true discrete values a mean value that is not an integer cannot physically exist (i.e., 3.123 children). Whereas, you can physically have a mean of 3.123 cm despite having only measured to 0 decimal places.

Wait until you try to understand the difference between interval and ratio scaled continuous data.

#### hlsmith

##### Not a robit
@Miner - I am not disagreeing with you, but see the following. I am fairly familiar with survival analyses and my time to event measure is usually days. So integers, but I will acknowledge it is actually continuous. However, earlier in the year I was exposed to discrete survival analysis. Which is when you collect outcomes at interval values, so say every 30 days. So if a person has an event on day 29 you would call it day 30, or perhaps you really did only collect outcomes on day 30 (even though they may have had it at a different day than day 30. However they call time as discrete in this approach. So I am imagining there are other places where the term gets used without full allegiance to the discrete definition.

#### Miner

##### TS Contributor
@hlsmith It's always interesting how the same thing is called by different terminologies across disciplines.
• survival analysis = reliability analysis
• discrete survival analysis = reliability analysis with interval censoring (no mention of discrete)

#### noetsi

##### Fortran must die
How about multilevel analysis which is called many things including hierarchical regression.
It is common for one discipline to adapt something developed in another and give it a new name. This causes me great confusion when reading in different discipline. Often I am not sure what they mean.

I call survival analysis cox proportional hazard (regression)

#### obh

##### Active Member
My sole disagreement with @obh is the centimeters example. That is a measurement resolution issue, not a discrete example. With true discrete values a mean value that is not an integer cannot physically exist (i.e., 3.123 children). Whereas, you can physically have a mean of 3.123 cm despite having only measured to 0 decimal places.

Wait until you try to understand the difference between interval and ratio scaled continuous data.
Hi Miner,

Somebody may define the discrete/continuous only per the true nature of the variable, I can understand the logic of such definition, but is there such a definition?

PS, is the Interval/ratio relevant only for the continuous variables? My common sense (only) say it should be relevant also to discrete variables.

#### Miner

##### TS Contributor
Hi Miner,

Somebody may define the discrete/continuous only per the true nature of the variable, I can understand the logic of such definition, but is there such a definition?
Good question. The problem is, where do you find a truly authoritative source for the answer?

PS, is the Interval/ratio relevant only for the continuous variables? My common sense (only) say it should be relevant also to discrete variables.
Very interesting question. I ran across the following comment while researching it:
"Note that the categories are not as clear cut as they sound. What kind of variable is color? In a psychological study of perception, different colors would be regarded as nominal. In a physics study, color is quantified by wavelength, so color would be considered a ratio variable. What about counts? If your dependent variable is the number of cells in a certain volume, what kind of variable is that. It has all the properties of a ratio variable, except it must be an integer. Is that a ratio variable or not? These questions just point out that the classification scheme appears to be more comprehensive than it is."

#### obh

##### Active Member
Good question. The problem is, where do you find a truly authoritative source for the answer?
I don't really know ...
But practically you can use the continuity correction for a discrete distribution, and the cm example is exactly the case you will do it.
So practically you are correct

Very interesting question. I ran across the following comment while researching it:
"Note that the categories are not as clear cut as they sound. What kind of variable is color? In a psychological study of perception, different colors would be regarded as nominal. In a physics study, color is quantified by wavelength, so color would be considered a ratio variable. What about counts? If your dependent variable is the number of cells in a certain volume, what kind of variable is that. It has all the properties of a ratio variable, except it must be an integer. Is that a ratio variable or not? These questions just point out that the classification scheme appears to be more comprehensive than it is."

I would treat "color" for psychological study and color for physics as two different measurements one is discrete and one is continuous.

The reason I think Interval/ratio is relevant also to discrete variables - you can say that 4 children are dobule than 2 children, and the distance between 4 children to 6 is the same as from 23 children to 25. so we can say that the children variable is ratio (any ratio is also Interval)
I can't think of a discrete variable which is only Interval. (but it is too late now ...)

#### noetsi

##### Fortran must die
I think related to the color thing the key is how something is measured and defined. Say for the sake of argument you can measure education on a 100 point scale. That is interval. Now you define it by grades. A-E that is ordinal. I am sure you could make it nominal (although I can't think of an example). Its the same phenomenon measured differently.

So few things are inherently interval (and things we think of as ordinal might be measured on an interval scale in some cases).

#### hlsmith

##### Not a robit
I am in the medical field and i was just reading a paper by some very savvy folks and in a repeated treatment study they referred to time as discrete, since collection is standard across time. So misnomer perhaps, but i knew exactly what they were writing about

#### Sindy

##### New Member
Guys now I'm completely confused. Which of you to trust me?

#### Dason

I don't know. Why should we trust you.

#### ondansetron

##### TS Contributor
My sole disagreement with @obh is the centimeters example. That is a measurement resolution issue, not a discrete example. With true discrete values a mean value that is not an integer cannot physically exist (i.e., 3.123 children). Whereas, you can physically have a mean of 3.123 cm despite having only measured to 0 decimal places.

Wait until you try to understand the difference between interval and ratio scaled continuous data.
Agreed. Limitation by measurement devices does not dictate the nature of the underlying variable. I like to think of the set of all possible values something could be if i had an ideal measurement device (think abstractly like a philosopher, physicist, or, say, a statistician...what's the true nature of this variable). Discrete things are generally easy to conceptualize as integers (even more often natural numbers), in my opinion (number of children, fingers on a hand, baseballs in a dugout). Just because we choose the resolution (i.e. only height measured in feet rounded to the nearest whole foot or height measured in feet and inches) doesn't change that height is truly continuous (a perfect ruler could tell the difference between someone 6.000000000000001 ft and someone else who is infinitesimally taller).

#### ondansetron

##### TS Contributor
@Miner - I am not disagreeing with you, but see the following. I am fairly familiar with survival analyses and my time to event measure is usually days. So integers, but I will acknowledge it is actually continuous. However, earlier in the year I was exposed to discrete survival analysis. Which is when you collect outcomes at interval values, so say every 30 days. So if a person has an event on day 29 you would call it day 30, or perhaps you really did only collect outcomes on day 30 (even though they may have had it at a different day than day 30. However they call time as discrete in this approach. So I am imagining there are other places where the term gets used without full allegiance to the discrete definition.
I think this is still continuous as you said but forced discrete because of when the follow up occurs. Another example for truly discrete might be whether or not a blood sample was taken, in-office, on an annual physical appointment (the follow up is fixed yearly and the event can only occur on that date and is not an artifact of limited resolution). Always interesting to think of these cases and how they're practically implemented.

#### ondansetron

##### TS Contributor
Hi Miner,

Somebody may define the discrete/continuous only per the true nature of the variable, I can understand the logic of such definition, but is there such a definition?

PS, is the Interval/ratio relevant only for the continuous variables? My common sense (only) say it should be relevant also to discrete variables.
They are absolutely applicable terms for discrete variables. The number of students in a class is a perfect example of ratio-level measurement. Zero indicates no students in the class, a true absence of students. 10 students is actually half as many as 20 students. The difference of 15 and 10 students is identical to the difference in 25 and 20 students (5 has the same meaning).

#### ondansetron

##### TS Contributor
Good question. The problem is, where do you find a truly authoritative source for the answer?

Very interesting question. I ran across the following comment while researching it:
"Note that the categories are not as clear cut as they sound. What kind of variable is color? In a psychological study of perception, different colors would be regarded as nominal. In a physics study, color is quantified by wavelength, so color would be considered a ratio variable. What about counts? If your dependent variable is the number of cells in a certain volume, what kind of variable is that. It has all the properties of a ratio variable, except it must be an integer. Is that a ratio variable or not? These questions just point out that the classification scheme appears to be more comprehensive than it is."
In the physics example, they're no longer measuring color, but wavelength which is a property of an electromagnetic wave whereas color is the perception of that phenomenon. The perception of color is nominal unless you're changing your variable to the perception of wavelength or using color as a proxy for wavelength or energy, for example. So I disagree completely that "color" is ratio, unless you further define the variable to include some measurement that is truly ratio. The example of cells per volume is exactly ratio because integers can absolutely be ratio, see my example about students in a class. Maybe someone else can give counter arguments, but the excerpt is not only not convincing, but I think it is conflating concepts.