Linear Regression #
Linear regression is a statistical method used to study the relationship between two or more variables. In simple linear regression, we explore the linear relationship between an independent variable (X) and a dependent variable (Y). The model estimates the regression coefficients using the least squares method, which are then used to predict the value of the dependent variable.
Simple Linear Regression Analysis #
The core of simple linear regression analysis is modeling through the linear equation ( Y = \beta_0 + \beta_1 X + \epsilon ), where:
- ( Y ) is the dependent variable (the variable to be predicted)
- ( X ) is the independent variable (the variable used to predict the dependent variable)
- ( \beta_0 ) is the intercept, representing the value of ( Y ) when ( X = 0 )
- ( \beta_1 ) is the regression coefficient, representing the change in ( Y ) when ( X ) increases by one unit
- ( \epsilon ) is the error term
Practical Operation: Steps in SPSS #
Suppose we have a dataset containing the independent variable Hours_Studied (study hours) and the dependent variable Test_Score (test scores). We wish to build a linear regression model to predict the test scores.
Steps:
Step 1: Data Preparation
- Open SPSS and go to Data View.
- Enter the data, with variables as follows:
Hours_Studied(independent variable): Study hoursTest_Score(dependent variable): Test scores Example data:
Hours_Studied Test_Score 1 55 2 60 3 65 4 70 5 75 6 80 7 85
Step 2: Conduct Regression Analysis
- Click on the Analyze menu, select Regression, and then click Linear.
- In the pop-up dialog:
- Move Test_Score (dependent variable) to the Dependent box.
- Move Hours_Studied (independent variable) to the Independent(s) box.
- If desired, click the Statistics button to select options such as Descriptive Statistics and Confidence Intervals to obtain more analysis information.
- Click OK to run the regression analysis in SPSS, and the output results will be generated.
Step 3: View and Interpret the Output Results
The key results in the SPSS output include:
-
Model Summary: This table provides the goodness of fit for the regression model. Important is R², which tells us the percentage of variance in the dependent variable explained by the independent variable.
Example output:
Model R R² Adjusted R² Std. Error of the Estimate 1 0.98 0.96 0.95 2.00 Here, R² = 0.96 means that 96% of the variance in the test scores can be explained by study hours.
-
ANOVA Table: This table tests the overall significance of the regression model. If the Sig. value is less than 0.05, the model is statistically significant.
Example output:
Model Sum of Squares df Mean Square F Sig. 1 300.00 1 300.00 50.00 0.000 Sig. = 0.000 indicates that the model is statistically significant.
-
Coefficients Table: This table provides the coefficients of the regression equation, including the intercept and slope.
Example output:
Predictor B Std. Error Beta t Sig. (Constant) 50.00 2.00 25.00 0.000 Hours Studied 5.00 0.50 0.98 10.00 0.000 - Intercept: 50.00, meaning that if a student studies for 0 hours, the predicted test score is 50.
- Slope: 5.00, meaning that for every additional hour of study, the test score increases by 5 points.
Step 4: Make Predictions Using the Regression Equation
Based on the regression equation:
[ \text{Test Score} = 50.00 + 5.00 \times (\text{Hours Studied}) ]
we can predict test scores for different study hours.
For example, if a student studies for 8 hours:
[ \text{Test Score} = 50.00 + 5.00 \times 8 = 90 ]
The predicted test score for this student is 90.
Summary
- To perform simple linear regression in SPSS, first prepare the data.
- Use Analyze → Regression → Linear to run the regression analysis.
- Focus on the R², ANOVA Table, and Coefficients Table in the output.
- Use the regression equation to make predictions.
Through these steps, we can perform simple linear regression analysis in SPSS and use the model for predictions.
#SPSSLast modified on 2024-01-06