1.3 Variables and Data

Data are more than just numbers; they are information about a group of individuals organized in variables. The values of the variables are called data. For example, I have the following information: Kate, car, 1, John, bicycle, 2, Mary, public transportation, 5, Adam, walk, 7. It is very hard to interpret this information without context. If I arrange these information in variables, it is easy to understand the data.

Table 1.2: Table of Variables

Name Transportation Number of hours/day on Internet
Kate car 1
John bicycle 2
Mary public transportation 5
Adam walk 7

Given the three variables, i.e., Name, Transportation, and Number of hours/day on Internet, the data tell us that Kate comes to school by car, she spends 1 hour on average per day on surfing internet, while John comes to school by bike and he spends 2 hours a day on average surfing the Internet.

Variable is a characteristic that varies from one individual to another. As shown in the above example, “Name”, “Transportation”, and “Number of hours/day on Internet” are the variables. There are two types of variables: qualitative/categorical and quantitative variable. The quantitative variable can be further classified as either continuous or discrete.

  • Qualitative variable: A non-numerically valued variable that classifies subjects into different categories, such as “Name” and “Sex”. The values of these two variables are not numbers, so they are also called categorical variables. Categorical variable can be further classified as nominal and ordinal.
    • Nominal variable: non-numerical variable that cannot be ordered. For example, “Name” and “Sex” (male or female).
    • Ordinal variable: non-numerical variable than can be sorted. For example, “how often do you drink” (never, seldom, sometimes, often, everyday). Here, values can be sorted by frequency. Another example is “Size” (small, medium, large).
  • Quantitative variable: A numerically valued variable, e.g., “Number of hours/day on Internet” is an example of a quantitative variable. There are two types of quantitative variable—continuous and discrete.
    • Continuous variable: A quantitative variable whose possible values form some interval of numbers, e.g., height, length, salary, age. Technically speaking, continuous variables have arbitrary number of decimal places.
    • Discrete variable: A quantitative variable whose possible values can be listed, e.g., number of siblings, number of phone calls within an hour.

Exercise: Data Types

Classify the following variables as qualitative/categorical nominal, qualitative/categorical ordinal, quantitative continuous, or quantitative discrete.

  1. Gender
  2. Height
  3. Heart rate (beats/minute)
  4. Number of siblings
  5. Weight
  6. Shoe size
  7. Length of your left foot
  8. Salary
  9. Percentage of female students at MacEwan
  10. Clothing size
Show/Hide Answer
  1.  Either female, male, or other sex orientation; it is non-numerical, thus categorical variable. Values cannot be ordered, it is qualitative/categorical nominal.
  2. Measurement in length, quantitative continuous variable
  3.  Beats can be listed, it is quantitative discrete variable
  4. Non-negative integers, quantitative discrete variable
  5. Quantitative continuous variable
  6. All possible values can be listed, quantitative discrete variable
  7. Quantitative continuous variable
  8. In any currency, technically speaking, all possible values can be listed, should be quantitative discrete. For the sake of convenience, however, it is treated as quantitative continuous in practice.
  9. [latex]\text{Percentage}=\frac{\text{number of females}}{\text{total number of students}} \times 100\%[/latex], all possible values of both of numerator and denominator can be listed, technically speaking, should be quantitative discrete. For the sake of convenience, however, it is treated as quantitative continuous in practice.
  10. The values are XS, S, M, L, XL which can be ordered; therefore, it is qualitative/categorical ordinal.

License

Icon for the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License

Introduction to Applied Statistics Copyright © 2024 by Wanhua Su is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License, except where otherwise noted.