Inference for Regression Using Technology for AP Statistics (page 2)
Practice problems for these concepts can be found at:
- Inference for Regression Multiple Choice Practice Problems for AP Statistics
- Inference for Regression Free Response Practice Problems for AP Statistics
- Inference for Regression Review Problems for AP Statistics
- Inference for Regression Rapid Review for AP Statistics
If you had to do them from the raw data, the computations involved in doing inference for the slope of a regression line would be daunting.
For example, how would you like to compute
Fortunately, you probably will never have to do this by hand, but instead can rely on computer output you are given, or you will be able to use your calculator to do the computations.
Consider the following data that were gathered by counting the number of cricket chirps in 15 seconds and noting the temperature.
We want to use technology to test the hypothesis that the slope of the regression line is 0 and to construct a confidence interval for the true slope of the regression line.
First let us look at the Minitab regression output for this data.
You should be able to read most of this table, but you are not responsible for all of it. You see the following table entries:
- The regression equation, Temp = 44.0 + 0.993 Number, is the Least Squares Regression Line (LSRL) for predicting temperature from the number of cricket chirps.
- Under "Predictor" are the y-intercept and explanatory variable of the regression equation, called "Constant" and "Number" in this example.
- Under "Coef " are the values of the "Constant" (which equals the y-intercept, the a in = a + bx; here, a = 44.013) and the slope of the regression line (which is the coefficient of "Number" in this example, the b in = a + bx; here, b = 0.99340).
- For the purposes of this course, we are not concerned with the "Stdev," "t-ratio," or "p" for "Constant" (the last three entries in the first line of printout—only the "44.013" is meaningful for us).
- "Stdev" of "Number" is the standard error of the slope (what we have called sb, the variability of the estimates of the slope of the regression line, which equals here sb = 0.06523); "t-ratio" is the value of the t-test statistic (t = , df = n – 2; here, t = = 15.23); and P is the P-value associated with the test statistic assuming a two-sided test (here, P = 0.000; if you were doing a one-sided test, you would need to divide the given P-value by 2).
- s is the standard error of the residuals (which is the variability of the vertical distances of the y-values from the regression line; ; (here, s = 1.538.)
- "R-sq" is the coefficient of determination (or, r2; here R-sq = 95.9% 95.9% of the variation in temperature that is explained by the regression on the number of chirps in 15 seconds; note that, here, r = = 0.979—it's positive since b = 0.9934 is positive). You don't need to worry about "R-sq(adj)."
All of the mechanics needed to do a t-test for the slope of a regression line are contained in this printout. You need only to quote the appropriate values in your write-up. Thus, for the problem given above, we see that t = 15.23 P-value = 0.000.
A confidence interval for the slope of a regression line follows the same pattern as all confidence intervals (estimate ± (critical value) × (standard error)): b ± t*sb , based on n – 2 degrees of freedom. A 99% confidence interval for the slope in this situation (df = 10 t* = 3.169 from Table B) is 0.9934 ± 3.169(0.06523) = (0.787, 1.200). (Note: The newest software for the TI-84 has a LinRegTInt built in. The TI-83/84 and earlier versions of the TI-84 do not have this program. The program requires that the data be available in lists and, unlike other confidence intervals in the STAT TESTS menu, there is no option to provide Stats rather than Data.)
To use the calculator to do the regression, enter the data in, say, L1 and L2. Then go to STAT TESTS LinRegTTest. Enter the data as requested (response variable in the Ylist:). Assuming the alternative is two sided (HA : β ≠ 0), choose β and ρ ≠ 0. Then Calculate. You will get the following two screens of data:
This contains all of the information in the computer printout except sb. It does give the number of degrees of freedom, which Mini- Tab does not, as well as greater accuracy. Note that the calculator lumps together the test for both the slope (β) and the correlation coefficient (ρ) because, as we noted earlier, the test statistics are the same for both.
If you have to do a confidence interval using the calculator and do not have a TI-84 with the LinRegTInt function, you first need to determine sb. Because you know that , it follows that , which agrees with the standard error of the slope ("St Dev" of "Number") given in the computer printout.
A 95% confidence interval for the slope of the regression line for predicting temperature from the number of chirps per minute is then given by 0.9934 ± 2.228(0.0652) = (0.848, 1.139). t* = 2.228 is based on C = 0.95 and df = 12 – 2 = 10. Using LinRegTInt, if you have it, results in the following (note that the "s" given in the printout is the standard error of the residuals, not the standard error of the slope):
Practice problems for these concepts can be found at:
- Kindergarten Sight Words List
- First Grade Sight Words List
- 10 Fun Activities for Children with Autism
- Definitions of Social Studies
- Grammar Lesson: Complete and Simple Predicates
- Child Development Theories
- Signs Your Child Might Have Asperger's Syndrome
- How to Practice Preschool Letter and Name Writing
- Social Cognitive Theory
- Theories of Learning