1.5: Variables
- Page ID
- 61507
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\( \newcommand{\dsum}{\displaystyle\sum\limits} \)
\( \newcommand{\dint}{\displaystyle\int\limits} \)
\( \newcommand{\dlim}{\displaystyle\lim\limits} \)
\( \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{\longvect}{\overrightarrow}\)
\( \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}\)- Define and distinguish between qualitative and quantitative variables
- Define and distinguish between discrete and continuous variables
Introduction to Variables
Recall that variables are properties or characteristics of some event, object, or person that can take on different values. Just as there are different types of characteristics, there are different types of variables. Some types of variables can be used in math calculations, while others cannot, so it is important to understand what kind of variables we are working with.
Qualitative and Quantitative Variables
At the most basic level, variables describe either qualities or quantities. Qualitative variables describe qualities or characteristics, such as hair color, eye color, religion, favorite movie, or gender. Quantitative variables describe amounts of measurements, such as height, weight, age, shoe size, or temperature.
It may seem like any variable that uses numbers is quantitative, but this is not always true. For example, race placement \(\{1^{st},2^{nd},3^{rd},...\}.\) uses numbers, but it is not quantitative. The numbers only show order, not how much better or worse one placement is than another. Subtracting the numbers does not give us useful information because the order already tells us the ranking. For this reason, race placement is a qualitative variable.
Race finish time, however, is a quantitative variable. The difference between two times tells us exactly how much faster or slower one racer was compared to another. When deciding whether a variable is qualitative or quantitative, think about whether the differences between the values are meaningful and give useful information.
- Most high schools and colleges group students as freshmen, sophomores, juniors, or seniors. Is class rank a qualitative or quantitative variable? Explain why.
- Answer
-
Class rank is a qualitative variable. Even thought it is often labeled with numbers like \(9,\) \(10,\) \(11,\) and \(12\) and has a clear order, the numbers do not give meaningful measurement information. There is no useful math difference between the values, so class rank is not quantitative.
- Credit card companies typically assign a \(16\) digit number to each customer to keep transactions secure. Is a credit card number a qualitative or quantitative variable? Explain why.
- Answer
-
A credit card number is a qualitative variable. Even though it uses numbers, the math difference between two credit card numbers does not mean anything. The number does not show information like the account balance, credit limit, or how long the account has existed. The numbers are only used to identify an account, not to measure anything, so this variable is qualitative.
- We keep track of time using the month, day, and year. Is the date a qualitative or quantitative variable? Explain why.
- Answer
-
A date is a quantitative variable. At first glance, values like September \(20\), \(2019\) and October \(25\), \(2021\) look like they cannot be subtracted. But, we can count how many days lie between these two values (\(766\) days), meaning the gap between the two values carries significant meaning.
Discrete and Continuous Variables
Quantitative variables can be further divided into different categories based on what kind of values they take on. Since they are quantitative, we know that their values are numbers, but there is more we can learn about them.
For example, think about the number of people who attend a FHSU football game. The number changes from game to game, but the possible values are whole numbers like \(0,\) \(1,\) \(2,\) \(3,\) \(4,\) \(5,\) \(6,\) \(7,\) \(\ldots,\) \(6362\), which is the seating limit at Lewis Field. You cannot have part of a person at a game.
Now think about how long a football game lasts. Let this time be called the variable \(t.\) A game must have four quarters, each at least \(15\) minutes long, plus a halftime break of at least \(20\) minutes. When we also consider timeouts, injuries, reviews, overtime, and delays, the total game time can vary quite a bit. The game could last \(83\) minutes, \(92.5\) minutes, or even \(102.1340294478\) minutes. In fact, the time could be any number of minutes that is \(80\) or more. We can describe these values as an interval, written as (\(\{t\ge80\}\) or \([80,\infty)\)).
Unlike time, attendance cannot take on any value in an interval. You cannot have \(7.5\) people at a game. Between any two possible attendance numbers, there are values that are not allowed. This is the key difference between discrete and continuous variables.
A quantitative variable is continuous if it can take on any numerical value within some interval of real numbers. A quantitative variable is discrete if it cannot do this. A common way to describe discrete variables is to say that they have gaps between their possible values.
- Consider the amount of U.S. currency stored in bank accounts. Classify this variable as a qualitative or quantitative variable. If quantitative, then classify the variable as discrete or continuous. Explain your reasoning.
- Answer
-
The amount of money stored in bank accounts is quantitative because the differences between account balances indicate how much more or less one account has compared to another. The smallest unit of U.S. currency is the penny \((\$0.01).\) This implies that there must be a gap between all possible values. For example, you cannot have \(\$5.7365)\ in a bank account. Becuase the values are numbers with gaps between them, this variable is a discrete quantitative variable.
- Consider the floors on an eighteen-story apartment building labeled in order \(\{1^{st},\) \(2^{nd},\) \(3^{rd},\) \(\ldots,\) \(18^{th}\}.\) Classify this variable as a qualitative or quantitative variable. If quantitative, then classify the variable as discrete or continuous. Explain your reasoning.
- Answer
-
Subtracting one floor number from another does not give any new or useful information beyond the order. Because of this, floor number is a qualitative variable. Since it is not quantitative, it is not classified as discrete or continuous.
- Consider the number of floors in apartment buildings. Classify this variable as a qualitative or quantitative variable. If quantitative, then classify the variable as discrete or continuous. Explain your reasoning.
- Answer
-
The values that this variable can take on are \(\{1,\) \(2,\) \(3,\) \(4,\) \(\dots\}.\) The difference between two values tells us how many more floors one building has than another, which is meaningful. This makes it a quantitative variable. Because the number of floors are counted using whole numbers and there are gaps between values, it is a discrete variable.
- Consider the heights of adult females. Classify this variable as a qualitative or quantitative variable. If quantitative, then classify the variable as discrete or continuous. Explain your reasoning.
- Answer
-
Height is a quantitative variable because we can subtract one height from another to see how much taller or shorter someone is. Height can take on any value within a range such as \(64\) inches, \(64.5\) inches, or \(64.25\) inches. Because there are no gaps between possible values, height is a continuous value.
The difference between discrete and continuous variables depends on the kinds of values a variable can have, not on how precisely we measure it. Sometimes, the values a variable could have are different from what we are able to measure in real life.
If we classified variables based on how we measure them, then every variable would seem discrete. For example, we could measure height with more and more accuracy. In theory, a person's height could be \(72.65787652998736\) inches, even though we would almost never measure it that precisely.
This is different from counting people. No matter how carefully we count, it is impossible to have \(800.78\) or \(110.2\) people. The number of people can only be whole numbers.
Because of this, the key difference between discrete and continuous variables is based on the values that are theoretically possible, not on what we usually measure in practice. Since our measurements are always limited, it is important to remember that statistics is meant to help us understand the real world as accurately as possible.

