Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

Simpson

Grade point averages of men and women participating in various sports-an illustration of Simpson's paradox


Description

Data for Example 1.18

Usage

Simpson

Format

A data frame/tibble with 100 observations on three variables

gpa

grade point average

sport

sport played (basketball, soccer, or track)

gender

athlete sex (male, female)

References

Kitchens, L. J. (2003) Basic Statistics and Data Analysis. Pacific Grove, CA: Brooks/Cole, a division of Thomson Learning.

Examples

boxplot(gpa ~ gender, data = Simpson, col = "violet")
boxplot(gpa ~ sport, data = Simpson, col = "lightgreen")
## Not run: 
library(ggplot2)
ggplot2::ggplot(data = Simpson, aes(x = gender, y = gpa, fill = gender)) +
           geom_boxplot() + 
           facet_grid(.~sport) + 
           theme_bw()

## End(Not run)

BSDA

Basic Statistics and Data Analysis

v1.2.0
GPL (>= 2)
Authors
Alan T. Arnholt [aut, cre], Ben Evans [aut]
Initial release
2017-07-29

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.