Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
An Example: Graphing the Simple Linear Regression Equation on the Scatterplot for Predicting Calories from Fat
Go to Graphs on the Main Menu bar, Scatter, and Define. Put CALORIES in the box for the Y-Axis and FAT in the box for the X-Axis. Click OK. Once the graph appears in the Output Navigator, click it twice to go into Edit Mode. Go to Elements on the menu bar, Fit Line at Total. Click on Elements, Show Data Labels. Note: By convention, the dependent variable is on the y-axis and the independent variable is on the x-axis.
Using the Scatterplot to Predict the Number of Calories of a Burger with 28 Grams of Fat
a Y X
If b is positive, then Y increases with an increase in X . If b is negative, then Y decreases with an increase in X.
Interpreting Regression Coefficients: Intercept, a The value of the intercept, a, is the predicted value of Y when X = 0. It is only meaningful when 0 is a meaningful value for the variable X and data close to X = 0 have been collected. Based on the equation for a, we may note that a is defined so that when X = X, the predicted value of Y is Y i.e. ( X , Y ) lies on the regression line.
An Example: Using SPSS to Obtain the Linear Regression Equation for Predicting Calories from Fat using the Hamburg Data Set
Go to Analyze on the Main Menu bar, Regression, Linear. Put CALORIES in the box for the Dependent variable and FAT in the box for the Independent variable. To obtain the set of predicted Y values and their residuals, click Save. In the boxes labeled Predicted Values and Residuals, click the boxes next to Unstandardized. Click Continue, and OK. In the data window, you will see that two new variables, PRE_1 and RES_1, have been created which give predicted and residual calories for each hamburger.
An Example Continued: Writing the Regression Equation The regression equation may be obtained from the output in the Coefficients table.
The value of the slope, b = 13.71, tells us that a one gram increase in the fat content of a burger is associated with an increase of 13.71 calories, on average. The value of the intercept, a = 133.576, is not meaningful in this example because burgers with 0 grams of fat would be quite different from the burgers in this data set.
An Example Continued: Using the Regression Equation to Predict Calories from a Burger with 28 Grams of Fat
Fat 10 14 21 30 28
Cheese 0 1 0 1 1
zY rz X
Consider four data sets of X,Y pairs, each with the following identical set of summary statistics: X = 9.0, Y = 7.5, SX = 3.17, SY = 1.94, rXY = .82
Simple Linear Regression: When the Independent Variable is Dichotomous An Example: Predict the number of calories in a burger by whether or not the burger has cheese. Find the regression equation using SPSS Predict the calories for a burger with cheese. How else might we interpret this value? Predict the calories for a burger without cheese. How else might we interpret this value? Find and interpret the intercept, a. Find and interpret the slope, b.
350
The predicted calories for a burger without cheese is (110)(0) +350 = 350. Intuitively, this is the mean number of calories for burgers without cheese.
The intercept of the regression equation is 350, indicating that burgers without cheese are predicted to have 350 calories. Note that in this example, the value X=0 is meaningful and therefore, so is the intercept.