# A tibble: 6 × 2
league height
<chr> <dbl>
1 nba 74.8
2 nba 79.5
3 nba 75.9
4 nba 78.4
5 nba 76.0
6 nba 74.0
IMS, Ch. 7.1
Smith College
Feb 6, 2026
# A tibble: 6 × 2
league height
<chr> <dbl>
1 nba 74.8
2 nba 79.5
3 nba 75.9
4 nba 78.4
5 nba 76.0
6 nba 74.0
Thought experiment
Suppose that the government issued a tax rebate in the amount of $2000 to each American taxpayer.
income change?geom_point()help(babies)
Use a scatter plot to analyze the relationship between the height and mass of characters in the starwars data frame
Characterize the distribution
Now do the same thing, for the penguins
geom_boxplot()geom_density()color/fill aesthetic or facet_wrap()Aside: “ridgeline plots”
bwt) and first pregnancy (parity)cor()# A tibble: 4 × 5
set N `mean(x)` `mean(y)` `cor(x, y)`
<chr> <int> <dbl> <dbl> <dbl>
1 1 11 9 7.50 0.816
2 2 11 9 7.50 0.816
3 3 11 9 7.5 0.816
4 4 11 9 7.50 0.817
Note that correlation only measures the strength of a linear relationship
Always graph your data!
