(c) 2007 iupui spea k300 (4392) outline correlation and covariance bivariate correlation coefficient...
TRANSCRIPT
(c) 2007 IUPUI SPEA K300 (4392)
Outline
Correlation and CovarianceBivariate Correlation CoefficientTypes of CorrelationCorrelation Coefficient FormulaCorrelation Coefficient ComputationShort-cut FormulaLinear Function (Intercept and Slope)
(c) 2007 IUPUI SPEA K300 (4392)
Correlation and Covariance
It asks how two variables are related When x changes, how does y change?Underlying information is covarianceCov(x,y)=E[(x-xbar)(y-ybar)]Cov(x,y)=Cov(y,x)Cov(x,x)=Var(x), variance is a special
type of covariance (covariance of a variable and itself)
(c) 2007 IUPUI SPEA K300 (4392)
Bivariate Correlation Coefficient
(Karl Pearson product moment) correlation coefficient
Bivariate correlation coefficient (BCC) for two interval/ratio variables
Differentiated from Spearman’s rank correlation coefficient (nonparametric)
Differentiated from partial correlation coefficient that controls the impact of other variables
No causal relationship imposed. XY or YX BCC is used for prediction
(c) 2007 IUPUI SPEA K300 (4392)
Bivariate Correlation Coefficient
BCC ranges from -1 to 1 (So does Gamma γ) Covariance component can be negative + means positive relationship; when x
increases 1 unit, y increases r unit 0 means no relationship. - means negative relationship; when x
increases 1 unit, y decreases r unit. http://noppa5.pc.helsinki.fi/koe/corr/cor7.html
(c) 2007 IUPUI SPEA K300 (4392)
Positive relationship
01
23
45
y
0 1 2 3 4 5x
r=1.0 (positive relationship)
(c) 2007 IUPUI SPEA K300 (4392)
Negative relationship
01
23
45
y
0 1 2 3 4 5x
r=-1.0 (negative relationship)
(c) 2007 IUPUI SPEA K300 (4392)
No relationship
1.5
3.5
y
0 1 2 3 4 5x
r=.0 (No relationship)
(c) 2007 IUPUI SPEA K300 (4392)
Correlation Coefficient
Ratio of the covariance component of x and y to the square root of variance components of x and y
n
xxxxxxxxSS iii
n
iiixx
2
22
1
)())((
n
yyyyyyyySS iii
n
iiiyy
2
22
1
)())((
22)()(
))((
yyxx
yyxx
SSSS
SPr
ii
ii
yyxx
xy
n
yxyxyyxxSP iiii
n
iiixy
)())((1
(c) 2007 IUPUI SPEA K300 (4392)
Correlation Coefficient (short-cut)
n
yyn
n
yySS iiiiyy
222
2
n
xxn
n
xxSS iiiixx
222
2
2222
)(
iiii
iiii
yyxx
xy
yynxxn
yxyxn
SSSS
SPr
Textbook suggests a short-cut formula below but it is not recommended.
n
yxyxn
n
yxyxSP iiiiiiiixy
)(
)(
(c) 2007 IUPUI SPEA K300 (4392)
Illustration: example 10-2, p.526
No x y (x-xbar) (y-ybar) (x-xbar)^2 (y-ybar)^2 (x-xbar)(y-ybar)
1 43 128 -14.5 -8.5 210.25 72.25 123.25
2 48 120 -9.5 -16.5 90.25 272.25 156.75
3 56 135 -1.5 -1.5 2.25 2.25 2.25
4 61 143 3.5 6.5 12.25 42.25 22.75
5 67 141 9.5 4.5 90.25 20.25 42.75
6 70 152 12.5 15.5 156.25 240.25 193.75
Sum 345 819 561.5 649.5 541.5
Mean 57.5 137
SSxx SSyy SPxy
Correlation coefficient 0.8967
(c) 2007 IUPUI SPEA K300 (4392)
Hypothesis Test
How reliable is a correlation coefficient? r is a random variable drawn from the
sample; ρ is its corresponding parameter H0: ρ =0, Ha: ρ ≠ 0TS follows the t distribution with df=n-2If H0 is not rejected, r is not reliable
regardless of its magnitude (ρ =0)
)2(~1
22
ntr
nrtr
(c) 2007 IUPUI SPEA K300 (4392)
Illustration: Example 10-3, p.529
Step 1. H0: ρ =0, Ha: ρ ≠ 0Step 2. α=.05, df=4 (=6-2), CV=2.776 Step 3. TS=4.059, r=.897Step 4. TS>CV, reject H0 at the .05 levelStep 5. ρ ≠ 0
)2(~059.4897.1
26897.
1
222
ntr
nrtr
(c) 2007 IUPUI SPEA K300 (4392)
Linear function
A function transforms input into output in its own way
Ex: y=square_root(x). Whey you put x (input) into the funciton square_root(), you will get y (output).
Linear function consists of a intercept and linear combinations of variables and their slops. Y= a + bX + cX2…
Slopes are constant
(c) 2007 IUPUI SPEA K300 (4392)
Intercept and Slope of a function
A linear model: Y = a + b XDependent variable Y to be explainedIndependent variable X that explains YY-Intercept a: the coordinate of the point
at which the line intersects Y axis. Slope b: the change of dependent
variable Y per unit change in independent variable X
(c) 2007 IUPUI SPEA K300 (4392)
Illustration
1
.5
12
45
3y
-1 0 1 2 3 4 5x
Y = 2 +.5X