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

Week 11 — Data Lab · "Ten Penguins and the Truth: Build Your Own Confidence Interval"

Introduction to Statistics Generic evergreen edition

Course: Introduction to Statistics (18-week generic edition)
Objective: Objective 6 — construct and interpret a one-sample t-interval · SLO A (reason quantitatively from data)
Worth 50 points · Data labs group = 15% of the grade · Data Lab 11 · Due: end of Week 11
Format: a hands-on data lab — real research data, a spreadsheet, and your own randomly drawn sample turned into a real confidence interval; 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

All week you've built confidence intervals around means you could never check — nobody knows the true average sleep of "all members." Today is the one day of the term when the truth is checkable. The full penguin dataset's mean body mass is a knowable number sitting in your spreadsheet — and you are going to hide it from yourself, draw a random sample of just 10 penguins, build a 95% t-interval from those 10 alone, and then look: did your interval capture the truth?

Here's the drama: about 95% of the class's honest intervals should capture it — and roughly 1 student in 20 should honestly, blamelessly miss. Somebody in the room is probably holding a perfectly-built interval that's wrong, and they can't tell from the inside. That's not a bug. That is exactly what "95% confident" has meant all week — and today you get to watch it come true.


Part 2 — The Task

The guiding question: From just 10 randomly chosen penguins, can you build an interval that captures the full dataset's mean body mass — and what does the class's capture rate teach about the words "95% confident"?

The dataset (both links are free, no login — the same dataset from Data Labs 1 and 8):
- 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). A field team weighs a random sample of n = 25 penguins from a large colony: x̄ = 4,200 g, s = 800 g. By hand, using the friendly t-table (df 24, 95% → t* = 2.064): compute SE = s/√n, then ME = t* × SE, then the 95% interval. Write all three down — you'll check them against the key's method later, and the real thing below runs the identical recipe with n = 10.

