Q1 Import data.
Hint: The data file is posted in Moodle. See Module 5. It’s named as “gapminder.csv”.
Q2 Create a scatter plot to visualize the relationship between life expectancy and GDP per capita.
Hint: For the code, refer to one of our textbooks, Data Visualization with R: Chapter 4.2. Map lifeExp to the y-axis and gdpPercap to the x-axis.
Q3 Calculate and interpret the Pearson correlation coefficient.
Hint: Interpret both the direction and the strength of the correlation
Q4 Based on your analysis in Q2 and Q3, can you conclude that the standard of living (measured by GDP per capita) causes life expectancy to rise? Why or why not?
Q5 You suspect that there may be other variables that are asociated with life expectancy. Create a correlation plot.
Hint: For the code, refer to one of our textbooks, Data Visualization with R: Chapter 8.1.
Q6 List any variable with a strong or moderate positive association with life expectancy, if any.
Q7 Your classmate argues that the world has gotten better in the recent past and people tend to live longer each year. Would you agree? Argue your case based on the correlation coefficient between life expectancy and year.
Hint: A correct answer must include all of the following: 1) direction and strength of the correlation coefficient, and 2) linear versus non-linear relationship.
Q8 Hide the messages, but display the code and its results on the webpage.
Hint: Use message, echo and results in the chunk options. Refer to the RMarkdown Reference Guide.
Q9 Display the title and your name correctly at the top of the webpage.
Q10 Use the correct slug.