Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
STAT3010: Lecture 11
STAT3010: Lecture 11
r=
and
And Cov(x,y) is the covariance of x and y defined by:
(y
y)
S yy
2
i
yi ) 2
n
STAT3010: Lecture 11
STAT3010: Lecture 11
18.4
20.1
22.4
25.9
26.5
28.9
30.1
32.9
33.0
34.7
120
110
120
135
140
115
150
165
160
180
STAT3010: Lecture 11
with
df = n-2
Decision:
Conclusion:
SAS CODE:
options ps=62 ls=80;
data correlation;
input bmi sbp;
cards;
18.4 120
20.1 110
22.4 120
25.9 135
26.5 140
28.9 115
30.1 150
=0) we
STAT3010: Lecture 11
32.9 165
33.0 160
34.7 180
run;
proc plot;
plot sbp*bmi;
run;
proc corr cov;
var bmi sbp;
run;
SAS OUTPUT:
Plot of sbp*bmi.
165
17.5
20.0
22.5
25.0
27.5
bmi
30.0
32.5
35.0
STAT3010: Lecture 11
The SAS System
The CORR Procedure
2
Variables:
bmi
sbp
Covariance Matrix, DF = 9
bmi
sbp
bmi
sbp
31.8521111
115.2166667
115.2166667
563.6111111
Simple Statistics
Variable
bmi
sbp
Mean
Std Dev
Sum
Minimum
Maximum
10
10
27.29000
139.50000
5.64377
23.74050
272.90000
1395
18.40000
110.00000
34.70000
180.00000
sbp
bmi
1.00000
0.85992
0.0014
sbp
0.85992
0.0014
1.00000
STAT3010: Lecture 11
We now want to create the equation of the best fit of this data.
This equation of the line relating y to x is called the simple linear
regression equation and is given by:
Let estimates of
and
be respectively denoted by
and
STAT3010: Lecture 11
10
STAT3010: Lecture 11
Where
11
STAT3010: Lecture 11
12
STAT3010: Lecture 11
Variable
bmi
sbp
Maximum
34.70000
180.00000
Variable
Intercept
bmi
DF
1
1
Parameter Estimates
Parameter
Standard
Estimate
Error
40.78558
21.11158
3.61724
0.75913
13
t Value
1.93
4.76
Pr > F
0.0014
Pr > |t|
0.0895
0.0014