Question 5.19 (Global warming, Part I)

Heather Geiger

Question main text

Is there strong evidence of global warming?

Let’s consider a small scale example, comparing how temperatures have changed in the US from 1968 to 2008.

The daily high temperature reading on January 1 was collected in 1968 and 2008 for 51 randomly selected locations in the continental US. Then the difference between the two readings (temperature in 2008 - temperature in 1968) was calculated for each of the 51 different locations.

The average of these 51 values was 1.1 degrees with a standard deviation of 4.9 degrees.

We are interested in determining whether these data provide strong evidence of temperature warming in the continental US.

Question parts

A - Are the observations independent?

The observations within each pair are obviously not independent (the observation in 1968 is in the same location as the one in 2008).

However, if we take each case as the difference value rather than the two individual observations, then all of our cases should be independent here.

B - Writing hypotheses

Based on the way the question is written, we can test based on a one-tailed hypothesis, as it specifically states we are interested in evidence for temperature “warming”, not temperature “change” or “warming or cooling”.

Let’s compare what our hypotheses would be for a one-tailed vs. a two-tailed test.

Here \(\mu_{diff}\) defined as temperature in 2008 - temperature in 1968.

One-tailed

Null hypothesis: \(\mu_{diff}\) \(\leq\) 0 (http://www.cs.uni.edu/~campbell/stat/inf4.html) OR \(\mu_{diff}\) = 0 (textbook).

Alternative hypothesis: \(\mu_{diff}\) > 0.

I got two different answers from different sources on what the null hypothesis should be for a one-tailed test.

The textbook states that the null hypothesis for a one-tailed test in this case would be that the temperature at these locations in 2008 is the same as it was in 1968.

Another source said instead that the null hypothesis would include both the temperature being the same in both years, as well as the temperature in 2008 being cooler than it was in 1968.

The alternative hypothesis is that the temperature in 2008 is warmer than 1968.

Two-tailed

Null hypothesis: \(\mu_{diff}\) = 0.

Alternative hypothesis: \(\mu_{diff}\) != 0.

For a two-tailed test, the null hypothesis is that the temperature at these locations in 2008 is not different than it was in 1968.

The alternative hypothesis is that it is different, with 2008 systematically being either warmer or cooler than 1968.

C - Checking conditions for inference

  1. Are the observations independent?

The cases should represent less than 10% of the population if we are going to assume they are independent.

Defining each location as a case, we satisfy this requirement.

Even requiring that locations be a certain distance apart, 51 locations across the very large landmass of the United States means our sample represents a small amount of the “population” of all possible locations we could have sampled.

  1. Sample size >= 30

Yes (n=51).

  1. Sample (and thus we assume population) is close to normally distributed.

We are not given the distribution, so we don’t actually know that we have met this condition.

However, this condition becomes less important as the sample size increases.

With n=51, we would be OK with proceeding with up to a moderately skewed distribution anyway.

D - Calculating the p-value

sample_mean <- 1.1
sample_sd <- 4.9
sample_n <- 51

standard_error <- sample_sd/sqrt(sample_n)
t_statistic <- sample_mean/standard_error
one_tailed_p_value <- 1 - pt(t_statistic,sample_n - 1)

signif(one_tailed_p_value,3)
## [1] 0.0576
signif(one_tailed_p_value*2,4)
## [1] 0.1152

The p-value is 0.0576 using a one-tailed test or 0.1152 using a two-tailed test.

E - Conclusions based on the p-value

The p-value is above the most lenient alpha we’d want to use (a = .05) even using a one-tailed hypothesis test.

We therefore conclude that there is not enough evidence based on this data to suggest that the temperature in the United States in 2008 is warmer than 1968.

F - Type of error possible

We may have made a type II error, aka a false negative error.

In other words, 2008 might actually be warmer than 1968, but we would have failed to detect it based on our data.

G - Comparing t-test to confidence interval

Based on the results of this hypothesis test, we would expect a confidence interval around our mean of the differences to include 0.

The idea is that the hypothesis test comes out significant when the null hypothesis does not fall in our confidence interval.

Since our test was not significant, we can conclude that 0 was in our confidence interval.

Let’s check the numbers as well.

sample_mean <- 1.1
sample_sd <- 4.9
sample_n <- 51

standard_error <- sample_sd/sqrt(sample_n)
t_for_95percent_interval <- -1*qt(.025,sample_n - 1)

min_ci <- sample_mean - (t_for_95percent_interval*standard_error)
max_ci <- sample_mean + (t_for_95percent_interval*standard_error)

min_ci
## [1] -0.2781472
max_ci
## [1] 2.478147