In: Statistics and Probability
Calculate the covariance between variables X and Y. Is it a positive or negative relationship between the two variables?
b. Calculate correlation coefficient between X and Y. Is it a positive or negative relationship? Is it a strong linear, weak linear or nonlinear relationship between X and Y?
c. Use the Y data to calculate mean, range, standard deviation and variance.
d. Use the first Y value to calculate the Z-score. Is it an outlier?
e. Calculate the 60th percentile for the Y data.
1 | -22 | 22 |
2 | -33 | 49 |
3 | 2 | 8 |
4 | 29 | -16 |
5 | -13 | 10 |
6 | 21 | -28 |
7 | -13 | 27 |
8 | -23 | 35 |
9 | 14 | -5 |
10 | 3 | -3 |
11 | -37 | 48 |
12 | 34 | -29 |
13 | 9 | -18 |
14 | -33 | 31 |
15 | 20 | -16 |
16 | -3 | 14 |
17 | -15 | 18 |
18 | 12 | 17 |
19 | -20 | -11 |
20 | -7 | -22 |
Let us first calculate the covariance between X and Y. This is calculated with the formula:
where are means of x and y values.
First we form a table as below for further calculations.
X | Y | X^2 | Y^2 | XY | |
-22 | 22 | 484 | 484 | -484 | |
-33 | 49 | 1089 | 2401 | -1617 | |
2 | 8 | 4 | 64 | 16 | |
29 | -16 | 841 | 256 | -464 | |
-13 | 10 | 169 | 100 | -130 | |
21 | -28 | 441 | 784 | -588 | |
-13 | 27 | 169 | 729 | -351 | |
-23 | 35 | 529 | 1225 | -805 | |
14 | -5 | 196 | 25 | -70 | |
3 | -3 | 9 | 9 | -9 | |
-37 | 48 | 1369 | 2304 | -1776 | |
34 | -29 | 1156 | 841 | -986 | |
9 | -18 | 81 | 324 | -162 | |
-33 | 31 | 1089 | 961 | -1023 | |
20 | -16 | 400 | 256 | -320 | |
-3 | 14 | 9 | 196 | -42 | |
-15 | 18 | 225 | 324 | -270 | |
12 | 17 | 144 | 289 | 204 | |
-20 | -11 | 400 | 121 | 220 | |
-7 | -22 | 49 | 484 | 154 | |
Total | -75 | 131 | 8853 | 12177 | -8503 |
From the data, we have n=20
Now
Since the Covaraiance is negative, the relationship between X and Y is negative.
b). To find out the linear relationship between X and Y, we use the formula.
. Since the Correlation coefficient is -0.8134, it is a negative relationship between X and Y. Since the Value is more than 0.75, it is a string negative linear relationship.
c). For the Y data,
The mean
Variance
Therefore the sample variance of Y is
The range is Maximum-minimum of all values
d). Z score for first value of Y ie 22
The Z score is given by:
Since we have calculated , s=24.4077
. It doesn't seem to be an outlier.
e). To calculate, 60th percentile, we need to order the data in ascending order and locate the 20*60/100 th value.
ie 12th value. The sorted data is presented below:
-29 |
-28 |
-22 |
-18 |
-16 |
-16 |
-11 |
-5 |
-3 |
8 |
10 |
14 |
17 |
18 |
22 |
27 |
31 |
35 |
48 |
49 |
The 12th value in the sorted data is the 60th percentile which is 14.