contains the weight of 10 mice before and after the treatment.
A paired-samples t-test can be performed to answer to this question.
It is the data set used in the Datanovia tutorial “T-Test in R: One-Sample, Independent (Student & Welch) & Paired” (https://www.datanovia.com/learn/biostatistics/two-groups/t-test-in-r).
data("mice2")A data frame with 10 rows and 3 columns.
mouse identifier (1 to 10).
the mouse weight before the treatment.
the mouse weight after the treatment.
A simulated dataset for teaching the paired-samples t-test.
mice, the one-sample companion data set.
Datanovia tutorial:
T-Test in R: One-Sample, Independent (Student & Welch) & Paired.
data(mice2)
head(mice2)
#> id before after
#> 1 1 187.2 429.5
#> 2 2 194.2 404.4
#> 3 3 231.7 405.6
#> 4 4 200.5 397.2
#> 5 5 201.7 377.9
#> 6 6 235.0 445.8
# Paired-samples t-test: did the treatment change the weight?
t.test(mice2$before, mice2$after, paired = TRUE)
#>
#> Paired t-test
#>
#> data: mice2$before and mice2$after
#> t = -25.546, df = 9, p-value = 1.039e-09
#> alternative hypothesis: true mean difference is not equal to 0
#> 95 percent confidence interval:
#> -217.1442 -181.8158
#> sample estimates:
#> mean difference
#> -199.48
#>