TA10-1
Most statistical packages give the statistic and -value for testing against as part of the standard regression output. See the Chapter 2 Appendix for how to obtain those statistics.
Regression is somewhat unusual in statistics, because checking conditions for inference requires the regression be done first (so you have residuals). Check the conditions listed below before using any inference results:
Inference for the Regression Slope
The Regression option in the Data Analysis menu gives both the hypothesis test results and 95% confidence intervals for the slope and intercept (not generally of interest). Use this menu to also request storage of residuals and fitted values.
If you have column headings in the first row, be sure to check the Labels box in the regression dialog.
For confidence intervals at other than 95% confidence, check the box and change from 95%.
For more information, see the Excel Video Technology Manuals: CI for Slope, and Inference and CI for Slope.
Use Analyze ➔ Fit Y by , then choose “Fit Line” from the red triangle for the basic regression, statistics, and -values (see Chapter 2 Appendix).
To obtain a 95% confidence interval for the intercept and slope, place the cursor in the Parameter Estimates output, right-click and then go to “Columns” and then check Lower 95% and Upper 95%.
For more information, see the JMP Video Technology Manual, Linear Regression: Fitted Line Plots, Residual Plots, and Prediction; and Inference and CI for Slope.
The statistics and -values are given on the basic Stat ➔ Regression ➔ Regression ➔ Fit Regression Model output.
To obtain a confidence interval for the slope in addition to the test results, click “Options” and enter the correct level in the labeled box. Then click “Results” and change the drop-down from “Simple tables” to “Expanded tables.”
For more information, see the Minitab Video Technology Manual, Linear Regression: Inference for Slope.
TA10-2
The basic output from Analyze ➔ Regression ➔ Linear includes the statistics and -values. To obtain the confidence interval for the slope, click “Statistics” and check the box. If you need to, enter a new confidence level.
For more information, see the SPSS Video Technology Manual, CI for Slope and Inference and CI for Slope.
The basic output from Statistics ➔ Regression ➔ Simple Linear includes the statistics and -values. To obtain the confidence interval for the slope, enter the confidence level in the labeled box.
For more information (and an example), see the Crunchit! Help Video, Simple Linear Regression.
For the hypothesis test, press , arrow to Tests, and select the “LinRegTTest” option (the number/letter varies with the model). Specify the data lists, the form of the alternate hypothesis, and a [Y-VARS] variable to store the equation (press for Y1). Select “Calculate.”
TI-84 calculators can calculate the confidence interval for the slope using G:LinRegTInt. Enter the data lists, the confidence level, and a [Y-VARS] to store the regression equation (if desired), and press “Calculate.”
For more information, see the TI Video Technology Manual, CI for Slope and Inference and CI for Slope.
The basic regression command is of the form
> model <-lm(y~x)
To obtain the t statistics and P-values, follow this with the command
> summary(model)
For the confidence intervals, use the command
> confint(model)
For more information, see the R Video Technology Manual, Linear Regression: Inference for the Slope.
Confidence and Prediction Intervals for Responses
Excel has no built-in function to calculate these intervals.
TA10-3
If the value of the explanatory variable () of interest is in the data set, you need do nothing. If not, enter the value of interest below the bottom of the data spreadsheet with nothing for the response (that value will be ignored when the regression is calculated).
For these intervals, click the red triangle next to Linear Fit just above the results of the regression. To see the effect of distance from the mean value on confidence and prediction intervals, click the red triangle next to “Linear fit” and click “Confid Shaded Fit” for the confidence band for fits or “Confid Shaded Indiv” for the prediction interval band.
If needed, change the level (1 – Confidence) using Set level.
For a confidence interval for a response, click on “Mean Confidence Limit Formula.”
For a Prediction Interval, click on “Indiv Confidence Limit Formula.”
JMP will calculate these intervals for every data point and add two columns to the spreadsheet.
For a video that shows how to use JMP with an example, see the JMP Video Technology Manual, Prediction and Confidence Intervals for .
After a regression has been fit, click Stat ➔ Regression ➔ Regression ➔ Predict.
Use the drop-down to select “Enter individual values” and enter the value(s) for the predictor variable in the spaces below, or select “Enter columns of values” and then specify the column name.
Use “Options” to change the confidence level.
To see the effect of distance from the mean x value on confidence and prediction intervals, use Stat ➔ Regression ➔ Fitted Line Plot. Enter the variables and click “Options.” Check the box(es) for “Display Confidence Interval” and/or “Display Prediction Interval.”
For a video that shows how to use Minitab with an example, see the Minitab Video Technology Manual, Prediction and Confidence Intervals for .
If the value of the explanatory variable () of interest is in the data set, you need do nothing. If not, enter that value at the bottom of the data spreadsheet with nothing for the response (that will be ignored when the regression is calculated).
Before clicking “OK” to compute the regression, click “Save.” Check the box for either Prediction Intervals Mean (for the confidence interval) or Prediction Intervals Individual. Change the confidence level if needed, then click “Continue.”
For a video that shows how to use SPSS with an example, see the SPSS Video Technology Manual, Prediction and Confidence Intervals for .
Crunchit! only calculates Prediction Intervals for a single response. To obtain these intervals, enter the value of the predictor () variable in the box labeled “Predict” along with the confidence level for the prediction interval.
TI calculators do not have this capability as a built-in function.
For a video that shows how to do these calculators with a downloadable program (requires a connect cable) with an example, see the TI-83/-84 Video Technology Manual, Prediction and Confidence Intervals for .
TA10-4
To obtain these intervals use a command of the form where “prediction” can be replaced with “confidence”:
> predict(model,data.frame(x=10),interval=“prediction”)
These default to 95%. To change that, add “level=0.90” (for example) to that command.
For a video that shows how to use R with an example, see the R Video Technology Manual, Linear Regression: Prediction Intervals and Confidence Intervals for the Mean Response.