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

Week 3 — Data Lab · "Sabotage the Penguins: Center & Spread by Species"

Introduction to Statistics Generic evergreen edition

Course: Introduction to Statistics (18-week generic edition)
Objective: Objective 2 — numerical summaries: center, spread, five-number summaries, outliers · SLO A (reason quantitatively from data)
Worth 50 points · Data labs group = 15% of the grade · Data Lab 3 · Due: end of Week 3
Format: a hands-on data lab — real research data, a spreadsheet, and a deliberate act of data sabotage; 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

Week 1 you met the penguins and drew a random sample. Week 2 you drew their pictures. This week you compress those pictures into honest numbers: the center and spread of body mass, separately for each species — mean, median, SD, five-number summary, IQR — plus the 1.5×IQR rule that formally flags outliers.

Then comes the fun part: you will sabotage your own dataset. One fat-fingered typo — a penguin entered at an impossible 9,999 grams — gets injected on purpose, and you'll watch, live, which summaries lurch (mean, SD) and which shrug (median, IQR). That's this week's biggest idea, resistance, demonstrated on real research data by you.

The data (same as Weeks 1–2): 344 penguins measured at Palmer Station, Antarctica (2007–2009) — three species, three islands, released as the freely available palmerpenguins teaching dataset.


Part 2 — The Task

The guiding question: How different are the three penguin species in body mass — in center AND in spread — and what happens to each summary when one impossible value sneaks into the data?

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 (10 min, by hand — no dataset needed). A field notebook page lists the body masses, in grams, of 10 Adélie penguins:

The table below lists one practice value per penguin (already sorted for you).

Penguin Body mass (g)
1 3300
2 3500
3 3600
4 3700
5 3700
6 3800
7 3900
8 4000
9 4100
10 4400

By hand (calculator fine), using the class split-the-halves method for quartiles, compute and write down: the mean, median, mode, five-number summary (min, Q1, median, Q3, max), and IQR. Then compute the 1.5×IQR fences and check: are any of the 10 masses flagged? (Keep these answers — Table 2 reuses this warm-up set.)

