130 Fundamentals of Statistics
Continuous variables, on the other hand, have values from a wide range of
possible values. An individual’s weight could be 185, 185.5, or 185.5627
pounds. To be sure, there is some blurring in the distinction between dis-
crete and continuous variables. Is salary a discrete variable or a continu-
ous variable? From one point of view, it’s discrete: The values are limited
to dollars and cents, and there is a practical upper limit to how high a
specifi c salary could go. However, it’s more natural to think of salary as
continuous.
The second type of variable is the qualitative variable. Qualitative or
categorical variables are variables whose values fall into some category,
indicating a quality or property of an object. Gender, ethnicity, and prod-
uct name are all examples of qualitative variables. Qualitative variables are
generally expressed in text strings, but not always. Sometimes a qualita-
tive variable will be coded using numerical values. A common “gotcha”
for people new to statistics is to analyze these coded values as quantitative
variables. Consider the qualitative data values from Table 4-1.
Table 4-1 Qualitative Variables
ID Gender (0 = male; Ethnicity (0 = Caucasian, 1 = African
1 = female) American; 2 = Asian; 3 = Other)
3458924065 1 0
4891029494 0 3
3489109294 0 1
Now all of these values were entered as numbers, but does it make sense
to say that the average gender is 1? Or that the sum of the ethnicities is 4?
Of course not, but if you’re not careful, you may fi nd yourself doing things
like that in other, more subtle cases. The point is that you should always un-
derstand what type of variables your data set contains before applying any
descriptive statistic.
Qualitative variables can be classified as ordinal and nominal. An
ordinal variable is a qualitative variable whose categories can be put into
some natural order. For example, users asked to fi ll out a survey ranking
their product satisfaction may enter values from “Not satisfi ed” all the way
up to “Extremely satisfi ed.” These values are categorical values, but they
have a clear order of ascendancy. Nominal variables are qualitative vari-
ables without any such natural order. Ethnicity, state of residence, and gen-
der are all examples of nominal variables. Table 4-2 summarizes properties
of the different types of variables we’ve been discussing.