Session 7 · Day 2
Some cases use invented numbers. The slide says so.
You download your Spotify data. The streaming history opens as a table:
| endTime | artistName | trackName | msPlayed |
|---|---|---|---|
| 2026-03-14 22:41 | Charli xcx | 360 | 133000 |
| 2026-03-14 22:44 | Charli xcx | Apple | 151000 |
| 2026-03-15 07:12 | Doechii | Anxiety | 41000 |
What is one observation in this table?
msPlayedB. One stream: one play of a track at one time.
Each row is one observation. Here a row records one play. The same artist and the same track can appear in many rows. msPlayed is a variable, a column. Ask first: What does one row mean?
A food delivery app exports your orders:
| postcode | price_chf | minutes |
|---|---|---|
| 8001 | 24.50 | 28 |
| 3012 | 18.90 | 35 |
| 4051 | 31.00 | 22 |
Which variable is categorical, although it contains numbers?
price_chfminutespostcodeInvented numbers.
C. postcode.
A postcode is a label for a place. 8001 is Zürich, 3012 is Bern, 4051 is Basel. The mean of these three postcodes means nothing. Ask: Does arithmetic on these values mean anything? If not, treat the variable as categorical.
IMS 1.2.2 · Cheat sheet: categorical variables
You filter an online shop by size: XS, S, M, L, XL.
What type of variable is size?
D. Categorical, ordinal.
The sizes are categories with a natural order: XS < S < M < L < XL. You cannot compute “M minus S”. The steps between sizes are not equal distances. A colour filter (black, white, green) would be nominal: it has no order.
IMS 1.2.2 · Cheat sheet: nominal vs. ordinal
Your class fills in a survey. A scatterplot shows daily screen time on the x-axis and hours of sleep on the y-axis. Students with more screen time tend to report less sleep.
Which term describes this pattern?
Invented survey.
B. Negative association.
As one variable increases, the other tends to decrease. More screen time goes with less sleep. “Tends to” matters: some students have a lot of screen time and still sleep well. The association is not perfect.
IMS 1.2.3 · Cheat sheet: negative association
A student newspaper prints the same scatterplot under the headline:
“Phones ruin your sleep!”
What is the best response?
B. Too strong. The plot shows an association, not a cause.
Other variables can be involved. Exam stress can cause both more scrolling at night and less sleep. A side job with late shifts can do the same. To show a cause, you need a suitable study design, typically an experiment.
IMS 1.2.3 · Cheat sheet: relationships between variables
Your Spanish teacher asks:
Do students with a longer Duolingo streak get a higher score in the final exam?
Which variable is the response variable?
B. The exam score.
The question asks if the streak can explain or predict the score. The streak is the explanatory variable. The exam score is the response variable. The student is not a variable: each student is one observation.
IMS 1.2.4 · Cheat sheet: explanatory and response variables
You post a poll in your Instagram story: “Should the canteen serve more vegan dishes?” 300 followers vote. 78% vote yes.
You want to know what all students at your school think. Which statement is correct?
Invented numbers.
B. The 300 voters are a sample. All students at the school are the population.
The population is the group that the conclusion is about. The sample is the group that was actually measured. Also: your followers are not a random choice of students. People who care about vegan food are more likely to vote. Ask: Who was measured, and who is the conclusion about?
IMS 2.1.1 · Cheat sheet: population and sample
A popular app has 4.8 stars from 2 million ratings in the app store.
What does this number tell you?
Invented numbers.
B. It describes users who chose to rate. They are a self-selected sample.
A census measures every case in the population. Most users never rate an app. Users who uninstalled it early often never rate it either. A large sample does not fix a selection problem. It only makes the biased result look precise.
IMS 2.1.1 · Cheat sheet: census
Two study programmes report which phone their students use:
| Programme | iPhone | Android | Total |
|---|---|---|---|
| Design | 30 | 10 | 40 |
| Engineering | 60 | 60 | 120 |
Which statement is correct?
Invented numbers.
B. Design has the higher share of iPhone users: 75% against 50%.
Engineering has more iPhone users, 60 against 30. But it also has three times as many students. Divide each row by its own total: 30 / 40 = 75% and 60 / 120 = 50%. When the group sizes differ, compare proportions, not only counts.
IMS 4.1 · Cheat sheet: contingency table
Your class votes for a favourite streaming service: Netflix 26, Disney+ 22, Prime Video 21. A bar chart shows the result. Its y-axis starts at 20. The Netflix bar looks six times as long as the Prime Video bar.
What is the problem?
Invented numbers.
C. The axis does not start at zero, so the bar lengths exaggerate the difference.
In a bar plot, readers compare the length of the bars. From an axis at 20, the bars are 6, 2, and 1 long. From zero, they are 26, 22, and 21 long. The real difference is small. A histogram is wrong here: the variable is categorical.
IMS 4.1 · Cheat sheet: good bar-chart practice
A running club exports data from Strava. A scatterplot shows kilometres per week (x) and 10 km race time in minutes (y). The points fall close to a straight line that goes down. One runner sits far above the line: 60 km per week, but 70 minutes.
Which description is correct?
Invented data.
B. Negative, roughly linear, fairly strong, one unusual observation.
Read a scatterplot with four questions: direction, form, strength, and unusual observations. Do not silently delete the slow runner. The point can be an injury, a trail race, or an entry error. Investigate it. A plot alone shows an association, not proof.
Five friends compare their daily TikTok time in hours:
1, 2, 2, 3, 12
What is the mean?
Invented numbers.
C. 4 hours.
Add the values and divide by the number of observations: (1 + 2 + 2 + 3 + 12) / 5 = 20 / 5 = 4. Four of the five friends are below the mean. One heavy user pulls the mean up. The median, 2 hours, describes the typical friend better.
IMS 5.2 · Cheat sheet: mean
Your class makes a histogram of Instagram follower counts. Most students have between 100 and 800 followers. Three students have more than 20,000. The bars on the left are tall. A long, thin tail goes to the right.
What shape does the distribution have?
Invented data.
C. Right-skewed.
Name the skew from the tail, not from the peak. The long tail points to the higher values, so the distribution is right-skewed. Option A is the most common trap. In a right-skewed distribution, the mean is pulled into the tail and lies above the median.
IMS 5.3 · Cheat sheet: shape: symmetric vs. skewed
A box plot shows the delivery times of a food delivery app in minutes:
| Q1 | Median | Q3 |
|---|---|---|
| 20 | 25 | 35 |
About what share of the deliveries took between 20 and 35 minutes?
Invented numbers.
B. 50%.
The box runs from Q1 to Q3. About 25% of the observations lie below Q1 and about 25% lie above Q3. The box holds the middle 50%. Its width is the interquartile range: IQR = 35 − 20 = 15 minutes.
The quiz uses formal language: observations, variables, samples, and distributions.
Before we can analyze observations and variables, someone must decide what counts as an observation and a variable.
All Data Are Local · Session 7