What is the difference between discrete data and continuous data?

What is the difference between discrete data and continuous data?

• Did you try Google first? For me, it gives this. Jul 25, 2010 at 20:15
• Here is a nice video which answers your question. youtube.com/watch?v=MIX3ZpzEOdM
– user67783
Jan 30, 2015 at 2:35
• Just think digital vs analog. Same thing - different names. Jun 15, 2016 at 9:15
• I truly don't know what the difference between "discrete" and "continuous" data. For some reasons, intro stat classes seem to really enjoy making students memorize rules to distinguish these two things. As far as I've been able to understand, the differences are not in the data--but in how we choose to model the data. Sep 24, 2017 at 5:06
• This was the top result in Google, @robingirard. Sep 28, 2017 at 10:21

Discrete data can only take particular values. There may potentially be an infinite number of those values, but each is distinct and there's no grey area in between. Discrete data can be numeric -- like numbers of apples -- but it can also be categorical -- like red or blue, or male or female, or good or bad.

Continuous data are not restricted to defined separate values, but can occupy any value over a continuous range. Between any two continuous data values, there may be an infinite number of others. Continuous data are always essentially numeric.

It sometimes makes sense to treat discrete data as continuous and the other way around:

• For example, something like height is continuous, but often we don't really care too much about tiny differences and instead group heights into a number of discrete bins -- i.e. only measuring centimetres --.

• Conversely, if we're counting large amounts of some discrete entity
-- i.e. grains of rice, or termites, or pennies in the economy -- we may choose not to think of 2,000,006 and 2,000,008 as crucially
different values but instead as nearby points on an approximate
continuum.

It can also sometimes be useful to treat numeric data as categorical, eg: underweight, normal, obese. This is usually just another kind of binning.

It seldom makes sense to consider categorical data as continuous.

• @walktalky as @jeromy alludes to, in psychology at least, categorial variables such as reponses to questions are often presumed as being a representation of a underlying trait, so in that sense categorial data is sometimes taken as being continuous. May 27, 2011 at 9:31
• @richiemorrisroe One could nitpick about the difference between the data and the putative trait, but of course you are right. Some very interesting further points were made in response to this follow-up question. May 27, 2011 at 11:00
• thanks for the link, those answers are indeed very interesting. May 27, 2011 at 11:08
• > "There may potentially be an infinite number of those values, but each is distinct and there's no grey area in between" -- it's actually perfectly possible to have a discrete distribution with distinct values, and yet at the same time, for any two distinct values you pick, always have more values between them ('grey area' in a sense). They don't come up all that often in practice, but it's perfectly possible for them to come up for real; indeed I can think of two distinct (if related) examples that can easily arise. Aug 22, 2013 at 2:30
• so to clarify, even if you had 10 billion rows of ohlc data for a stock asset, it would be still be considered discrete? but then cant the price of an asset be anything between 1 to infinity, how to think in this type of situation? Jan 30, 2018 at 12:35

Data is always discrete. Given a sample of n values on a variable, the maximum number of distinct values the variable can take is equal to n. See this quote

All actual sample spaces are discrete, and all observable random variables have discrete distributions. The continuous distribution is a mathematical construction, suitable for mathematical treatment, but not practically observable. E.J.G. Pitman (1979, p. 1).

Data on a variable are typically assumed to be drawn from a random variable. The random variable is continuous over a range if there is an infinite number of possible values that the variable can take between any two different points in the range. For example, height, weight, and time are typically assumed to be continuous. Of course, any measurement of these variables will be finitely accurate and in some sense discrete.

It is useful to distinguish between ordered (i.e., ordinal), unordered (i.e., nominal),
and binary discrete variables.

Some introductory textbooks confuse a continuous variable with a numeric variable. For example, a score on a computer game is discrete even though it is numeric.

Some introductory textbooks confuse a ratio variable with continuous variables. A count variable is a ratio variable, but it is not continuous.

In actual practice, a variable is often treated as continuous when it can take on a sufficiently large number of different values.

References

