Hypothesis Tests for Slopes of Regression Lines (College Board AP® Statistics): Study Guide
t-test for slope of regression line
What is a t-test for the slope of a regression line?
- A t-test for the slope of a regression line is used to test whether the population slope, - , of the population least-squares regression line, - has changed - A random sample of - observations from the population, - with a sample least-squares regression line of - is used to try to prove the case 
 
What are the hypotheses for a t-test for a slope?
- The null hypothesis, - , is the assumption that the population slope has not changed - e.g. - The population slope has the fixed value - It is assumed to be correct, unless evidence proves otherwise 
 
 
- The alternative hypothesis, - , is how you think the population slope has changed - e.g. - or - or 
 
Examiner Tips and Tricks
When writing out your hypotheses, always fully define the symbol used for the population parameter in context, e.g. '... where  is the slope of the population least-squares regression line of all student weights against all student shoe sizes in the school'
What are the conditions for a t-test for a slope?
- When performing a t-test for a slope, you must show that it meets the following conditions: - The relationship between - and - must be linear - Look for randomness in a population residual plot 
 
- The standard deviation of the - -values (responses), - , cannot vary with - Check on a population residual plot that the lengths (vertical heights) of residuals stay roughly the same as - increases horizontally 
 
- The residuals are independent - by verifying that data is collected by random sampling 
- or random assignment (in an experiment) 
- and, if sampling without replacement, showing that the sample size is less than 10% of the population size 
 
- For a given value of - , the responses ( - -values) follow an approximate normal distribution - A population residual plot should show residuals evenly spread either side of the horizontal zero line 
- There should be more points in the inner horizontal band (either side of the zero line) and fewer points in the outer horizontal bands 
 
- If the sample size is - , the distribution of responses ( - -values) should have no strong skew and no outliers - Look at a population residual plot to see if there is a bias (skew) to one side of the horizontal zero line, and look for outliers 
- If the distribution does have a skew, then the sample size must be 
 
 
How do I calculate the standardized test statistic (t-value)?
- You need a measure of how far the sample slope is from the population slope - This is the standardized test statistic (in this case, called the t-value) 
 
- The t-value, for the slope is given by: - where - is the sample slope, - is the population slope under the null hypothesis - , and - is the standard error of the sample slope given by - where - is the sample size 
- and where 
- and 
 
 
- The t-value shows how many standard errors the sample slope is from the population slope 
Examiner Tips and Tricks
The formula for the standardized test statistic is given in the exam, , along with tables of parameters and standard errors.
You will need to apply this correctly to get the t-value.
How do I read output information on regression from a computer?
- The formulas for the standardized test statistic are complicated to use in practice - Computers are often used to calculate these quantities instead 
 
- You may be given computer output information from a sample, as follows: 
| Predictor | Coef | SE Coef | T | P | 
|---|---|---|---|---|
| Constant | 33.243 | 4.436 | 7.49 | 0.000 | 
| [x-variable name] | 1.1356 | 0.3421 | 3.32 | 0.004 | 
| S = 7.35829 | R-Sq = 35.2 % | R-Sq (adj) = 32.1 % | 
- The above computer output says - the sample least-squares regression line is - This gives the sample slope, - , needed for 
 
- the standard error of the sample slope, - , is 0.3421 - This gives the standard error, - , needed for 
- do not confuse - with - , which is an estimate for the standard deviation of population residuals (the standard error of the residuals) 
 
 
Examiner Tips and Tricks
Make sure you know how to find the slope of a sample least-squares regression line from any computer output given in the exam (do not use the row for the 'constant' term!).
How do I calculate the p-value?
- Work out the t-value (standardized test statistic) 
- Find the appropriate number of degrees of freedom ('dof') - For a t-test for a slope this is always - If - is known in - , then 
 
 
- Using the t-distribution table given to you: - find the row that corresponds to the dof 
- identify the t-value in the row that is closest to the calculated value 
- write down the value in the corresponding column header - this is the p-value 
 
 
- Note that the p-value from the t-table is for one tail - You need to double this value for a two-tail test 
 
