1. 学习
  2. /
  3. 课程
  4. /
  5. Introduction to Statistics in R

Connected

练习

Does sugar improve happiness?

A new column has been added to world_happiness called grams_sugar_per_day, which contains the average amount of sugar eaten per person per day in each country. In this exercise, you'll examine the effect of a country's average sugar consumption on its happiness score.

Both dplyr and ggplot2 libraries are loaded and world_happiness is available.

说明 1 / 共 2 个

undefined XP
    1
    2
  • Create a scatterplot showing the relationship between grams_sugar_per_day (on the x-axis) and happiness_score (on the y-axis).
  • Calculate the correlation between grams_sugar_per_day and happiness_score.