- Suppose we are examining the distribution of weights, among males and females from a small town. The growing town has 20,000 people, 10,000 woman and 10,000 men. Their heights(inches) and weights(lbs) are given by the code below:
set.seed(123)
data_male = data.frame(Male_inch = rnorm(10000, mean=72, sd=4),
Male_lbs = rnorm(10000, mean=180, sd=4))
data_male = format(data_male, digits = 2)
colnames(data_male) = c("Height", "Weight")
data_female = data.frame(Female_inch = rnorm(10000, mean=60, sd=2),
Female_lbs = rnorm(10000, mean=130, sd=2))
data_female= format(data_female, digits = 2)
colnames(data_female) = c("Height", "Weight")