Now the real data:

  1. Import the dataset exactly as in Data Lab 1 (open the CSV link, select all, copy, paste into cell A1, then Data ▸ Split text to columns if needed; or Excel: Data ▸ From Web). Confirm the import with =COUNTA(A2:A400) → it should say 344 rows. The 8 columns are species, island, bill_length_mm, bill_depth_mm, flipper_length_mm, body_mass_g, sex, year.
  2. Split the masses by species. Turn on Data ▸ Create a filter. Filter species to Adelie only, select the visible body_mass_g cells, copy, and paste into column J (label J1 "Adelie"). Repeat for Chinstrap into column K and Gentoo into column L. Turn the filter off. (A few cells say NA — real fieldwork has gaps; leave them, the functions below skip text automatically.)
  3. Count each column: =COUNT(J2:J200), and the same for K and L — record the counts in Table 1. (=COUNT counts numbers only, so NA cells are skipped — that's what you want.)
  4. Fill Table 1 using, for each species column: =MIN(), =QUARTILE(range,1), =MEDIAN(), =QUARTILE(range,3), =MAX(), the IQR by subtraction, =AVERAGE(), and =STDEV(). (Convention note: =QUARTILE interpolates, so it can differ a bit from the hand method — on the warm-up set it gives Q1 = 3625 and Q3 = 3975 where the hand method gives 3600 and 4000. Neither is wrong; in Table 1, use =QUARTILE and say so.)
  5. Run the outlier rule on Adelie. From Table 1's Adelie row: compute 1.5 × IQR, then the fences Q1 − 1.5·IQR and Q3 + 1.5·IQR. Compare with the Adelie min and max: is any Adelie mass flagged? Record the fences and the verdict.
  6. Sabotage. In your Adelie column, find the first value — it's 3750 (the very first penguin in the file) — and retype it as 9999 (a data-entry typo: a smudged 3 read as a 9). Watch =AVERAGE(), =MEDIAN(), and =STDEV() update live. Record the before/after values in Table 2, and check the new maximum against your fences from step 5.
  7. Undo the sabotage (retype 3750) so your Table 1 stays honest — and note what just happened: the rule that found nothing suspicious in the real data instantly flagged the typo.
  8. Verify the shift arithmetic. Replacing one value x with y in a column of n numbers moves the mean by exactly (y − x) ÷ n. For your Adelie column: (9999 − 3750) ÷ your Adelie count. Check that your observed mean jump matches (small rounding aside) — this is the graded arithmetic.

Fallback (no import available): do everything with printed data instead. Use the 10-penguin warm-up table as your "Adelie" column, and this second sorted set as your "Gentoo" column (grams): 4600, 4800, 4900, 5000, 5000, 5200, 5400, 5500 — hand stats: mean = 5050, median = 5000, Q1 = 4850, Q3 = 5300, IQR = 450 (technology gives SD ≈ 302). Run the sabotage on the warm-up set by adding an 11th value, 9,905 g: the mean jumps from 3,800 to exactly 4,355 while the median moves only from 3,750 to 3,800. State in your submission that you used the fallback.


Part 4 — The Scaffold (complete both tables)

Table 1 captures each species' body-mass summary from your own import (record =QUARTILE values for Q1/Q3).

Species Count (=COUNT) Min Q1 Median Q3 Max IQR Mean SD (=STDEV)
Adelie ______ ______ ______ ______ ______ ______ ______ ______ ______
Chinstrap ______ ______ ______ ______ ______ ______ ______ ______ ______
Gentoo ______ ______ ______ ______ ______ ______ ______ ______ ______

Table 2 captures the sabotage experiment on your Adelie column (steps 6–8), plus the fence check.

Quantity Before (real data) After (3750 → 9999)
Adelie mean (g) ______ ______
Adelie median (g) ______ ______
Adelie SD (g) ______ ______
Largest value vs. upper fence — flagged? ______ ______
Observed mean jump vs. (9999 − 3750) ÷ count ______

Part 5 — Analysis Questions

Answer in 1–3 sentences each:

  1. Rank the three species by typical body mass using your medians. For each species, compare its mean to its median — does any species show the mean sitting noticeably above the median, and what would that suggest about the shape (Week 2 vocabulary welcome)?
  2. Using Table 2 and the word resistant, explain what the sabotage demonstrated: why did the mean and SD lurch while the median barely moved (or didn't move at all)?
  3. Before the sabotage, the 1.5×IQR rule likely flagged nothing in your Adelie column. Is "no outliers" a failure of the rule? What does its instant reaction to the 9,999 g typo show about what the rule is for?
  4. Error sources: name one way a number in your Table 1 could be wrong even though the spreadsheet "computed it correctly" — e.g., what would using =STDEVP() instead of =STDEV() do, or what happens if a filter accidentally leaks another species into a column, or the NA cells get typed over? Pick one and explain the damage in a sentence.
  5. Looking ahead: you just summarized one quantitative variable (mass) separately across the values of one categorical variable (species). What does comparing the three medians tell you that a single all-344-penguin median would hide? (Next week this side-by-side idea becomes the study of relationships between two variables.)

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 1 and Table 2 into your chatbot and ask: "Check my summary statistics for internal consistency. Then tell me: is the jump in the Adelie mean after one value was retyped to 9,999 an error in my spreadsheet?"
  2. Check everything it says against your own work:
    - Did it recompute your SD with the wrong divisor? (Chatbots routinely divide by n instead of n − 1 — the =STDEVP() mistake in prose form — and then "correct" your right answer.)
    - Did it call the sabotage jump a calculation error? (It isn't — it's the non-resistance of the mean, doing exactly what the math says: the jump is (9999 − 3750) ÷ count.)
    - Did it "fix" your quartiles to different values? (Different quartile conventions disagree slightly — that's not an error either.)
    - Did it accept a 9,999 g penguin as plausible? (No penguin weighs 10 kilograms — a real analyst questions the value, not just the arithmetic.)
  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. A chatbot will confidently use the wrong divisor or "correct" a right quartile — catching it is the point.


Part 7 — What to Submit

One document or text entry containing: your warm-up hand computations (mean, median, mode, five-number summary, IQR, fences, flag verdict), your completed Table 1 and Table 2, your Part 5 answers (1–5), and your Part 6 AI-critique paragraph. Due at the end of Week 3 · 50 points (rubric below the key).


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

Students compute from their own imports, so Table 1 is graded on method and internal consistency (with the sanity rails below), not on digit-for-digit matches. Every printed number below is pre-computed and re-verified; dataset-level rails were verified in-session against the linked CSV (multiple independent extractions) and should additionally be spot-checked against one import of your own in adoption week.

Warm-up (fixed — every student should match exactly): sum = 38,000 → mean = 3,800 g; median = (3700 + 3800) ÷ 2 = 3,750 g; mode = 3,700 g (appears twice); five-number summary (split-the-halves): 3300 · 3600 · 3750 · 4000 · 4400; IQR = 400; 1.5 × 400 = 600 → fences 3,000 and 4,600no value flagged (3300 > 3000, 4400 < 4600). Deviations from 3,800 sum to 0; Σ(x − x̄)² = 900,000; s² = 100,000; s = √100,000 ≈ 316.2 g (if a student computes it by hand — SD is not required in the warm-up). Technology-convention note: =QUARTILE on this set gives Q1 = 3625, Q3 = 3975 vs. hand-method 3600/4000 — both acceptable in the warm-up if labeled. ✓ (independently re-verified in the week's math script)

Dataset facts (verified in-session against the linked source): header row exactly species,island,bill_length_mm,bill_depth_mm,flipper_length_mm,body_mass_g,sex,year; 344 data rows; first data row Adelie,Torgersen,39.1,18.7,181,3750,male,2007 (this is the value the sabotage retypes); last data row Chinstrap,Dream,50.2,18.7,198,3775,female,2009; species counts Adelie 152 · Chinstrap 68 · Gentoo 124; body_mass_g has 2 NA cells (one Adelie — the file's 4th data row is NA across all measurements — and one Gentoo), so =COUNT should return Adelie 151 · Chinstrap 68 · Gentoo 123; sex has 11 NA cells (trivia from Week 1, not graded here).

Table 1 sanity rails (from in-session verification extractions, rounded — treat as rails, not as an answer key; flag values outside them and check the student's method):

Species Count Median (g) Mean (g) SD (g) Min / Max (g)
Adelie 151 3,700 ≈ 3,650–3,750 ≈ 420–500 2,850 / 4,775
Chinstrap 68 3,700 ≈ 3,680–3,780 ≈ 350–420 2,700 / 4,800
Gentoo 123 5,000 ≈ 5,020–5,130 ≈ 470–540 3,950 / 6,300

Gentoo must come out clearly heaviest (median a full kilogram above the others); if a student's Gentoo row is not the largest, their filter leaked. Q1/Q3/IQR: accept whatever =QUARTILE returns from their import (Adelie IQR lands near 650, Gentoo near 800, Chinstrap near 460); students who hand-computed halves instead get slightly different quartiles — fine if labeled.

Step 5 expected verdict (Adelie fences): with =QUARTILE values near Q1 ≈ 3350 and Q3 ≈ 4000, IQR ≈ 650 → 1.5·IQR ≈ 975 → fences ≈ 2,375 and 4,975. Adelie min 2,850 and max 4,775 sit inside → nothing flagged. That "no outliers" finding is correct and is the setup for Q3.

Table 2 expected results (grade the arithmetic relationship, not one fixed mean):
- Mean: rises by exactly (9999 − 3750) ÷ 151 = 6249 ÷ 151 ≈ +41.4 g over the student's own "before" mean — this shift check is the graded computation (step 8), and it works whatever their before-mean was. ✓ (verified in the math script)
- Median: unchanged or nearly so (expect 3,700 before and after — replacing one below-median-ish value with a huge one shifts the middle position by at most one slot).
- SD: inflates dramatically (roughly doubles — any clear jump earns credit; exact value depends on their import).
- Fence check: 9,999 is far beyond the ≈4,975 upper fence → flagged; before the sabotage, nothing was.
- Fallback students (adding 9,905 to the warm-up set): n = 11, sum = 47,905 → new mean = 4,355 exactly (up from 3,800); new median = 3,800 (up from 3,750); technology SD jumps from ≈316 to ≈1,865. ✓ (all verified in the math script)

Part 5 expected answers:
1. Gentoo heaviest by roughly a kilogram; Adelie and Chinstrap similar (medians both 3,700). Means sit close to medians for all three (differences small relative to SD), suggesting roughly symmetric masses within species; accept a defended "slightly right-skewed" for a species whose mean edges above its median.
2. The mean and SD use every value's size, so one 9,999 drags them; the median (and IQR) use positions, so they barely move — that's the definition of resistant in action.
3. Not a failure — most honest datasets flag nothing; the rule is a tripwire for suspicious values, not a guarantee of drama. Its instant flag on 9,999 shows it doing its actual job: catching entries worth investigating (typo vs. truth).
4. Any one, well explained: =STDEVP() silently shrinks the SD (n divisor — wrong for sample data); a leaked filter mixes species and drags that row's summaries toward the other species; typing over NA cells changes counts and every downstream statistic; forgetting to undo the sabotage poisons Table 1.
5. The three medians reveal between-species structure a single median hides: one number for all 344 would sit uselessly between two clumps (callback: the Week 2 bimodal-shape warning) — comparing a quantitative summary across categories is exactly where next week's two-variable thinking begins.

AI-critique full credit: names a specific claim checked or corrected — most commonly the chatbot recomputing SD with the n divisor, calling the sabotage jump a spreadsheet error, "correcting" quartiles to a different convention, or failing to question the 9,999 g penguin — OR documents how each claim was verified. 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
Warm-up hand computations — mean 3,800; median 3,750; mode 3,700; five-number 3300/3600/3750/4000/4400; IQR 400; fences 3,000/4,600; "no flags" (5) 5 3 0–1
Import + species columns + Table 1 — counts 151/68/123; all cells computed with the named functions; values inside sanity rails or method-defended (15) 15 8–12 0–6
Outlier rule on Adelie — fences computed from their own Q1/Q3; correct comparison and verdict (8) 8 4–6 0–3
Sabotage experiment (Table 2) — before/after recorded; mean-jump matches (9999 − 3750) ÷ count; median/SD behavior noted; fence flag caught (8) 8 4–6 0–3
Analysis questions — Q1–Q5 hit the expected ideas, especially resistance in Q2 and the rule's purpose in Q3 (9) 9 5–7 0–4
AI-critique — specific catch or verification reported in 2–3 sentences (5) 5 3 0–2

Quality gate (self-checked): warm-up arithmetic re-verified (sum 38,000; mean 3,800; Σ(x−x̄)² = 900,000; s² = 100,000; fences 3,000/4,600); fallback set re-verified (mean 5,050; median 5,000; IQR 450; sabotage mean 4,355 exact from sum 47,905 ÷ 11); dataset links live and free (documentation page + raw CSV both load without login, re-verified this week); all structural dataset facts (344 rows, header, species counts, first/last rows, NA counts) verified in-session; sanity rails verified against multiple independent in-session extractions and marked as rails, not keys; no graded-item leakage (no quiz/assignment/practice item uses penguin data); rubric sums 5 + 15 + 8 + 8 + 9 + 5 = 50. ✓