The following is a set of data from a sample of n=11 items. Complete parts (a) through (c):
X Y
34 17
16 8
6 3
40 20
14 7
30 15
8 4
38 19
36 18
36 18
8 4
a. Compute the sample covariance.
(Round to three decimal places as needed.)
b. Compute the coefficient of correlation.r=
(Round to three decimal places as needed.)
c. How strong is the relationship between X and Y? Explain.
A. The variables X and Y have a strong positive correlation because as X increases, Y tends to increase also.
B.The variables X and Y have a perfect negative correlation because all points fall on a straight line with a negative slope.
C.The variables X and Y have a perfect positive correlation because all points fall on a straight line with a positive slope.
D.The variables X and Y have no correlation.
a) The sample covariance is
b) The coefficient of correlation is
Here
Let
and
,
and so on
Using the bove formula ,
.
Verify using R command below.
X <- c(34, 16 , 6 , 40 , 14, 30 , 8 ,38 ,36 , 36, 8
)
Y <- c( 17 , 8 , 3 , 20 , 7 , 15 , 4 , 19 , 18, 18 , 4)
cov(X,Y)
cor(X,Y)
> cov(X,Y)
[1] 93.78182
> cor(X,Y)
[1] 1
c) Since , The variables X and Y have a perfect positive correlation because all points fall on a straight line with a positive slope.
Correct choice is (C).
Get Answers For Free
Most questions answered within 1 hours.