Mostly Harmless StatisticsXYZ Homework Edition

⇩ Download ▾

EXPLORE BEFORE YOU READ · CHAPTER 9

The important change is within each worker.

Connect each worker’s two measurements before comparing their means.

04.5913.51802.34.56.89

Horizontal: Worker (same worker within each pair)Vertical: Items produced in the recorded day

8 matched workersMean difference: -2SE of differences: 0.732

Each line joins the same worker: solid navy before music, outlined orange after one week with music. Differences are before minus after, matching the book and Crunch; a negative difference means greater production after music. The slider adds the same hypothetical shift to every after value. This before/after comparison does not by itself establish causation.

Static starting view. JavaScript enables the controls; the data, explanation and downloads work without it.

Data and method

Rachel Webb, Mostly Harmless Statistics, §9.1; Example 2; table-00002. Exact book-provided example values; underlying original collection not independently documented. None; retain source values. Adapted from Rachel Webb, Mostly Harmless Statistics, XYZ Homework edition, CC BY-SA 4.0. Source collection and per-dataset original rights are not independently documented; do not describe these as newly verified research records.

Deterministic calculation from the displayed values; no random draw.

Values for the current experiment
WorkerBefore music (items/day)After music (items/day; what-if shift)Before minus after (items/day)
1610-4
2812-4
31091
4912-3
558-3
61213-1
7981
8710-3
Continue in XYZ Crunch · MH09A

Keep each pair together

Use Before−After throughout this worker comparison: Before is L1 and After is L2, so increased production corresponds to a negative difference and the left-tailed worker test in MH09A. Set Hypothesized Difference=0. Values are items produced in the recorded day, before music and after one week of music. The slider adds a hypothetical shift to every After value; it does not establish causation. The Crunch link opens the eight original pairs; export changed data as CSV separately. MH09A’s additional cafe links belong to a separate Thursday−Friday example. The Café difference list link here puts the eight Thursday−Friday differences in L1. Choose Confidence Intervals → T Interval (from Data), List=L1, Confidence Level=.95; Calculate. The section’s separate three-list link puts these differences in L3 instead; select the difference list supplied by the link you opened. Keep the worker test and cafe interval datasets and direction conventions separate.

  1. Select Test Type Paired T-Test. Set List 1 to Before (L1), List 2 to After (L2), Alternative Left-tailed (<), Alpha=.05; Run Test. Crunch computes L1−L2 and tests difference zero.
  • Dependent samples: Measurements are linked in pairs, such as repeated observations of the same individual or location. Notation: D=x₁−x₂. Source: §9.1.
  • Paired t test and interval: Use the mean and sample SD of differences, with the number of pairs as n. Notation: t=(D̄−μD)/(sD/√n); df=n−1. Source: §9.1.

The link opens the activity’s stated Crunch starting point. Confirm the panel, lists and settings in the steps above, and enter data only when those steps require it. Crunch links do not transfer what-if edits; export them separately as CSV.

Chapter 9: Hypothesis Tests and Confidence Intervals for Two Populations

Dependent samples or matched pairs, occur when the subjects are paired up, or matched in some way. Most often, this model is characterized by selection of a random sample where each member is observed under two different conditions, before/after some experiment, or subjects that are similar (matched) to each other are studied under two different conditions.

There are 3 types of hypothesis tests for comparing two dependent population means µ1 and µ2, where, µD is the expected difference of the matched pairs.

Table of the three hypothesis setups for a paired-means t-test: two-tailed with H0: μD = 0 and H1: μD ≠ 0, right-tailed with H1: μD > 0, and left-tailed with H1: μD < 0, each above a normal curve shaded in both tails, the right tail, or the left tail respectively.
Figure 9-1

Note: If each pair were equal to one another then the mean of the differences would be zero. We could also use this model to test with a magnitude of a difference, but we rarely cover that scenario, therefore we are usually test against the difference of zero.

The t-test for dependent samples is a statistical test for comparing the means from two dependent populations (or the difference between the means from two populations). The t-test is used when the differences are normally distributed. The samples also must be dependent.

Adapted from Mostly Harmless Statistics by Rachel Webb (Portland State University, https://mostlyharmlessstat.wixsite.com/webpage), © Rachel Webb, licensed under CC BY-SA 4.0. Changes were made. License: CC-BY-SA-4.0.

These eBooks are a prerelease and are not yet certified conformant with WCAG 2.1 AA or any other accessibility standard. Every page is built against an automated accessibility gate, and our target for the published editions is WCAG 2.2 Level AA. If something is unusable, please tell us.