Week 4 — Lecture Outline · Relationships Between Two Variables
Course: Introduction to Statistics (18-week generic edition)
Objectives covered: Objective 3 — Describe and interpret relationships between two variables using scatterplots, correlation, and two-way tables.
SLOs touched: A (reason quantitatively from data) · B (communicate results to a non-technical audience)
Meeting pattern: planned as 2 sessions × ~75 min = ~150 min. Segment minutes below total ~150; scale them to your own pattern.
Week at a Glance
| The week's big question | "When one thing moves, does the other move too — and how do we measure that link without getting fooled into calling it a cause?" |
| By the end of the week, students can… | (1) read a scatterplot — name the explanatory and response variables and describe direction, form, and strength (plus outliers); (2) interpret the correlation coefficient r and state its rules (−1 to +1, unitless, straight-line only, outlier-sensitive); (3) build and read a two-way table — compute marginal and conditional distributions and use conditionals to spot an association; (4) explain why association is not causation, naming a plausible lurking variable. |
| Key vocabulary | explanatory variable, response variable, scatterplot, direction (positive/negative), form (linear/curved/clusters), strength, outlier, correlation coefficient r, two-way table, cell/joint count, marginal distribution, conditional distribution, association, lurking variable, confounding variable |
| Materials | slides (Deck 4), the Week 4 chapter, the week's readings + video links, a spreadsheet (Google Sheets or Excel), the student's chatbot for the AI-critique moment and the tutorial |
| Timing note | 8 segments, ~150 min total. Session 1 = Segments 1–4 (~75). Session 2 = Segments 5–8 (~75). |
Segment 1 — Hook & the Promise (8 min) · Session 1 opens
Hook. "Look at the person next to you. If I lined this whole room up by height, could I roughly predict everyone's shoe size? Not perfectly — but better than guessing?" Let them react. Almost everyone says yes. That instinct — taller people, bigger shoes, usually — is a statistical relationship, and today we learn to measure it.
- Weeks 1–3 were about one column of data at a time: where it came from, what its picture looks like, its center and spread. Real questions are almost always about two columns at once: does one thing move with another?
- "Does a car's age move with its price? Does screen time move with sleep? Does the temperature move with what a food stand sells? Every one of those is this week."
The promise (write it on the board): "By the end of this week you can take any claimed link between two things — a scatterplot, a correlation, a table, a headline — and answer three questions: What does the relationship look like? How strong is it? And does it actually mean one thing causes the other?" (Spoiler on the third: usually not.)
Why it matters line (memory hook): "One variable describes. Two variables tempt you — into predictions and into causes. This week is about which temptations to trust."
Segment 2 — The Scatterplot: Two Columns Become a Picture (20 min)
Plain language first.
- When both variables are quantitative, the picture is a scatterplot: one dot per individual. Each dot carries that individual's two values — across for one variable, up for the other.
- Before plotting, decide the roles: the explanatory variable (the one we think explains or predicts — it goes on the x-axis) and the response variable (the outcome we care about — it goes on the y-axis). Ask: "which one would I use to predict the other?" If neither direction is obvious, either axis works — but say so.
Memory hook: "x explains, y responds."
How to read any scatterplot — four questions, in order (put on a slide):
1. Direction — uphill (positive: both rise together) or downhill (negative: one rises, the other falls)?
2. Form — roughly a straight line? a curve? separate clusters?
3. Strength — dots hugging the pattern tightly, or a loose spray?
4. Outliers — any dot far from the crowd or off the pattern?
Memory hook: "Direction, Form, Strength — then check for Stragglers."
One fully worked example (draw it or project it — walk every step).
A hot-cocoa stand records, for five days, the day's high temperature (°F) and the cups of cocoa sold:
Day's high (°F) 40 50 60 70 80 Cups sold 42 40 26 28 14
- Roles: temperature is explanatory (x) — we'd use the forecast to predict sales; cups sold is the response (y).
- Plot the five dots: (40, 42), (50, 40), (60, 26), (70, 28), (80, 14).
- Direction: downhill — warmer days, fewer cups → negative.
- Form: roughly a straight line (no curve, no clusters — note the small wiggle at 60 vs 70: real data wobbles).
- Strength: the dots stay close to a line → strong.
- Outliers: none — no dot sits far from the pattern.
- One-sentence read (make them say it in words): "There is a strong, negative, roughly linear relationship: colder days go with more cups of cocoa sold."
Land the key idea: a scatterplot description is a sentence, not a number — direction + form + strength (+ outliers), in context.
Segment 3 — Correlation r: The Whole Cloud in One Number (25 min)
Plain language first. "Strong" and "fairly tight" are eyeball words. Statisticians compress the direction and strength of a straight-line relationship into one number: the correlation coefficient r.
- r is always between −1 and +1.
- The sign gives the direction: positive r = uphill, negative r = downhill.
- The size (distance from 0) gives the strength: near ±1 = dots near a line; near 0 = no straight-line pattern.
Memory hook: "Sign = direction. Size = strength."
The course's rough strength ladder (a guide, not a law):
- |r| = 1 → perfect straight line (every dot exactly on it — almost never seen in real data)
- |r| ≈ 0.7 to 0.99 → strong
- |r| ≈ 0.3 to 0.7 → moderate
- |r| below ≈ 0.3 → weak to none
Worked example (continue the cocoa stand — same numbers).
We don't compute r by hand in this course — technology does it (that's the Segment 7 workflow). For the five cocoa days,
=CORREL(temperature range, cups range)returns r = −0.94.
- Negative sign ✓ matches the downhill direction we saw.
- 0.94 is close to 1 → strong — matches the tight cloud.
- Say it in words (always): "r = −0.94: a strong negative linear relationship between temperature and cocoa sales."
- Sanity habit: r must agree with your eyes. If the plot looks like a loose spray and the software says r = −0.94, something's wrong — usually a data-entry or range-selection error.
The rules of r (list them now, trap them in Segment 4):
1. r only applies to two quantitative variables (no r for species or ticket type).
2. r has no units — not degrees, not cups. Changing units (°F to °C, cups to liters) does not change r.
3. Swapping x and y does not change r.
4. r measures straight-line association only — a strong curve can hide behind r ≈ 0.
5. r is not resistant — a single outlier can inflate or wreck it (callback: Week 3's resistant-vs-not idea, same story here).
Segment 4 — Misconceptions + Quick Interaction (22 min) · Session 1 closes (~75)
Name the misconceptions out loud, then cure each:
- ❌ "r ≈ 0 means the variables are unrelated."
✅ Cure: r ≈ 0 means no straight-line relationship. A perfect arch (rises then falls) can give r ≈ 0 while the two variables are tightly related. Always look at the plot first; r second. - ❌ "r = −0.9 is weaker than r = +0.5 because it's negative."
✅ Cure: strength is the distance from 0, not the sign. −0.9 is much stronger than +0.5; the minus sign only says "downhill." - ❌ "A bigger r means a bigger effect — r is like a slope or a percent."
✅ Cure: r has no units and is not a rate. r = −0.94 does not mean "sales drop 94%," and it doesn't say how many cups per degree. It only says how tightly the dots follow a line, downhill. - ❌ "Strong correlation means one variable causes the other."
✅ Cure: the Week 1 line returns — correlation is a handshake, not a push. Segment 6 is entirely about this.
Interaction — Think-Pair-Share (match r to the picture, ~12 min):
Put five candidate values on a slide — r = −0.9, −0.5, 0, +0.5, +0.9 — then read six scatterplot descriptions; students vote (solo 30 sec, pair 1 min, fingers vote) for the best r:
1. A tight downhill line → −0.9
2. A clear uphill trend, but a loose cloud → +0.5
3. A shapeless blob, no trend → 0
4. A tight uphill line → +0.9
5. Downhill, but widely scattered → −0.5
6. A strong, clean arch — rises then falls → 0 (the trap — strong pattern, but not a line)
Debrief item 6 hard: that's the misconception cured live.
Segment 5 — Two-Way Tables: When Both Variables Are Categories (25 min) · Session 2 opens
Hook back in: "Scatterplots need numbers on both axes. But what if both variables are categories — species and island, ticket type and yes/no? You can't plot 'Chinstrap' on an axis. You count instead."
Plain language first.
- A two-way table counts individuals by two categorical variables at once: one variable's categories label the rows, the other's label the columns. Each cell holds a joint count; the row and column totals in the margins each add back to the grand total.
- A marginal distribution answers: "forgetting the other variable, how does this one split up?" — read it off a margin, as percents of the grand total.
- A conditional distribution answers: "among ONE group only, how does the other variable split up?" — percents of that row (or column) total.
Memory hook: "Marginal = from the margins, out of everyone. Conditional = inside one group, out of that group." The denominator tells you which one you're looking at.
One fully worked example (do every division out loud).
A city aquarium surveys 200 exiting visitors: was this a first visit or a return visit, and did they buy a membership on the way out?
Bought membership No membership Total First-time visitor 30 90 120 Returning visitor 40 40 80 Total 70 130 200
- Check the margins: 120 + 80 = 200 ✓ and 70 + 130 = 200 ✓.
- Marginal distribution of membership: 70 ÷ 200 = 0.35 → 35% bought; 130 ÷ 200 = 65% didn't. (Out of everyone.)
- Conditional on first-timers: 30 ÷ 120 = 0.25 → 25% bought. (Out of first-timers only — denominator 120.)
- Conditional on returners: 40 ÷ 80 = 0.50 → 50% bought. (Denominator 80.)
- The payoff: 25% vs. 50%. The conditional distributions differ, so visit type and membership purchase are associated — returning visitors buy memberships at twice the rate. If the conditionals had been (about) equal, we'd say no association.
Land the key idea: to check association between two categorical variables, compare the conditional distributions across groups. And the classic error to pre-empt: answering "what percent of returning visitors bought?" with 40/200 (that's a joint percent) or 40/70 (that's conditioning on the wrong variable). Find the group first; its total is your denominator.
Segment 6 — Association Is Not Causation: Lurking Variables (18 min)
Plain language first. Week 1 gave you the slogan; this week you own the machinery. An observed association — a strong r, a big gap between conditionals — can happen for three reasons: x really drives y, y really drives x (the arrow can point backward!), or a third variable drives both.
- A lurking variable is a variable you didn't plot or tabulate that influences both of the ones you did — it can create an association out of nothing, or hide a real one.
- Confounding (from Week 1) is what you get when effects tangle: you can't tell which variable is doing the work.
Worked example (create-an-association).
A town's records show: in stretches of days with more lemonade-stand permits, there are also more sunburn cases. Strong positive association. Does lemonade cause sunburn?
Obviously not — hot, sunny weather is lurking: it drives permit applications and sunburns. Plot permits vs. sunburns and you'll see a real uphill cloud; the arrow from one to the other still isn't there.
The move to teach: when you see an association, ask "what ELSE could drive both?" before you believe any arrow.
Worked example (backward arrow).
"People carrying umbrellas are far more likely to experience rain that day." True association — but umbrellas don't cause rain; the forecast of rain causes umbrellas. Direction of the arrow is a claim of its own, and data alone rarely settles it.
Memory hook (callback): "Correlation is a handshake, not a push" — and now the upgrade: "Before you believe a push, hunt the third hand."
Misconception + cure:
- ❌ "We compared conditionals / computed r carefully, so the cause is established."
✅ Cure: careful arithmetic measures the association perfectly and says nothing about the arrow. Only a randomized experiment (Week 1) earns a causal claim.
Segment 7 — Technology Workflow + AI-Critique (20 min)
Technology workflow — scatterplot, r, and a two-way table in a spreadsheet (exact steps):
1. Scatterplot: put the explanatory variable in column A, the response in column B (with headers). Select both columns → Insert ▸ Chart. Sheets usually guesses right; if not, set Chart type ▸ Scatter chart. (Excel: Insert ▸ Scatter (X, Y).)
2. Correlation: in an empty cell, =CORREL(A2:A6, B2:B6) — adjust the ranges to your data. Excel: identical. Try it live on the cocoa data — the class should see −0.94 appear.
3. Swap test (30 seconds, worth it): =CORREL(B2:B6, A2:A6) — same answer. Rule 3, demonstrated.
4. Two-way table: with two categorical columns, select the data → Insert ▸ Pivot table. Set Rows = one variable, Columns = the other, Values = COUNTA of either column. The margins appear for free. (Fallback that always works: =COUNTIFS(range1, "category1", range2, "category2") per cell.)
5. A Desmos-class graphing tool also draws scatterplots: enter the table, and the points appear — good for a quick look without a spreadsheet.
AI-critique moment (students verify, not consume):
Paste the aquarium table into your chatbot and ask: "What percent of returning visitors bought a membership?"
Then check the denominator. Chatbots frequently answer 40 ÷ 200 = 20% (the joint percent) or 40 ÷ 70 ≈ 57% (conditioning on the wrong variable) instead of 40 ÷ 80 = 50%. Also try: "My r is −0.94 — what does that mean?" and watch for the classic "sales drop by 94%" misread — r is not a percent and not a rate. The tool drafts, you judge — this exact skill is graded in this week's Data Lab.
Segment 8 — Callback, Tease & Hand-off (12 min) · Session 2 closes (~75)
Callback + tease:
- Callback: "Week 1 warned you that correlation is a handshake, not a push — this week you learned to measure the handshake: r for number-pairs, conditional distributions for category-pairs. Weeks 2–3 taught you one variable's story; you now read two at once."
- Tease next week: "Next week we change gears: probability — the mathematics of chance. It looks like a detour; it's actually the engine. Every 'how confident can we be?' question for the rest of the course runs on it. Bring dice-level intuition; leave with the real rules."
- Far tease (plant it): "And keep this week's tools warm — two-way tables come back in Week 16 with their own significance test, and scatterplots return in Week 17 wearing a regression line."
Hand-off (the week's work):
- Chapter 4 (the primary reading) if they haven't read it yet — then Lecture Tutorial 4 (AI tutor, share-link submission) — scatterplots, r, two-way tables, causation.
- Data Lab 4 (the penguins return: flipper vs. body mass, =CORREL, species × island) · Quiz 4 (end of week) · Discussion 4 (screen time & sleep) · Assignment 4 (AI-coached).
Instructor FAQ — Common Stumbles
| Student says / does | Quick cure |
|---|---|
| Puts the response variable on the x-axis. | Ask: "Which one would you use to predict the other?" The predictor (explanatory) takes x; the outcome (response) takes y. "x explains, y responds." |
| "r = 0, so there's no relationship." | r sees straight lines only. Sketch an arch: tight pattern, r ≈ 0. The plot comes first; r second. |
| "r = −0.9 is weaker than r = +0.5." | Strength = distance from 0. The sign is only the direction of the hill. −0.9 ≫ +0.5 in strength. |
| "r = −0.94 means a 94% drop." | r has no units and is not a rate or percent of anything. It measures tightness-around-a-line, nothing else. |
| Divides by the grand total for a conditional ("40/200"). | Find the group first. "Among returning visitors" → the denominator is the returning-visitor total (80), not 200. The denominator names the club you're inside. |
| Conditions on the wrong variable ("40/70"). | 40/70 answers "among membership buyers, what fraction were returners?" — a different question. Read the "among ___" clause; that group's total is the denominator. |
| "The conditionals differ by 25 points — so visit type causes membership." | The gap proves association, never the arrow. Hunt the lurking variable (who returns to an aquarium? people who already love it). Only random assignment (Week 1) shows a push. |
| Computes r on categorical codes (1 = first-time, 2 = returning). | r needs two quantitative variables. Numeric labels are still labels (Week 1's NOIR lesson). For categories, use a two-way table and compare conditionals. |
Scope flag
This outline stays within Objective 3. The backward-arrow (umbrella) example and the far tease to Weeks 16–17 are added context (not strictly required by the objective) — kept because they make the causation trap and the course's arc stick; cut them for a leaner session. Computing r by hand (deviation products) is deliberately out of scope — the course computes r by technology and grades the interpretation, matching the spine's interpret-the-output emphasis. The regression line is not this week; it arrives with inference in Week 17.