Hybrid· RSelf-learningHomeworkPredict, observe, explainRecall with feedbackBefore teachingAccessibility not checkedPublished

How Surprising Is 496 Grams? Hypothesis tests and p-values in R

By Alexis Diamond · Statistics · Hypothesis Testing · Undergraduate · Simulation of a known property · version 6

Licence: CC BY 4.0

Share and present
Assumption ledger (4)
  • dataThe cereal machine, its 500 g setting, σ = 10 g and the sample mean of 496 g are made up for this page.
  • distributionSingle box weights are simulated as normal with SD σ = 10 g; σ is treated as known, so the test uses z and pnorm() rather than t.
  • parameterStep 2: 10,000 samples of 25 boxes (set.seed(21)). α = 0.05 throughout.
  • simplificationOne-sided test (H_A: μ < 500), because the suspicion was short-filling. Step 3 also shows the two-sided version (H_A: μ ≠ 500): both tails count, p ≈ 0.044 simulated, 2 × pnorm(−2) ≈ 0.046.
Checks Breakout ✓ · Code not checked · Accessibility ✓

Breakout check

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

Code checks

Not checked yet.

Cite this · History

Cite this

Alexis Diamond (2026). How Surprising Is 496 Grams? Hypothesis tests and p-values in R [Interactive model], version 6. Ideas at Play. https://ideasatplay.org/play/how-surprising-is-496-grams-hypothesis-tests-and-p-values-in-2e8c52?v=6 (CC BY 4.0)

History

  1. v6Ordered answer scales keep their order (data-kc-order="fixed"); other multiple-choice options are now shuffled by the platform. (edited, Dec 2, 2026)current
  2. v5Cut step 7 (Type I and II errors); the return question on errors is replaced by one on two-sided p-values. (edited, Nov 25, 2026)View
  3. v4Step 3: one-sided vs two-sided p-values explained (one tail vs both, set by H_A), with a practice question; step 4 note and end panel updated. (edited, Nov 25, 2026)View
  4. v3Professor: step 7 shrunk to the Type I/II table and the alpha sentence; 1,000-batch prediction and its R cell removed. (edited, Nov 25, 2026)View
  5. v2Independent-review fixes: second-voice reason, alpha wording, two-sided example, Type I return question, cut q_meaning. (edited, Nov 25, 2026)View
  6. v1Imported; lineage before import is not available. (imported, Nov 25, 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