t-test (paired)

MinutePlot® and R on the same data. MinutePlot version 1.0.0; R 4.5.2.

Dataset

  • sleep — Extra hours of sleep under two drugs for the same 10 patients (R: datasets::sleep; Student 1908).
  • Data format for MinutePlot: sleep_minuteplot.csv — arranged exactly as the app’s data template for this test expects (paste it into the app).
  • Data format for R: sleep_r.csv — the long-format file the R script reads (keep it in the script’s folder).
  • R built-in: the script loads sleep with data().

Setup

In MinutePlot:

  • Workbench → t-test (paired) → paste sleep_minuteplot.csv (the two conditions as rows; column rk is patient k in both rows).
  • α = 0.05Confirm and Analyze.

In R:

  • Base R only; then run ttest_paired_sleep.R top to bottom (source it, or paste it into the console) with the R data file in the same folder.
  • R 4.5.2 and the package versions in the page header; each script prints the versions it runs under.

The analysis:

  • Paired t-test: group 1 vs group 2 (10 pairs), two-sided, α = 0.05.
  • MinutePlot’s 95 % CI column is Hedges’ g with its CI (the app reports effect sizes); R’s is the CI of the mean difference.

Side-by-side results

t, df, p and 95 % confidence interval

MinutePlot®

Testtdfp95 % CI (R: mean difference; MinutePlot: Hedges’ g)
Paired (group 1 vs 2)-4.062190.0028g = -1.174 [-1.980, -0.369]

R

Testtdfp95 % CI (R: mean difference; MinutePlot: Hedges’ g)
Paired (group 1 vs 2)-4.062190.0028[-2.460, -0.700]

R values: verified in R 4.5.2 (see the verdict).

Verdict

Paired: t = −4.0621, df = 9, p = 0.0028 in both -- MinutePlot agrees with R’s printed values. No letters in this entry.

R script

ttest_paired_sleep.R — each script loads its data, prints its versions and the R-side tables shown above, in page order; no plotting.

R values verified in R 4.5.2 (emmeans 2.0.4, multcomp 1.4-32, multcompView 0.1-12, ez 4.5.0, Hmisc 5.3.0, pls 2.9.0, drc 3.0-1, car 3.1-5) on 16–17 September 2026.