Aan de slagGa gratis aan de slag

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.

Deze oefening maakt deel uit van de cursus

Introduction to Statistics in R

Cursus bekijken

Praktische interactieve oefening

Probeer deze oefening eens door deze voorbeeldcode in te vullen.

# Scatterplot of grams_sugar_per_day and happiness_score
___

# Correlation between grams_sugar_per_day and happiness_score
___
Code bewerken en uitvoeren