Linear Regression - Texas A&M University

Download Report

Transcript Linear Regression - Texas A&M University

Educational Statistics
Number of Health Problems
Simple Linear Regression
20
18
16
14
12
10
8
6
4
2
0
y = -0.24x + 22.63
R² = 0.43
20
30
40
50
60
Humor Ratings
70
80
Copyright © 2014
Robert J. Hall, Ph.D.
Educational Statistics
Anxiety and Performance
To measure the relationship between anxiety level and test
performance, an educational psychologist obtains a
random sample of n = 6 college students from an
introductory statistics course. The students are asked to
come to the Educational Research and Evaluation
Laboratory (EREL) 15 minutes before the final exam. In
the lab, the researcher records the physiological measures
of anxiety (heart rate, skin resistance, blood pressure, and
so on) for each participant. Following the final, the
researcher obtained the exam score for each participant.
Table 1 summarizes the data.
Educational Statistics
Table 1
Student
Anxiety Rating
Exam Score
A
B
C
D
E
F
Mean
S.D.
5
2
7
7
4
5
5
1.90
80
88
80
79
86
85
83
3.79
Educational Statistics
Scatterplot
Student
Anxiety Rating
Exam Score
A
5
80
B
2
88
C
7
80
D
7
79
E
4
86
F
5
85
Anxiety and Performance
89
B
88
Exam Score
87
E
86
F
85
84
83
82
81
C
D
A
80
79
78
0
1
2
3
4
5
Anxiety Rating
6
7
8
Educational Statistics
Slope Calculation
by  x 
by  x
by  x
by  x
Cov xy
Var x
Sum Cross Products
SP


Sum of Squared Deviations for X SS x

X  X Y  Y 


 X  X 
N  XY   X  Y 

N  X   X 
2
2
 sy
 rxy 
 sx



2
Educational Statistics
Slope Calculation

X  X Y  Y   32
SP

b 


 1.78
SS
18
 X  X 
y x
2
x
Student
A
B
C
D
E
F
Mean
Anxiety
Rating
5
2
7
7
4
5
5
(X-`X)
0
-3
2
2
-1
0
0
(X-`X)2
0
9
4
4
1
0
18
Exam
Score
80
88
80
79
86
85
83
(Y-`Y) (Y-`Y)2 (X-`X)(Y-`Y)
-3
9
0
5
25
-15
-3
9
-6
-4
16
-8
3
9
-3
2
4
0
0
72
-32
Educational Statistics
Slope Calculation
by  x 
by  x 
N  XY   X Y 
N  X 2   X 
2

62458  30498

6168  900
14748  14940  192

 1.78
1008  900
108
Student
A
B
C
D
E
F
S=
S2 =
Anxiety
Rating
5
2
7
7
4
5
30
900
X2
25
4
49
49
16
25
168
Exam
Score
80
88
80
79
86
85
498
XY
400
176
560
553
344
425
2458
Educational Statistics
Slope Calculation
by  x
by  x
by  x
 sy
 rxy 
 sx



 3.79 
 0.89

 1.90 
 0.891.99   1.78
Student
A
B
C
D
E
F
Mean
S.D.
rxy =
Anxiety
Rating
5
2
7
7
4
5
5
1.90
-0.89
Exam
Score
80
88
80
79
86
85
83
3.79
Educational Statistics
Intercept Calculation
a  Y  by  x X
a  83   1.785 
a  83   8.9 
a  83  8.9  91.9
Student Anxiety Rating
A
5
B
2
C
7
D
7
E
4
F
5
Mean
5
S.D.
1.90
rxy =
-0.89
by∙x =
-1.78
Exam Score
80
88
80
79
86
85
83
3.79
Educational Statistics
Regression Line
Regression
Equation
for X = 4
for X = 6
yˆ  1.78 X  91.9
yˆ  1.784   91.9
yˆ  84.78
yˆ  1.786   91.9
yˆ  81.22
Educational Statistics
Scatterplot
Anxiety and Performance
90
y = -1.777x + 91.88
R² = 0.790
Exam Score
88
86
(4, 84.78)
X,Y 
84
82
(6, 81.22)
80
78
0
1
2
3
4
5
Anxiety Rating
6
7
8
Educational Statistics
Coefficient of Determination - r 2xy
yˆ i  1.78 X i  91.9
Anxiety and Performance
90
Exam Score
88
DATA
B
E
y E  yˆE 
86
F
y E  y 
84
Y  83
Actual
Predicted
82
Student
Anxiety
Rating
Exam
Score
Predicted
Score
A
5
80
83.00
B
2
88
88.34
C
7
179.44
80
D
7
78 80
0
79
E
4
86
84.78
F
5
85
83.00
C
A
D
79.44
2
3
4
5
Anxiety Rating
6
7
8
Educational Statistics
Coefficient of Determination - r 2xy
yˆ i  1.78 X i  91.9 Error between Y
and `Y
Anxiety
Student Rating
A
5
B
2
C
7
D
7
E
4
F
5
Mean
5
S.D.
1.90
rxy = -0.89
Exam
Score
80
88
80
79
86
85
83
3.79
^Y
83.00
88.34
79.44
79.44
84.78
83.00
Unexplained VarianceRegression
Unexplained VarianceTotal
(Y-`Y)
-3.00
5.00
-3.00
-4.00
3.00
2.00
0.00
(Y-`Y)2
9.00
25.00
9.00
16.00
9.00
4.00
72.00

Y  Yˆ 


Error between Y
and ^Y
2
 Y  Y 
2

(Y- ^Y)2
9.00
0.12
0.31
0.19
1.49
4.00
15.11
0.21
r 2xy = 0.79
(Y- ^Y)
-3.00
-0.34
0.56
-0.44
1.22
2.00
0.00
15.11
 0.21
72.00