Back to the Introduction to Statistics outline The Course Maker
Introduction to Statistics outline
Week 4 · Data Lab

Week 4 — Data Lab · "Flippers, Grams & Islands: Two Variables at Once"

Introduction to Statistics Generic evergreen edition

Course: Introduction to Statistics (18-week generic edition)
Objective: Objective 3 — scatterplots; correlation r; two-way tables & conditional distributions · SLO A (reason quantitatively from data)
Worth 50 points · Data labs group = 15% of the grade · Data Lab 4 · Due: end of Week 4
Format: a hands-on data lab — real research data, a spreadsheet scatterplot, your own =CORREL(), a species-by-island two-way table; then you catch the AI's mistakes when it interprets your work.

This is the course's signature weekly component. Every instructional week has a Data Lab: real, free, linked public data — nothing to buy, download from a store, or sign up for — worked in your spreadsheet, finished with an AI-critique step. Plan on 60–90 minutes.


Part 1 — The Big Picture

For three weeks the penguins have been a pile of single columns — you counted them, graphed one variable, summarized one variable. This week the dataset becomes what it really is: 344 individuals, each carrying several measurements at once. Do penguins with longer flippers weigh more? Is a penguin's species tied to which island it lives on? Those are two-variable questions — one for a scatterplot and r, one for a two-way table and conditional distributions — and they're exactly this week's two toolkits, pointed at real Antarctic field data.

And a deeper lesson is hiding in the cloud: the overall flipper–mass relationship mixes three different species. Part of what looks like "flippers go with mass" is really "Gentoos are big." That's this week's lurking variable idea, live in your own spreadsheet.

The data (same dataset as Weeks 1–3): between 2007 and 2009, researchers at Palmer Station, Antarctica measured 344 penguins from three species (Adélie, Chinstrap, Gentoo) across three islands — bill and flipper dimensions, body mass, and sex — released as the freely available palmerpenguins teaching dataset.


Part 2 — The Task

The guiding question: How strongly does flipper length travel with body mass — and is species associated with island — in the full 344-penguin dataset?

The dataset (both links are free, no login):
- About the data — palmerpenguins documentation
🔗 https://allisonhorst.github.io/palmerpenguins/
- The data itself (CSV file, opens as plain text)
🔗 https://raw.githubusercontent.com/allisonhorst/palmerpenguins/main/inst/extdata/penguins.csv


Part 3 — Materials & Procedure

You need: a web browser and a spreadsheet — Google Sheets (free) or Excel. Nothing else.

Warm-up (5 min, no dataset needed). Below are 10 penguins from the dataset's three species. Before computing anything, look at the flipper and mass columns together and write down: (a) the direction you expect for flipper length vs. body mass, and (b) which species you'd guess sits at the top-right of that scatterplot.

The table below lists species, island, flipper length, and body mass for 10 penguins (this is also your fallback dataset for Step 9).

Penguin Species Island Flipper (mm) Body mass (g)
1 Adelie Torgersen 181 3750
2 Adelie Biscoe 187 3550
3 Adelie Dream 190 3900
4 Chinstrap Dream 195 3650
5 Chinstrap Dream 198 3775
6 Gentoo Biscoe 216 4900
7 Gentoo Biscoe 219 5100
8 Gentoo Biscoe 222 5350
9 Adelie Torgersen 185 3600
10 Gentoo Biscoe 230 5700

