Stats-Simple Linear Regression
Stats-Simple Linear Regression
www.kent.ac.uk/student-learning-advisory-service
1
Linear Regression
• We will introduce simple linear regression, in particular we will:
2
Linear Regression
• Regression is used to study the relationship
between two variables.
• How a change in one variable (e.g., someone’s
exercise habits) can predict the outcome of another
variable (e.g., general health).
4
Displaying the data
When both the DV and IV are numerical, we can
represent data in the form of a scatterplot.
5
Displaying the data
It is important to perform a scatterplot because it
helps us to see if the relationship is linear.
• As an independent variable
changes, what happens to the
dependent variable? I.e., as an
independent variable goes up
and down, does the dependent
variable go up and down?
7
Linear Regression
• Straight line prediction model.
• As an independent variable
changes, what happens to the
dependent variable? I.e., as an
independent variable goes up
and down, does the dependent
variable go up and down?
8
Linear Regression
9
Linear Regression
y = B0 + B1 * X + E
B1
grades
B0
study time 10
Linear Regression
y = B0 - B1 * X + E
11
Assumptions of regression
• The errors E are normally distributed.
12
Assumptions of regression
• There are no clear outliers
This can be checked by performing the scatterplot. The
outliers (circled in red in the figure) can simply be removed
from the analysis.
13
Hypothesis testing
Regression tests the null hypothesis:
H0 : There is no effect of X on Y.
H1 : There is an effect of X on Y.
14
Hypothesis testing
16
Linear Regression in SPSS
Our variables of interest:
IV - Total mastery (tmast): total score on the Mastery
Scale. High scores indicate higher levels of perceived
control over events and circumstances.
DV - Total perceived stress (tpstress): total score on the
Perceived Stress Scale. High scores indicate high levels of
stress.
Question:
How well does our measure of control (i.e., mastery)
predict perceived stress?
17
Regression in SPSS
After producing a scatterplot to check for linearity…
Then click on OK
https://statistics.laerd.com/spss-tutorials/linear-regression-using-spss-statistics.php 19
Regression in SPSS
Interpreting the output:
1. The first table that we’re interested in is the Model Summary.
• The R value represents the simple correlation. This indicates a strong
degree of correlation between our two variables.
• The R2 value indicates how much of the total variation in the dependent
variable (perceived stress) can be explained by the independent variable
(mastery). In this case, 37.3% can be explained.
https://statistics.laerd.com/spss-tutorials/linear-regression-using-spss-statistics.php 20
Regression in SPSS
Interpreting the output:
2. The next table is the ANOVA table, which shows us how well the
regression equation fits the data (i.e., predicts the dependent
variable).
• The regression predicts the dependent variable significantly well (p < .001).
https://statistics.laerd.com/spss-tutorials/linear-regression-using-spss-statistics.php 21
Regression in SPSS
Interpreting the output:
3. The Coefficients table gives us the information that we need to
predict stress from mastery, as well as determine whether mastery
contributes statistically significantly to the model.
Y = B0 + B1 * X
https://www.open.ac.uk/socialsciences/spsstutorial/files/tutorials/simple-linear-regression.pdf 23
Regression in SPSS
Results are
usually
rounded to two
decimal places
24
Multiple Regression
• Simple linear regression (i.e., with one IV) allows us
to study the relationship between two variables only.
maths/stats appointments
available!
www.kent.ac.uk/student-learning-advisory-service
26