How do I conclude a hypothesis test?
- Conclusions to a hypothesis test need to show two things: - a decision about the null hypothesis 
- an interpretation of this decision in the context of the question 
 
- To make the decision, compare the p-value to the significance level - If - then the null hypothesis should be rejected 
- If - then the null hypothesis should not be rejected 
 
- In a two-tailed test, remember to double the p-value and compare this to 
Examiner Tips and Tricks
Remember that the conclusion should be interpreted within the context of the question.
Use the same language in your conclusion that is used in the problem, e.g. 'The data provides sufficient evidence that the slope of the population least-squares regression line for all student weights against all student shoe sizes in the school has increased from ...'.
What are the steps for performing a t-test for a slope on a calculator?
- When using a calculator to conduct a t-test for a slope, you must still write down all steps of the hypothesis testing process: - State the null and alternative hypotheses and clearly define your parameter 
- Describe the test being used and show that the situation meets the conditions required 
- Calculate the t-value and the degrees of freedom 
- Calculate the p-value using your calculator - select a one-sample t-test and enter the relevant summary statistics or data to generate the p-value 
 
- Compare the p-value to the significance level 
- Write down the conclusion to the test and interpret it in the context of the problem 
 
Examiner Tips and Tricks
Even if you perform the one-sample t-test on your calculator, it is still important to show all of your working to demonstrate full understanding. Therefore you should still calculate the t-value and the degrees of freedom.
Worked Example
On an island with an inactive volcano, a local ecologist knows that ferns (a type of plant) grow taller the further they are away from the volcanic crater. The slope of the population regression line relating distance from the volcanic crater,  kilometers, to fern height, 
 centimeters, has a slope of 0.55 cm per km.
The ecologist suspects that the volcano may be becoming active and heating up the island, but does not know what affect this may have on fern heights relative to their distance from the volcanic crater. The ecologist takes a random sample of 26 ferns, measuring their distances from the volcanic crater and their heights, with the results from a computer analysis of the sample shown below.
| Predictor | Coef | SE Coef | T | P | 
|---|---|---|---|---|
| Constant | 33.243 | 4.436 | 7.49 | 0.000 | 
| Distance | 1.1356 | 0.3421 | 3.32 | 0.004 | 
| S = 7.35829 | R-Sq = 35.2 % | R-Sq (adj) = 32.1 % | 
Is there convincing statistical evidence to support the ecologist's suspicion that there has been a change in the slope of the population regression line, at a significance level of ? You may assume all conditions for inference are met.
Answer:
Define the population parameter, 
Let  be the slope of the population least-squares regression line relating distance from the volcanic crater, 
 kilometers, to fern height, 
 centimeters
Write the null and alternative hypotheses
This will be a two-tailed test as a change is suspected but an increase or a decrease is not specified
State the type of test being used and verify that the conditions for the test are met
The correct inference procedure is a t-test for the population slope at 
It is assumed in the question that all conditions for inference are met
Calculate the standardized test statistic, using  where 
, 
 (from the table) and 
 (from the table)
State the number of degrees of freedom (this is  for a t-test for a slope)
degrees of freedom = 26 - 2 = 24
Find the p-value, e.g. from the t-tables
Find the row corresponding to 24 degrees of freedom and identify the t-value that is closest to the calculated t-value of 1.71178...
closest t-value = 1.711
corresponding p-value is  
Double this probability because it is a two-tailed test
Compare the probability to the significance level and state the conclusion of the test
 is not rejected
Interpret the result in the context of the question
There is not sufficient evidence to support the ecologist's suspicion that the slope of the population least-squares regression line relating distance from the volcanic crater,  kilometers, to fern height, 
 centimeters, has changed from 0.55 cm per km
Unlock more, it's free!
Did this page help you?

