Linear Regression
Linear Regression
σ𝑦 𝑏σ𝑥
• 𝑎 = 𝑦ത − 𝑏𝑥ҧ = −
𝑛 𝑛
The first step in finding a linear regression equation is
to determine if there is a relationship between the
two variables.
This is often a judgment call for the researcher. You’ll
also need a list of your data in x-y format (i.E. Two
columns of data—independent and dependent
variables).
HOW TO FIND LINEAR
REGRESSION
Step 1: Make a chart of your data, filling in the columns in the same way
as you would fill in the chart if you were finding the Pearson’s Correlation
Coefficient.
Step 2: use the following equations to find a and b.
σ𝑦 𝑏σ𝑥
𝑎 = 𝑦ത − 𝑏𝑥ҧ = −
𝑛 𝑛
•y’ = a + bx
y’ = 65.14 + .385225x
ANOTHER EXAMPLE
Compute the regression line for the given data
below.
𝑛 = 14
σ 𝑥 = 1,076
σ 𝑦 = 1,019
σ 𝑥𝑦 = 81,296
σ 𝑥 2 = 85, 626
use the following equations to find a and b.
σ𝑦 𝑏σ𝑥
𝑎 = 𝑦ത − 𝑏𝑥ҧ = − =
𝑛 𝑛
σ 𝑦 σ 𝑥 2 − (σ 𝑥)(σ 𝑥𝑦)
𝑎=
𝑛 σ 𝑥2 − σ 𝑥 2
𝑛 σ 𝑥𝑦 − (σ 𝑥)(σ 𝑦) 𝑎=
𝑏=
𝑛 σ 𝑥2 − σ 𝑥 2
14 81,296 − (1076)(1019)
𝑏=
14 85,626 1076 2
𝑏 =1.02
Judge x Judge y xy X^2 Y^2
9 10 90 81 100
8 8 64 64 64
• Compute the
regression line for the 8 9 72 64 81
given data beside
5 6 30 25 36
regarding the
correlation of ratings 7 9 63 49 81
of Judge x and Judge
y. Write the regression 5 10 50 25 100
line equation.
𝑥 = 42 𝑥 = 52 𝑥𝑦 = 369 𝑥 2 = 308 𝑦 2 = 462
use the following equations to find a and b.
σ𝑦 𝑏σ𝑥
𝑎 = 𝑦ത − 𝑏𝑥ҧ = −
𝑛 𝑛
σ 𝑦 σ 𝑥 2 − (σ 𝑥)(σ 𝑥𝑦)
𝑎=
𝑛 σ 𝑥2 − σ 𝑥 2
𝑛 σ 𝑥𝑦 − (σ 𝑥)(σ 𝑦) 𝑎=
𝑏=
𝑛 σ 𝑥2 − σ 𝑥 2
Compute the regression line for the given data beside
regarding the correlation of student’s time spent in
studying and their test scores. Write the regression line
equation.
Time spent
in studying
x Test score y xy x^2 y^2
1 5 5 1 25
2 10 20 4 100
3 10 30 9 100
4 15 60 16 225
5 25 125 25 625
6 30 180 36 900
=
21 95 420 91 1975
LINEAR REGRESSION EQUATION MICROSOFT
EXCEL: STEPS
Time spent in
studying x Test score y xy x^2 y^2
1 5 5 1 25
2 10 20 4 100
3 10 30 9 100
4 15 60 16 225
5 25 125 25 625
6 30 180 36 900
21 95 420 91 1975