diff --git a/EDA.qmd b/EDA.qmd index 720d271..725349d 100644 --- a/EDA.qmd +++ b/EDA.qmd @@ -372,7 +372,7 @@ ggplot(diamonds, aes(x = price, y = after_stat(density))) + geom_freqpoly(aes(color = cut), binwidth = 500, linewidth = 0.75) ``` -Note that we're mapping the density the `y`, but since `density` is not a variable in the `diamonds` dataset, we need to first calculate it. +Note that we're mapping the density to `y`, but since `density` is not a variable in the `diamonds` dataset, we need to first calculate it. We use the `after_stat()` function to do so. There's something rather surprising about this plot - it appears that fair diamonds (the lowest quality) have the highest average price!