Is California Warming?
is california warming? 7
Assignment 6 - Hypothesis Testing
Student’s t test is commonly used to compare a single sample mean
to an expected value of the population mean. When population
statistics are not known, the sample standard deviation s is you
est and only estimate of s for the population from which it has been
taken. You can still use the 95% confidence interval of the mean,
estimated from the sample standard deviation, and the t statistic de-
scribed in class to predict the range around an expected value of µ
within which 95% of the means of samples of size n taken from that
population will occur. Here too, once the sample mean lies outside
the 95% confidence interval, the probability of it being from a popu-
lation with a mean of µexpected is less than 0.05.
Expressed as a formula, if the ratio t = X�µexpecteds/pn is less than the
critical 5% value of �t or greater than +t, then the sample mean is
considered to have come from a population with a mean significantly
different to µexpected.
The appropriate critical value of t for a sample is easily found in
tables of this statistic that are in most statistical texts or online. It
depends on the probability level, the number of degrees of freedom,
and whether the test is one- or two-tailed:
Probability level We use a 5% probability level, which is the probabil-
ity than many researchers use as a standard "statistically signifi-
cant level."
Degrees of freedom If you have a sample of size n and the mean of the
sample is a specified value, then all of the data within the sample
except one are free to be any number at all, but the final one is
fixed because the sum of the data in the sample, divided by n
must equal the mean. For a one-sample t test, if your sample size
is n, then you need to use the t value that has n � 1 degrees of
freedom.
One-tailed and two-tailed tests Our alternative hypothesis does not
specify anything other than "The mean of the population from
which the sample has been drawn is different to an expected
value." Therefore, these are two-tailed hypotheses because nothing
is specified about the direction of the difference. The null hypothe-
sis could be rejected by a difference in either a positive or negative
direction. Sometimes, however, you may have an alternative hy-
pothesis that specifies a direction. For instance, "The mean of the
population from which the sample has been taken is greater than
an expected value." Or "The mean of the population from which
the sample A has been taken is less than the mean of the pop-
is california warming? 8
ulation from which sample B has been taken." These are called
one-tailed hypotheses.
If you have an alternative hypothesis that is directional, the null
hypothesis will not just be one of no difference. For instance, if the
alternative hypothesis states that the mean of the population from
which the sample has been taken will be less than an expected
value, then the null hypothesis should state, "The mean of the pop-
ulation from which the sample has been taken will be no different
to, or more, than the expected value."
You need to be cautious, however, because a directional hypothesis
will affect the location of the region where the most extreme 5% of
outcomes will occur. For any two-tailed hypothesis the 5% rejec-
tion region is split equally into two areas of 2.5% on the negative
and positive sides of µ.
Student’s t test may also be used to test for the significance of the
slope of a regression line. We will do this in our next assignment. In
preparation:
1. State the null and alternative two-tailed hypotheses for our analy-
sis of the California temperature trend.
2. The degrees of freedom for the residual (e
or) variation in a re-
gression analysis are always n � 2. In this case, what is the critical
t value for a two-tailed test using the 5% probability level?
3. State the condition for rejecting the null hypothesis. In othe
words, would your calculated t statistic need to be greater or less
than the critical value?
For this assignment, include on a single doc: For (1) and (3) short
answers of a few sentences and for (2) the numeric value.
Assignment 1 - Collecting and Displaying Data
Assignment 4 - Data, Populations, and Statistics
Assignment 5 - Linear Regression
Assignment 6 - Hypothesis Testing
Assignment 7 - Testing the Significance of the Slope of the Regression