powered by
Contains the weights by sex (M for male; F for female). The question is whether the average women's weight differs from the average men's weight?
A two-samples independent 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("genderweight")
A data frame with 40 rows and 3 columns (stored as a tibble).
participant identifier (1 to 40).
the participant's sex, "F" (female) or "M" (male).
the participant's body weight.
Datanovia tutorial: T-Test in R: One-Sample, Independent (Student & Welch) & Paired.
data(genderweight) head(genderweight) # Two-samples independent t-test: do mean weights differ by sex? t.test(weight ~ group, data = genderweight)
Run the code above in your browser using DataLab