Вы находитесь на странице: 1из 3

# Practice Questions lecture 29-31

Question:
Find the correlation coefficient r between variables X and Y using the following table;

X 1 2 3 4
Y 4 9 7 8

Solution:

X Y X*Y X2 Y2
1 4 4 1 16
2 9 18 4 81
3 7 21 9 49
4 8 32 16 64
Sum = 10 Sum =28 Sum = 75 Sum = 30 Sum = 210

## By using the following formula we get

r
 XY    X   Y  n

 X 2   X 2 n   Y 2   Y 2 n 
     

75  70
r = 0.5976
30  25  210  196

Question
What will be the correlation coefficient r between variables X and Y if varX=4
VarY=9 , No. of observation n=9 and   X  X  Y  Y  =11.
Solution:

Cov X , Y  
 X  X  Y  Y 
n
So Cov(X,Y)=11/9=1.222
Now
Cov X , Y 
r
Var  X  Var Y 

r=1.222/Sq.Root(9*4)=1.222/6=0.2036
Question:

Find the slope of the regression line “Y = a + bX” associated with the following data:
X 8 11 3 7
Y 5 6 2 9
Solution:

X Y XY (X)2
8 5 40 64
11 6 66 121
3 2 6 9
7 9 63 49
Sum =29 22 175 243

Use the following formula to get b which is slope of the regression line.

n  xy  ( x)( y )
b=
n  x 2  ( x) 2

Question:

## Find Covariance Cov(X,Y) if var(X)=7,var(Y)=6 and correlation coefficient r between X and Y

is 0.9?
Solution:

Cov X , Y 
r
Var  X  Var Y 

Question:

## Find the intercept of the regression line “Y =a + bX” if X = 3, Y = 4 and b = 0.8

Solution:

As Y = a + b X
We have a = Y - b X
= 4 – 0.8*3 = 1.6