ggplot(penguins, mapping = aes(x = body_mass_g)) +
geom_histogram(binwidth=200, col="white", fill = "seagreen")
Chapter 11
species
penguins |>
group_by(species) |>
summarize( mean = mean(body_mass_g, na.rm = TRUE),
sd = sd(body_mass_g, na.rm = TRUE)
)
# A tibble: 3 × 3
species mean sd
<fct> <dbl> <dbl>
1 Adelie 3701. 459.
2 Chinstrap 3733. 384.
3 Gentoo 5076. 504.
Question: Are the mean body weights of Adelie and Chinstraps really different? Or is the difference just due to random variation?
Chapter 5: sample mean is (hopefully) an approxmiation of the population mean
Clearly the sample means are different (3701 vs. 3733)
But are the population means different?
Mean body weight of Adelie and Chinstrap penguins are the same.
Mean body weight of Adelie and Chinstrap penguins are different.
If you flip a fair coin 100 times, how many times will it come up heads?
Textbook Section 11.1