Skip to main content
Chemistry LibreTexts

Part I: Ways to Describe Data

  • Page ID
    81495
  • Investigation 1.

    Of the variables included in Table 1, some are categorical and some are numerical. Define these terms and assign each of the variables in Table 1 to one of these terms.

    A categorical variable provides qualitative information that we can use to describe the samples relative to each other, or that we can use to place the samples into groups. For the data in Table 1, “bag id,” “type,” and “rank” are categorical variables.

    A numerical variable provides quantitative information on which we can perform a meaningful calculation; for example, we can use “# yellow M&Ms” and “total M&Ms” to calculate the new variable “% yellow M&Ms.” For the data in Table 1, “year,” “weight (oz),” “# yellow M&Ms,” “% red M&Ms,” and “total M&Ms” are numerical variables.

    Some students will include “year” as a categorical variable, which is not an unreasonable choice as it might serve as a useful way to group samples; however, it is listed here as a numerical variable because it can serve as a useful predictive variable in a regression analysis. Some students will include “rank” as a numerical variable, essentially rewriting the entries as numerals; however, there are no meaningful calculations that we can complete using this variable.

    Investigation 2.

    Suppose we decide to code the type of M&M using 1 for plain and 2 for peanut. Does this change your answer to Investigation 1? Why or why not?

    No. Although it is tempting to assume that a number must imply a numerical variable, we need to remember that we can convert any descriptive phrase into a number even if the number does not convey quantitative information. For example, although we might choose to code samples of plain M&Ms using the integer 1 and code samples of peanut M&Ms using the integer 2, we would never report that the average sample is of type {(4)(2) + (2)(2)}/6 = 1.33 as this does not have any meaningful interpretation.

    Not all students are familiar with databases or with coding, and may ask why we might choose to code a variable if replacing a descriptive phrase with an integer provides us with no advantage and if it comes at the cost of making it more difficult for others to read our table. When this question arises, it is helpful to note that there are several reasons we might choose to replace a descriptive phrase with an integer when creating a computerized database, particularly if the database has many records: storage space (it takes less space to store an integer than it does to store a character string); search speed (it takes less time to search for an integer than it does to search for a character string); and fewer errors when entering data (consider how easy it is to type penut for peanut).

    Investigation 3.

    Categorical variables are described as nominal or ordinal. Define the terms nominal and ordinal and assign each of the categorical variables in Table 1 to one of these terms.

    A nominal categorical variable does not carry with it any implied order; an ordinal categorical variable, on the other hand, coveys a meaningful sense of order. For the categorical variables in Table 1, “bag id” and “type” are nominal variables, and “rank” is an ordinal variable.

    Some students may interpret the use of consecutive alphabetical letters for “bag id” as implying order, but there is nothing to suggest that this order is meaningful.

    Investigation 4.

    A numerical variable is described as either ratio or interval depending on whether it has (ratio) or does not have (interval) an absolute reference. Explain what it means for a variable to have an absolute reference and assign each of the numerical variables in Table 1 as either a ratio variable or an interval variable. Why might this difference be important?

    A numerical variable has an absolute reference if it has a meaningful zero—that is, a zero that means a measured quantity of none—against which we reference all other measurements of that variable. For the numerical variables in Table 1, “year” is an interval variable because our scale for time is referenced to an arbitrary point in time, 1 CE, and not to the beginning of time; “weight (oz),” “# yellow M&Ms,” “% red M&Ms,” and “total M&Ms” are ratio variables because each has a meaningful zero.

    For a ratio variable, we can make meaningful absolute and relative comparisons between two results, but only meaningful absolute comparisons for an interval variable. For example, consider sample e, which was collected in 1994 and which has 331 M&Ms, and sample d, which was collected in 2000 and which has 24 M&Ms. We can report a meaningful absolute comparison for both variables: sample e is six years older than sample d and sample e has 307 more M&Ms than sample d. We also can report a meaningful relative comparison for the total number of M&Ms—there are 331 ÷ 24 = 13.8 times as many M&Ms in sample e as in sample d—but we cannot report a meaningful relative comparison for year because a sample collected in 2000 is not 2000 ÷ 1994 = 1.003 times older than a sample collected in 1994.

    Investigation 5.

    Numerical variables also are described as discrete or continuous. Define the terms discrete and continuous and assign each of the numerical variables in Table 1 to one of these terms.

    A numerical variable is discrete if it can take on only specific values—typically, but not always, an integer value—between its limits; a continuous variable can take on any possible value within its limits. For the numerical data in Table 1, “year,” “# yellow M&Ms,” and “total M&Ms” are discrete in that each is limited to integer values. The numerical variables “weight (oz)” and “% red M&Ms,” on the other hand, are continuous variables.

    Students will sometime ask why weight is not a discrete variable given that a balance records the weight to a set number of decimal points. Here it is helpful to remind students that what makes a variable discrete is not our ability to measure it, but a property inherent in the variable itself. In the context of this data, each M&M is an indivisible unit and the number of units is discrete; however, two M&Ms with masses of 0.8561 g and 0.8559 g have different weights even if our balance reads, and we report, both as 0.856 g.

    • Was this article helpful?