Now the real data:

  1. Import the dataset. 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 alternative: Data ▸ From Web, paste the CSV URL.) You should end with 8 columns and a header row: species, island, bill_length_mm, bill_depth_mm, flipper_length_mm, body_mass_g, sex, year — body mass is column F.
  2. Count your rows. In H1: =COUNTA(A2:A400) → should return 344. In H2: =COUNT(F2:F345) → counts only numeric body masses and should return 342 (two penguins have NA for mass). If either number differs, re-import before continuing.
  3. Compute today's "truth." In H3: =AVERAGE(F2:F345) — the full-data mean body mass, about four thousand two hundred grams. Write it down to 1 decimal. For today's experiment this number plays the role of μ: the parameter your little sample will hunt.
  4. Draw YOUR random 10. Week 1's move: in the first empty column, row 2, type =RAND() and fill down beside every penguin; select the whole data range → Data ▸ Sort range by the RAND column. Now copy the first 10 rows that have a numeric body mass (if an NA-mass row lands in your top 10, skip it and take the next row down — your sample must be 10 real measurements) into a scratch area, say cells M2:M11.
  5. Check your sample. In N1: =COUNT(M2:M11) → must be 10. (If it isn't, a blank or NA snuck in — fix before continuing, because df = n − 1 depends on it.)
  6. Compute the machine, cell by cell. N2: =AVERAGE(M2:M11) → x̄. N3: =STDEV(M2:M11) → s. N4: =N3/SQRT(10) → SE. N5: type the multiplier 2.262 (df = 9, 95%, from the friendly table). N6: =N5*N4 → ME. N7: =N2-N6 → lower endpoint. N8: =N2+N6 → upper endpoint.
  7. The moment of truth. Is the full-data mean (H3) between N7 and N8? Record YES or NO in Table 1 — no shame either way; about 1 in 20 honest intervals should miss.
  8. Buy more certainty. In N9: =3.250*N4 → the 99% margin (df 9, 99%). N10: =N2-N9, N11: =N2+N9. Is the 99% interval wider? Does it capture H3? Fill Table 2.
  9. If your class runs the tally: report your Table 1 YES/NO when asked — the class capture rate is the week's big idea made visible.

Fallback (no import available): if you can't get the CSV into a spreadsheet, use this random sample of 10 real body masses (grams) drawn from the dataset: 3750, 4400, 3250, 5700, 4650, 3900, 3175, 5400, 3800, 4100. Compute x̄ and s with a calculator's stats mode (or by hand), then run steps 6–8 with SE = s/√10 and the same multipliers, and answer everything using the documentation page's stated dataset facts. State in your submission that you used the fallback.


Part 4 — The Scaffold (complete both tables)

Table 1 captures your 95% interval and the moment of truth.

Quantity Value
Rows of data (=COUNTA) ______
Numeric body masses (=COUNT) ______
Full-data mean body mass, g — today's "μ" ______
Your sample's n (must be 10) ______
Your sample mean x̄ (g) ______
Your sample SD s (g) ______
SE = s/√10 (g) ______
t* (df 9, 95%) ______
ME = t* × SE (g) ______
95% interval: (lower, upper) ______
Did your interval capture the full-data mean? (YES/NO) ______

Table 2 compares the 99% version of your interval.

Quantity Value
t* (df 9, 99%) ______
99% ME (g) ______
99% interval: (lower, upper) ______
Wider or narrower than the 95% interval? ______
Did the 99% interval capture the full-data mean? (YES/NO) ______

Part 5 — Analysis Questions

Answer in 1–3 sentences each:

  1. Your recipe used t* = 2.262 rather than z* = 1.96. Why is t the honest choice for your sample of 10 — and what number did you compute that z would have pretended to know exactly?
  2. Compare intervals with a classmate (or re-draw a second sample yourself): the two intervals are different, yet both were built correctly. Which Week 10 idea explains why honest intervals disagree, and why is neither of you "wrong"?
  3. Suppose all 30 students in a class build honest 95% intervals today. About how many should capture the full-data mean — and are the students whose intervals miss making an error? What single word from this week's vocabulary describes that ~95% figure?
  4. Error hunt: name one specific way this lab could quietly go wrong in the spreadsheet — for example, what happens to df (and your multiplier) if an NA sneaks into your 10 so =COUNT says 9; or sorting the RAND column alone so masses detach from their rows; or rounding SE before multiplying. How would you catch your chosen error?
  5. The bridge: a nature blog claims "the average penguin in this study weighs about 5,500 g." Check that claim against your 95% interval: inside or outside? What does the interval's verdict — plausible vs. implausible — preview about what we'll do to claims like this in Week 13?

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 into your chatbot and ask: "Check my 95% confidence interval for n = 10 penguins — did I use the right multiplier and arithmetic? My interval didn't match my classmate's — is one of us wrong? And explain what the 95% means."
  2. Check everything it says against your own work:
    - Did it bless (or recommend) z* = 1.96 for an n = 10 interval? The honest multiplier is t* = 2.262 (df 9) — the sneaked-in z is this week's signature chatbot error, and it shrinks your margin by about 13%.
    - Did it quote any other t-value "from memory"? Spot-check against the friendly table in Chapter 11 — memory-quoted t-tables drift by a digit.
    - Did it redo your ME arithmetic correctly (2.262 × your SE, with SE = s/√10 — not s)? Recompute one product yourself.
    - Did it call a non-matching interval "wrong" — yours vs. your classmate's — or did it correctly credit sampling variability? And did it describe the 95% as the method's long-run capture rate, or slip into "there's a 95% chance μ is in your interval"?
  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 hand you a z-multiplier for a 10-penguin sample or "fix" an interval that was never broken — catching it is the point.


Part 7 — What to Submit

One document or text entry containing: your warm-up SE, ME, and interval, 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 11 · 50 points (rubric below the key).


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

Students draw their own random samples, so sample means, SDs, intervals, and capture verdicts are graded on method and interpretation, not on matching any number here. Everything asserted below is pre-computed from the linked CSV and independently re-verified by script (tools/checks/w11_math.py).

Warm-up (fixed — every student should match): SE = 800/√25 = 160 g; ME = 2.064 × 160 = 330.24 g; interval = 4,200 ± 330.24 → (3,869.8, 4,530.2) g. ✓ (independently re-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; 342 numeric body masses (2 NA); first data row is an Adélie from Torgersen Island (mass 3750 g); full-data mean body mass 4,201.75 g (students will see ≈ 4,201.8), full-data sample SD 801.95 g.

Table 1 grading (method, not values): COUNTA = 344 and COUNT = 342 are fixed; full-data mean must be ≈ 4,201.8. The student's own n must be 10, t* must be 2.262, SE must equal their s ÷ √10 (≈ s ÷ 3.162 — redo this division from their own s), ME must equal 2.262 × their SE, and the endpoints must be x̄ ∓ ME (redo both from their own numbers — this is the arithmetic actually graded). For orientation only: most samples give s roughly between 500 and 1,050 g (the middle 90% of simulated samples), so a typical SE is near 250 g and a typical 95% ME near 570 g — flag an ME wildly outside ~250–900 g for a re-check (the classic causes: using s instead of SE, or z* instead of t*). The capture verdict is their own honest YES/NO against 4,201.8.

Table 2: t* = 3.250; the 99% ME must be 3.250 × their SE (always wider than the 95% ME — ratio 3.250/2.262 ≈ 1.44); a 99% interval that captures when the 95% missed is a teachable outcome, not an inconsistency.

Class tally (if run): a seeded simulation of this exact procedure (10,000 samples of n = 10 from the 342 masses, t* = 2.262) captures the full-data mean 94.2% of the time — comfortably "about 95%" (the slight shortfall is the dataset's mixed-species shape at n = 10). In a 30-student class expect roughly 28–29 captures; zero misses or several misses are both normal-luck outcomes, not procedure failures.

Fallback model values (fixed — every fallback user should match): the 10 listed masses are genuine dataset values; sum = 42,125 → x̄ = 4,212.5 g exactly; s ≈ 839.7 g; SE = 839.7…/√10 ≈ 265.6 g; 95% ME ≈ 600.7 → interval (3,611.8, 4,813.2) — captures 4,201.75; 99% ME ≈ 863.0 → interval (3,349.5, 5,075.5) — wider, also captures, and still excludes the 5,500-g claim.

Part 5 expected answers:
1. z assumes the population SD σ is known; nobody handed us σ — the student computed s from 10 penguins, and that estimate wobbles too. t* = 2.262 (df 9) budgets for the extra wobble; 1.96 would fake certainty.
2. Sampling variability (Week 10): different random samples give different x̄'s and s's, so different — equally honest — intervals. Neither student is wrong; both ran a method with a 95% capture rate.
3. About 95% of 30 ≈ 28–29 intervals should capture. The misses are not errors — they're the promised ~1-in-20. The vocabulary word: capture rate (accept "confidence level").
4. Any concrete, checkable error earns credit: an NA shrinking n to 9 (df becomes 8 — off the friendly table, so 2.262 is the wrong multiplier; caught by =COUNT(M2:M11)); sorting the RAND column alone (masses detach from rows — caught because Week 1 taught sorting the whole range); rounding SE early (endpoints stop reconciling — caught by recomputing (high − low)/2); dividing by 10 instead of √10. Full credit requires how they'd catch it.
5. For nearly every student, 5,500 g lies outside the interval (simulation: fewer than 2% of honest n = 10 intervals reach it) → the claim is implausible; the data push back. (If a rare student's interval does contain 5,500, an "inside → plausible" answer with correct reasoning earns full credit.) The preview: Week 13 turns this inside/outside verdict into a formal hypothesis test.

AI-critique full credit: names a specific claim checked or corrected — most commonly the chatbot recommending z* = 1.96 for n = 10, quoting an off-table t-value from memory, mangling the ME multiplication or the s-vs-SE divide, calling the classmate mismatch an "error," or phrasing the 95% as a probability that μ sits in this one interval — 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 + import — warm-up SE 160 / ME 330.24 / interval (3,869.8, 4,530.2); 344/342 confirmed; full-data mean recorded (5) 5 3 0–1
The random 10 — RAND-sort SRS drawn as specified; n verified = 10; x̄ and s computed with the named functions (10) 10 5–8 0–4
Interval construction — SE = s/√10; t* 2.262 and 3.250; both MEs and both intervals arithmetically correct from their own numbers; honest capture verdicts (10) 10 5–8 0–4
Analysis questions — Q1–Q5 hit the expected ideas, especially sampling variability (Q2) and the capture-rate meaning (Q3) (15) 15 8–12 0–6
AI-critique — specific catch or verification reported in 2–3 sentences (10) 10 5–7 0–4

Quality gate (self-checked): warm-up arithmetic re-verified (160 / 330.24 / 3,869.76–4,530.24); dataset links live and free (documentation page + raw CSV both load without login); row count, column names, NA count, full mean 4,201.75, and full SD 801.95 verified against the fetched CSV and re-verified in tools/checks/w11_math.py (which also runs the seeded capture-rate simulation: 94.2%, and the 5,500-g claim check); the fallback sample's 10 values are genuine dataset masses; no numeric claim in the key depends on an unverified dataset-wide value; no graded-item leakage (no quiz/assignment/practice item uses the penguins data); rubric sums 5 + 10 + 10 + 15 + 10 = 50. ✓