Now the real data:

  1. Import the dataset (same routine as the earlier labs). Simplest route that works everywhere: open the CSV link above in your browser, select all (Ctrl/Cmd-A), copy, paste into cell A1 of a blank sheet, then Data ▸ Split text to columns if needed. (Excel: Data ▸ From Web with the CSV URL.) You should end with 8 columns — species, island, bill_length_mm, bill_depth_mm, flipper_length_mm, body_mass_g, sex, year — plus a header row.
  2. Count your rows. In an empty cell, =COUNTA(A2:A400) — it should say 344. If not, re-import before continuing.
  3. Build the scatterplot. Copy the flipper_length_mm column (E) into empty column J and body_mass_g (F) into column K — putting the pair side by side keeps the chart tool happy. Select J and K (with their headers) → Insert ▸ Chart → set the chart type to Scatter chart if it guessed something else. Flipper length is the explanatory variable (x); body mass is the response (y).
  4. Read your cloud. Fill in Scaffold Table 1: direction, form, strength, outliers — then the one-sentence description, in context.
  5. Compute r. In an empty cell: =CORREL(E2:E345, F2:F345). Record it to two decimals in Table 1. (Two penguins have NA for these measurements — spreadsheets skip non-numeric pairs automatically, so your r uses the 342 complete pairs. Note the swap test: =CORREL(F2:F345, E2:E345) returns the identical value.)
  6. Build the two-way table. Select columns A and B (species and island) → Insert ▸ Pivot table (new sheet) → Rows: species · Columns: island · Values: COUNTA of species. Copy the counts (with the row/column totals) into Scaffold Table 2. Fallback that always works: =COUNTIFS(A2:A345,"Adelie",B2:B345,"Biscoe") and so on, one cell per combination.
  7. Check the margins. Your row totals must add to 344, and so must your column totals. If they don't, hunt the typo now.
  8. Compute the conditionals. Fill Scaffold Table 3: among Dream-island penguins, what percent are Chinstrap? Among Biscoe penguins, what percent are Gentoo? And the marginal: what percent of all 344 penguins live on Dream? (Divide, then say each denominator's group out loud — that's the week's discipline.)
  9. See the lurking variable. Add a filter (Data ▸ Create a filter) and view the scatterplot columns for one species at a time (easiest: filter, then copy that species' J–K rows to a fresh area and chart them, or just eyeball the filtered values). Notice: within a single species, the flipper–mass cloud is looser than the overall cloud. Record the one species you inspected in Table 1's last row.

Fallback (no import available): do everything with the 10-penguin warm-up table instead — chart its flipper/mass pairs, compute =CORREL() on the 10 pairs, and build the species × island counts by hand (a 3 × 3 table). State in your submission that you used the fallback.


Part 4 — The Scaffold (complete all three tables)

Table 1 captures your scatterplot reading and r.

Item Your answer
Direction (positive / negative) ______
Form (linear / curved / clusters) ______
Strength (strong / moderate / weak) ______
Outliers (yes/no — where?) ______
r from =CORREL() (2 decimals) ______
One-sentence description, in context ______
Species you filtered in Step 9 + what changed ______

Table 2 is your species × island two-way table (counts, with margins).

Biscoe Dream Torgersen Row total
Adelie ______ ______ ______ ______
Chinstrap ______ ______ ______ ______
Gentoo ______ ______ ______ ______
Column total ______ ______ ______ 344

Table 3 holds your marginal and conditional percentages (name each denominator).

Question Fraction Percent
Among Dream penguins, % Chinstrap __ / ____ ______
Among Biscoe penguins, % Gentoo __ / ____ ______
Marginal: % of ALL penguins on Dream ______ / 344 ______

Part 5 — Analysis Questions

Answer in 1–3 sentences each:

  1. Give your one-sentence description of the flipper–mass relationship (direction, form, strength, in context) and say what r adds that the sentence alone doesn't. Does your r agree with your eyes?
  2. Using Table 3: are species and island associated? Point to two conditional percentages that differ (for instance, the Gentoo share of Biscoe vs. the Gentoo share of Dream) and say what no association would have looked like instead.
  3. The overall cloud mixes three species, and one species is both the heaviest and the longest-flippered. Explain how species acts like a lurking variable behind the strong overall r — and what your Step 9 single-species view showed about the within-species relationship.
  4. Error sources: two penguins have NA for flipper and mass, and your import could silently store numbers as text or grab the wrong ranges. How did your spreadsheet handle the NAs in =CORREL(), and name one import error that would distort r without any warning.
  5. (Preview.) If you drew one penguin at random from all 344, what fraction of the time would it come from Dream (use Table 3's marginal)? Keep that number — next week we start calling it a probability.

Part 6 — AI-Critique Moment (required — the BYOAI step)

Now bring in your chatbot and be the analyst who checks its work.

  1. Paste your completed Table 2 (the counts) and your r value into your chatbot and ask: "Using this table: what percent of Dream-island penguins are Chinstrap? And explain what my r value means about flippers and body mass."
  2. Check everything it says against your own work:
    - Denominator check: did it divide by the Dream total, or wrongly by 344 (marginal) or by the Chinstrap total (wrong variable)? Redo the division yourself.
    - r-language check: did it call r "87% of penguins" or "mass rises 87%"? (r is not a percent of anything.) Did it claim longer flippers cause higher mass? (Observational data — no arrow earned.)
    - Table integrity: did it invent a nonzero count for a cell your table shows as 0 (there are no Gentoos on Dream), or mis-add a margin? Re-add one margin yourself.
  3. Write 2–3 sentences reporting what the AI got right and at least one thing you had to correct, question, or verify. If it happened to get everything right, say how you verified each claim — that's the skill.

The habit all term: the tool drafts, you judge. Wrong denominators and "r as a percent" are this week's signature machine mistakes — catching them is the point.


Part 7 — What to Submit

One document or text entry containing: your warm-up predictions (a) and (b), your completed Tables 1–3, your Part 5 answers (1–5), and your Part 6 AI-critique paragraph. Due at the end of Week 4 · 50 points (rubric below the key).


Instructor answer key & model values — REMOVE BEFORE PUBLISHING TO STUDENTS

The full-data numbers below are deterministic (every correct import gives the same values), and every value here was verified in-session against the linked CSV during this pack's build. Students' chart-reading words (strong/moderate) are graded on justification, not on matching one adjective. The math script tools/checks/w04_math.py re-derives the r values from embedded per-species sufficient statistics and re-checks every count and ratio.

Warm-up: (a) expected direction positive; (b) Gentoo at the top-right. On the 10-penguin fallback set, =CORREL() gives r ≈ 0.96 (verified).

Dataset facts (verified against the linked CSV): 8 columns with headers exactly species, island, bill_length_mm, bill_depth_mm, flipper_length_mm, body_mass_g, sex, year; 344 data rows; species spellings Adelie, Chinstrap, Gentoo; islands Biscoe, Dream, Torgersen; 2 rows have NA for both flipper length and body mass → 342 complete pairs feed =CORREL().

Table 1 model values: direction positive; form roughly linear (accept "two clusters — the Gentoo group sits high-right" as a sharp observation); strength strong; outliers: none dramatic (accept "no" or a defended borderline point); r = 0.87 (full precision 0.8712 — any correct import rounds to 0.87; a swap-test value must match). Sentence model: "There is a strong, positive, roughly linear relationship: penguins with longer flippers tend to weigh more." Step 9 single-species note: within one species the cloud is looser — e.g., filtered r ≈ 0.47 for Adelie, ≈ 0.64 for Chinstrap, ≈ 0.70 for Gentoo (all verified; students need only report "weaker/looser within one species," not these values).

Table 2 expected counts (verified):

Biscoe Dream Torgersen Row total
Adelie 44 56 52 152
Chinstrap 0 68 0 68
Gentoo 124 0 0 124
Column total 168 124 52 344

Table 3 expected values (verified): Chinstrap among Dream = 68/124 = 54.8%; Gentoo among Biscoe = 124/168 = 73.8%; marginal Dream share = 124/344 = 36.0%.

Part 5 expected answers:
1. A sentence with direction + form + strength in context; r adds a precise, unit-free strength measure (0.87 = strong positive). Full credit requires the eyes-vs-r agreement check.
2. Yes, strongly associated: the conditional make-ups differ wildly by island — Biscoe is 73.8% Gentoo while Dream is 0% Gentoo (and Torgersen is 100% Adelie). No association would mean each island showing (roughly) the same species mix.
3. Species is tied to both flipper length and body mass (Gentoos are long-flippered AND heavy), so pooling species inflates the overall relationship; within one species the correlation is noticeably weaker. (Enrichment fact for discussion, verified in-session: for bill depth vs. mass the pooled r is −0.47 yet the within-species r is positive for all three species (+0.58, +0.60, +0.72) — the lurking-variable effect strong enough to flip a sign.)
4. =CORREL() skips the two NA pairs automatically (n = 342); an unflagged error example: numbers imported as text are silently ignored (changing n and r), or a range off by one row pairs each flipper with the wrong mass. Any specific, correct mechanism earns credit.
5. 124/344 = 0.36 → about 36% — graded on using their own marginal correctly; the probability framing is the Week 5 bridge.

AI-critique full credit: names a specific claim checked or corrected — most commonly a wrong denominator (68/344 = 19.8% or 68/68), r read as a percent or slope, a causal claim, or an invented nonzero cell — OR documents verification of each claim. Zero credit for "the AI agreed with everything" with no evidence of checking.

Grading rubric — 50 points

The rubric below maps each part to its points; bands are full / partial / none.

Criterion Full Partial None
Import + scatterplot — 344 rows confirmed; scatter chart built with flipper on x, mass on y (8) 8 4–6 0–3
r + reading — Table 1 complete; r = 0.87 (2 dp) from a correct range; sentence has direction, form, strength in context (12) 12 6–10 0–5
Two-way table — Table 2 counts correct with margins adding to 344; Table 3 conditionals/marginal computed with the right denominators (12) 12 6–10 0–5
Analysis questions — Q1–Q5 hit the expected ideas, especially association-by-conditionals in Q2 and the lurking-variable logic in Q3 (12) 12 6–10 0–5
AI-critique — specific catch or verification reported in 2–3 sentences (6) 6 3–4 0–2

Quality gate (self-checked): every number in this key verified in-session against the fetched CSV (row count, headers, all nine cells, margins, r values, conditionals) and re-derived by tools/checks/w04_math.py from embedded sufficient statistics; both dataset links load free with no login; the two-way-table margins re-added (152 + 68 + 124 = 344; 168 + 124 + 52 = 344); no graded-item leakage (no quiz/practice/assignment item uses penguins); rubric sums 8 + 12 + 12 + 12 + 6 = 50. ✓