Docsity

STAT 301 Discussion 9: Correlation Coefficient and Linear Regression, Study notes of Statistics

Toggle sidebar
bg1
STAT 301 TA : Lisa Chung [email protected]
DISCUSSION 9
(Nov. 8. 2004)
1.Correlation Coefficient
The correlation coefficient, denoted by r, is a measure of strength of the linear relation between the x
and yvariables.
r=Sxy
√SxxpSyy
where
Sxy =P(x−¯x)(y−¯y)
Sxx =P(x−¯x)2
Syy =P(y−¯y)2
∗Correlation Coefficient (Alternative way)
Sxy =P(xi)(yi)−n(¯x)(¯y)
Sxx =P(xi)2−n(¯x)2
Syy =P(yi)2−n(¯y)2
Example 1 For a data set of (x, y) pairs, one find that
n= 26,Pxi= 1287,Pyi= 1207,P(xi)2= 66831,P(yi)2= 59059,Pxiyi= 62262
Calculate the correlation coeffcient.
Example 2 The following table gives the federal deficit and the number of golfers in the United
States.Determine the correlation between number of golfers and the federal deficit.
2. Linear Regression
ˆ
β1=Sxy
Sxx
ˆ
β0=¯
Y−ˆ
β1¯
X
Example 3 Given five pairs of values,
Off. Hour: W 1:00-3:00 p.m. 1 1275A MSC, 262-1577
pf2

Partial preview of the text

Download STAT 301 Discussion 9: Correlation Coefficient and Linear Regression and more Study notes Statistics in PDF only on Docsity!

STAT 301 TA : Lisa Chung [email protected]

DISCUSSION 9

(Nov. 8. 2004)

1.Correlation Coefficient

The correlation coefficient, denoted by r, is a measure of strength of the linear relation between the x

and y variables.

r =

S

xy

√

Sxx

Syy

where

Sxy =

(x − x¯)(y − ¯y)

S

xx

(x − x¯)

2

S

yy

(y − y¯)

2

∗ Correlation Coefficient (Alternative way)

S

xy

(x i

)(y i

) − n(¯x)(¯y)

S

xx

(x i

2 − n(¯x)

2

Syy =

(yi)

2 − n(¯y)

2

Example 1 For a data set of (x, y) pairs, one find that

n = 26,

x i

y i

(x i

2 = 66831,

(y i

2 = 59059,

x i

y i

Calculate the correlation coeffcient.

Example 2 The following table gives the federal deficit and the number of golfers in the United

States.Determine the correlation between number of golfers and the federal deficit.

2. Linear Regression

β 1 =

Sxy

Sxx

β 0 =

Y −

β 1

X

Example 3 Given five pairs of values,

Off. Hour: W 1:00-3:00 p.m. 1 1275A MSC, 262-

STAT 301 TA : Lisa Chung [email protected]

(a) Calculate ¯x, y, S¯ xx

, S

xy

, andS yy

(b) Calcualte the least squares estimates

β 0 and

β 1.

(c) Determine the fitted line.

Off. Hour: W 1:00-3:00 p.m. 2 1275A MSC, 262-