Contains the weight of 10 mice. The question is whether the average weight of the mice differs from 25g.
A one sample 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("mice")A data frame with 10 rows and 2 columns (stored as a tibble).
mouse identifier, "M_1" to "M_10".
the mouse weight, in grams.
A simulated dataset for teaching the one-sample t-test.
mice2, the paired-samples companion data set.
Datanovia tutorial:
T-Test in R: One-Sample, Independent (Student & Welch) & Paired.
data(mice)
head(mice)
#> # A tibble: 6 × 2
#> name weight
#> <chr> <dbl>
#> 1 M_1 18.9
#> 2 M_2 19.5
#> 3 M_3 23.1
#> 4 M_4 20.1
#> 5 M_5 20.3
#> 6 M_6 23.4
# One-sample t-test: does the mean weight differ from 25 g?
t.test(mice$weight, mu = 25)
#>
#> One Sample t-test
#>
#> data: mice$weight
#> t = -8.1045, df = 9, p-value = 1.995e-05
#> alternative hypothesis: true mean is not equal to 25
#> 95 percent confidence interval:
#> 18.78346 21.49654
#> sample estimates:
#> mean of x
#> 20.14
#>