Tools › Statistics › Hypothesis Tests › Hypothesis Tests › Example

Student's sleep data: paired, Welch and pooled t tests of two soporific drugs

ToolHypothesis Tests
SourceStudent (1908). "The Probable Error of a Mean." Biometrika, Vol. 6, No. 1, pp. 1–25. Table of the additional hours of sleep of ten patients under two drugs, as printed by R's t.test() on datasets::sleep.
LevelUndergraduate

Problem

Ten patients recorded their additional hours of sleep under two soporific drugs. Test at α = 0.05 whether the drugs differ in effect, treating the ten pairs as paired differences, and compare with the two-sample test on the two groups (Welch and pooled variances).

Inputs to Enter

  • Group 1: 0.7 −1.6 −0.2 −1.2 −0.1 3.4 3.7 0.8 0.0 2.0
  • Group 2: 1.9 0.8 1.1 0.1 −0.1 4.4 5.5 1.6 4.6 3.4
  • Test: Paired t, two-sided, α = 0.05, null difference 0
Open the Hypothesis Tests tool (loaded with this example)

Answers

  • Paired t = −4.0621, df = 9, p = 0.002833, 95 % CI of the mean difference −2.4599 to −0.7001
  • Two-sample Welch t = −1.8608, df = 17.776, p = 0.07939, 95 % CI −3.3655 to 0.2055
  • Two-sample pooled t = −1.8608, df = 18, p = 0.07919
  • One-sample t of group 2 against 0: t = 3.6799, p = 0.005076, 95 % CI 0.8977 to 3.7623

Notes

The tool's default inputs are the sleep data as a paired t test; press Submit. Choose Two-sample t on the same two rows for the Welch and pooled values; every number matches R's t.test() output (test_hypothesis_tests.php).

More Examples for This Tool