1. Cases and variables: categorical and quantitative
Warm-up
Three quick questions from earlier lessons.
Discover
A spreadsheet has one row per student and columns for age, favorite color and number of pets. Which column holds categorical data?
- Favorite color
- Number of pets
Key idea
Data are values of variables recorded on cases.
Worked example
A café records each order: drink size (S, M, L), price in dollars, and table number.
Your turn, guided
Your turn: how many quantitative variables among height, jersey number, goals scored?
Practice ★
- A survey of 23 students records the following. Tick all the categorical variables.
- Eye color
- ZIP code
- Takes the bus to school (yes/no)
- Height in cm
- Number of siblings
- A survey of 80 students records the following. Tick all the categorical variables.
- Eye color
- ZIP code
- Takes the bus to school (yes/no)
- Height in cm
- Number of siblings
Watch out!
Practice ★★
- Area codes such as 770 are numbers. Is the area code of a phone number a quantitative variable?
- No: it is categorical, a label that only looks like a number
- Yes: its values are numbers
- Yes, a discrete quantitative variable
- A study measures the resting heart rate of 29 runners. What are the cases (observational units)?
- The 29 runners
- The heart rates
- The number 29
Exit ticket
Three questions to check you have got it.
- A survey of 23 students records the following. Tick all the categorical variables.
- Eye color
- ZIP code
- Takes the bus to school (yes/no)
- Height in cm
- Number of siblings
- A survey of 80 students records the following. Tick all the categorical variables.
- Eye color
- ZIP code
- Takes the bus to school (yes/no)
- Height in cm
- Number of siblings
- A survey of 54 students records the following. Tick all the categorical variables.
- Eye color
- ZIP code
- Takes the bus to school (yes/no)
- Height in cm
- Number of siblings
Summary card
Variables
- Cases: who or what. Variables: what is recorded.
- Categorical: groups. Quantitative: meaningful numbers.
Watch out: numeric codes (ZIP, ID) are categorical.