FES 720 Introduction to R

LAB: Testing Associations

This is the lab associated with the lecture and lesson on Testing Associations in R.

Please upload your final completed lab on the Assignments page in Canvas, as per the instructions below.

You are welcome and expected to ask for help from the instructors if you get stuck: Please also come to the R Bootcamp on Friday—there is coffee and snacks!


A. Pirates and global warming

Global warming is the gradual increase in the mean temperature of the Earth’s atmosphere, as a result of an increase in carbon dioxide and other gas emissions.

A pirate is a person who attacks and robs ships at sea.

According to data found on multiple websites, as the number of pirates has been decreasing, the average global temperature has increased:

This graph shows the negative correlation between global temperatures and number of pirates … This MUST mean that in order to fix the global warming crisis, we should all become pirates!

  1. This graph is an example of Not-Best Practice. Plot a much improved version of the graph.

  2. Test whether there is a relationship between pirates and global temperatures.

  3. What test did you run and why?

Data:

pirate <- data.frame(Temp = c(14.2, 14.4, 14.55, 14.8, 15.25, 15.5, 15.85),
                     Npirates = c(35000, 45000, 20000, 15000, 5000, 400, 17),
                     Year = c(1820, 1860, 1880, 1920, 1940, 1980, 2000))

How to write up your answers

Please check the help page for a reminder, if you need to.


Updated: 2017-11-08