• Pitman, E. J. G. 1979. Some basic theory for statistical inference. London: Chapman and Hall. Note: I found the quote in the introduction of Chapter 2 of Murray Aitkin's book Statistical Inference: An Integrated Bayesian/Likelihood Approach
• A probability, too, is a "mathematical construction" and not "directly observable." Does this mean that probability does not exist? Overall, this interesting reply seems based on an untenable premise that data should be characterized by the values they do have rather than by the values a mathematical model allows them to have. The latter is the crucial characteristic, not the former. This all suggests that what matters in the continuous/discrete distinction is how we think about the data (that is, how we model them).
– whuber
Jul 9, 2012 at 12:34
• There's a clever little fable illustrating @whuber's point: Lord (1953), "On the statistical treatment of football numbers", American Psychologist, 8, pp750-51. Jun 18, 2014 at 8:37
• Thank you,@Scortchi. Web versions are available through a Google scholar search. Lord is addressing a misconception, hotly debated 60 years ago, about the extent to which "measurement theory" should influence (or even limit the scope of) statistical analysis. My point was a different one about the distinction between model constructs and observations.
– whuber
Jun 18, 2014 at 13:56

Temperatures are continuous. It can be 23 degrees, 23.1 degrees, 23.100004 degrees.

Sex is discrete. You can only be male or female (in classical thinking anyways). Something you could represent with a whole number like 1, 2, etc

The difference is important as many statistical and data mining algorithms can handle one type but not the other. For example in regular regression, the Y must be continuous. In logistic regression the Y is discrete.

• When you record temperature to the nearest degree, it can be considered discrete--and perhaps has to be so considered for certain forms of analysis. Also, in "regular" (OLS?) regression, $Y$ need not be continuous: many--and practically all its useful properties--apply to many types of discrete data, even binary responses. What these points and counterpoints begin to suggest is that data are not necessarily discrete or continuous, but rather statistical procedures are discrete or continuous.
– whuber
Jul 9, 2012 at 12:38

Discrete Data can only take certain values.

Example: the number of students in a class (you can't have half a student).

Continuous Data is data that can take any value (within a range)

Examples:

• A person's height: could be any value (within the range of human heights), not just certain fixed heights,
• Time in a race: you could even measure it to fractions of a second,
• A dog's weight,
• The length of a leaf,
• The weight of a person,

In the case of database, we would always store the data in discrete even the nature of the data is continuous. Why should I emphasize the nature of data? We should take the distribution of data that could help us to analyze the data. IF the nature of data is continuous, I suggest you to use them by continuous analysis.

Take an example of continuous and discrete: MP3. Even the type of "sound" is analogy, if stored by digital format. We should analyze it always in a analogy way.

• This is very questionable. Different data types exist in a DBMS for their reasons. For a particular DBMS it can be beneficial to store floats as integers to not lose on precision, but it's not generally so: some have exact number format that is arbitrarily precise and you don't have to use conversion (like, /1000) in each query. Oct 21, 2022 at 12:56

On the one hand, from a practical point of view I do agree with Jeromy Anglim's answer. In the end we are most of the time dealing with discrete variables – although from a theoretical point of view they are continuous – and that has a real impact for instance for classification. Recall Strobl's paper indicating that Random Forests is biased towards variables with multiple cutting points (higher accuracy but potentially similar nature). From my personal experience probabilistic neural networks may present also a bias when variables present different accuracy unless they are of the same type (i.e., continuous). On the other hand, from a theoretical point of view the classical classification (e.g., continuous, discrete, nominal etc.) is, IMHO, right. In accordance I think that the source name of Quinlan’s paper describing the M5 algorithm, which is a ‘regressor’, is a great choice. So the definition and the implications of continuous vs. discrete are relevant depending on the ‘environment’.

Refs:

Quinlan J.R. (1992). Learning with continuous classes. In: The 5th Australian Joint Conference on AI. Sydney (Australia), 343–348.

Strobl C., Boulesteix A.-L., Zeileis A., & Hothorn T. (2007). Bias in random forest variable importance measures: illustrations, sources and a solution. BMC Bioinformatics, 8, 25. doi: 10.1186/1471-2105-8-25

Discrete data take particular values, while continuous data are not restricted to separate values.

Discrete data are distinct and there is no grey area in between, while continuous data occupy any value over a continuous data value.

Discrete data They can take particular values .they are numeric.

• Welcome to CV! Thanks for answering, but please take the time to look at previous answers & considering if you're adding anything useful. Feb 4, 2015 at 19:30

Discrete data can take on only integer values whereas continuous data can take on any value. For instance the number of cancer patients treated by a hospital each year is discrete but your weight is continuous. Some data are continuous but measured in a discrete way e.g. your age. It is common to report your age as say, 31.

• Data can be discrete without being restricted to integers. Or numbers, for that matter. It's always possible to represent discrete data with integers, but that doesn't mean the data can only take such values. Jul 23, 2010 at 16:06

Discrete data perticularly talks about the finite values and continuous data talks about ifinite values.....

• Care to elaborate?
– chl
Aug 22, 2013 at 9:07