Learn R Programming

datarium (version 0.2.0)

mice: Mice Weight Data for One Sample Mean Test

Description

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).

Usage

data("mice")

Arguments

Format

A data frame with 10 rows and 2 columns (stored as a tibble).

name

mouse identifier, "M_1" to "M_10".

weight

the mouse weight, in grams.

See Also

mice2, the paired-samples companion data set. Datanovia tutorial: T-Test in R: One-Sample, Independent (Student & Welch) & Paired.

Examples

Run this code
data(mice)
head(mice)

# One-sample t-test: does the mean weight differ from 25 g?
t.test(mice$weight, mu = 25)

Run the code above in your browser using DataLab