Sunteți pe pagina 1din 9

Performing simple linear regression in (SPSS)

When do we do simple linear regression?


We run simple linear regression when we want to access the relationship between
two variables.

Example Scenario
In a statistics course, we want to see if there is any relationship between study time
and scores in the mid-semester exam.

In this example, our null hypothesis is that there is no relationship between study
time and exam scores. Our alternative hypothesis is that the more time students
study, the higher the exam score.

In the data, the first column is exam scores and the second column is study time.
The dataset can be obtained here.
Before we perform the actual regression analysis, we can explore the relationship
with a scatter plot.
It appears that the more time students study, the higher the exam scores and the
relationship looks linear. We now perform the regression analysis to see if there is
an actual relationship between study time and exam scores. (We cannot make any
definite conclusion until we do an appropriate statistical analysis.

Step 1
Select "Analyze -> Regression -> Linear".
A new window pops out.
Step 2
from the list on the left; select the variable "Exam score" as "Dependent" and the
variable "Hours" as the "Independent(s)". Click "OK".
Step 3
The results now pop out in the "Output" window.
Step 4
We can now interpret the result.
From B in the third table, since the p-value is 0, the relationship between study
hours and exam scores is significant. From A in the second table, the correlation
coefficient, R, is 0.827. Therefore, we can conclude that study hours are positively
correlated with exam score and the relationship is very strong (R is positive and is
much closed to 1). From C in the last table, we can conclude that on average, for
every one hour a student study, he gets 2.391 more marks in the exam.

S-ar putea să vă placă și