Continuous and Discrete Variables: Theory and Practice

First we must be sure that we understand the difference between continuous and discrete variables. There are many variables in nature that seem to be continuous -- one value of the variable flows into the next. Between any two values of a continuous variable there are an infinite number of other possible values. When you learned about real number theory in high school (or before) you were introduced to the idea of numbers that vary continuously; these numbers can be used to represent any continuous variable. Examples of biologically meaningful continuous variables are mass, linear dimensions, metabolism, cost (at least when expressed as energy) and time. (Time is especially interesting since there is often popular discussion about the differences between round time (analog or continuous time as taken from dial watch or clock) and digital time -- time that is marked by jumps from one metric of it to the next). Continuous variables can be represented by functions where variables in the function are themselves continuous. Thus, if we say that display costs (x) are a function of time(t) and if we decide to treat all the variables as a continuous variable, then cost is also continuous.

By contrast, there are also variables that are clearly discrete or distinct from each other. A popular term for these is "digital" with the idea being that these variables do not intergrade into each other. We represent variables of this type with discrete names (e.g., in chordates individuals are female or male -- we there are not some infinite number of intersexes or the states of a coin after a flip (either heads or tails) or as discrete numbers with no possibility of values between two others (individuals have an exact, not fractional number of progeny -- they have 1 or 2, not 2.73187 ). We can also represent discrete variables with functions -- the difference is that the variables in the function must themselves be discrete. So, using the example of cost (x) and time(t) we can write a discrete function for cost provided that we understand that all of the variables are to be described discretely.

Now, one final point. We often convert continuous variables into discrete ones. We do this by dividing up the continuous variable into ranges of values. We then assign the same discrete value to all values of the continuous variable that fall within a certain range. For instance, a digital weight scale will assign all weights (a continuous variable) between 120.6 and 121.5 pounds to the value "121". In fact, it is common for us to "digitize" continuous variables and represent these discretely. In science we do this partially out of convenience (we reduce the number of different states of a variable by lumping them and we can do many types of calculations more easily with discrete values) and in of a recognition of our limited ability to measuring things accurately.

OK, now that you have the idea about the difference between a discrete and continuous variable, let's see how they are used in science. There are many cases where we have strong theoretical reasons to believe that a variable is continuous. Display times are an excellent example. In theory, an animal should be able to stop a display at any time. Thus, we have good reasons to believe that display time should be treated as a continuous variable. But in practice things are not so easy.

Here's an example using acoustic displays of crickets (my research): I might need to know how long a cricket sang. Was it 3.1 or 3.0 s.? -- it might be hard to tell-- not only are my senses and instruments limited but sometimes it is hard to define exactly when an animal stop making sound. When a cricket stops moving its stridulatory apparatus, its wing membranes continue to vibrate for some time and so the sound gradually fades out. In addition, reverberations are common in most listening situations and they can confuse as to when the primary (vs. reflected) sound stopped. And finally, there is the question of how loud a sound must be before I count it as sound!

So how does it work in the real world? The tendency is to either or both:

In fact this type of "digitization" of theoretically continuous variables is the rule, not the exception in science. So, expect to see continuous theoretical distributions (when appropriate) and likewise expect to see data presented in a discrete format.

Note: this is essentially the way much in the "digital age works" -- digital pictures (such as those seen on the world wide web) involve converting near continuous differences in wavelength into discrete values; the same thing happens with digital audio (such as a CD) where frequency and intensity, both continuous variables are approximated as discrete values. By contrast, the information on an analog cassette tape is continuous! (OK -- at some level even that might not be true but relative to normal digital representations, it is continuous.)

Further Note: You will have a chance to investigate the effects of "digitizing" continuous variables when you run the war of attrition simulation.


Back to the top of this page


 Copyright © 1999 by Kenneth N. Prestwich
College of the Holy Cross, Worcester, MA USA 01610

About Fair Use of these materials

Last modified 1- 29 - 99