# Part I: Ways to Describe Data

- Page ID
- 81495

\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

\( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

\( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

\( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

\( \newcommand{\Span}{\mathrm{span}}\)

\( \newcommand{\id}{\mathrm{id}}\)

\( \newcommand{\Span}{\mathrm{span}}\)

\( \newcommand{\kernel}{\mathrm{null}\,}\)

\( \newcommand{\range}{\mathrm{range}\,}\)

\( \newcommand{\RealPart}{\mathrm{Re}}\)

\( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

\( \newcommand{\Argument}{\mathrm{Arg}}\)

\( \newcommand{\norm}[1]{\| #1 \|}\)

\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

\( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

\( \newcommand{\vectorA}[1]{\vec{#1}} % arrow\)

\( \newcommand{\vectorAt}[1]{\vec{\text{#1}}} % arrow\)

\( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

\( \newcommand{\vectorC}[1]{\textbf{#1}} \)

\( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

\( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

\( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

\(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)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.*

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).*

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. *

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.

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. *