Hybrid· RHomeworkSelf-learningRecall with feedbackBefore teaching✓ Code checkedAccessibility not checkedPublished

Real, or Big? (pre-class): testing a difference of means

By Alexis Diamond · Statistics · Hypothesis Testing · Undergraduate · Computational / statistical · version 2

Shorter pre-class version of Real, or Big?: read two outbreak data sets, test the gap between two pesticide means in one short R edit, and see why the 95% interval for the gap leaves out 0 exactly when the p-value is below 0.05.

Licence: CC BY 4.0

Share and present
Assumption ledger (5)
  • dataThe outbreak data are made up for this page and are not real Mycoplasma pneumoniae data: 98 fever patients (60 without Mycoplasma, 38 with it) and 164 white blood cell counts (150 without, 14 with); neither looks normal.
  • dataPesticide numbers (30 farms: mean 5, SD 1; 20 farms: mean 9, SD 3.5) are the FA50 study-guide practice problem.
  • simplificationDegrees of freedom = the smaller n − 1 (OpenIntro's conservative rule) for both the test and the interval; R's t.test() uses the Welch df and gives a slightly smaller p-value and a slightly narrower interval.
  • parameterSE of the gap = √(1²/30 + 3.5²/20) ≈ 0.804; t ≈ 4.98; two-sided p ≈ 0.00008; t* = qt(0.975, 19) ≈ 2.093, so the 95% interval for μ₂ − μ₁ is 4 ± 1.68, about 2.32 to 5.68 points.
  • simplificationThe test is two-sided, matching the two-sided 95% interval.
Checks Breakout ✓ · Code ✓ · Accessibility ✓

Breakout check

✓ Ready for breakouts: every control we tried showed teammates the same thing.

Code checks

✓ Code checked: the reference solutions pass every exercise's checks.

Cite this · History

Cite this

Alexis Diamond (2026). Real, or Big? (pre-class): testing a difference of means [Interactive model], version 2. Ideas at Play. https://ideasatplay.org/play/real-or-big-pre-class-testing-a-difference-of-means-98fd9f?v=2 (CC BY 4.0)

History

  1. v2Review fixes: 'No' group labelled as tested negative for Mycoplasma; neutral option id in the interval question; clearer subtitle and feedback. (edited, Nov 27, 2026)current
  2. v1Imported; lineage before import is not available. (imported, Nov 27, 2026)View
Report this artifact

Reports are anonymous. The artifact stays up until we've checked it.

Comments

No comments yet.

Sign in to comment or like.

Anything wrong with this page? Submit feedback