Learn R Programming

datarium (version 0.2.0)

genderweight: Weight Data By Gender for Two-Samples Mean Test

Description

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

Usage

data("genderweight")

Arguments

Format

A data frame with 40 rows and 3 columns (stored as a tibble).

id

participant identifier (1 to 40).

group

the participant's sex, "F" (female) or "M" (male).

weight

the participant's body weight.

See Also

Examples

Run this code
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