In: Statistics and Probability
Fourth Question: The table below represents a
relationship between two variables X and Y
x 7,8,4,3,9,5,7,1,2
y 8,10,5,2,12,3,9,1,1
a) Calculate the Pearson correlation coefficient
between the X and Y variables.
B) Find the y regression equation for X for the cooked data
c) Calculate the estimated value (prediction) of the variable Y
when the value of the variable X is equal to 5. What is the error
value of the estimate?
Here in this Question the given data of x independent variable and y dependent variable.
A) The Pearson's correlation coefficient between x and y is calculated as below,
The scatter plot of data is,
The formula for correlation coefficient is :
Now based on given data we calculated,
Result Details & Calculation
X Values
∑ = 46
Mean = 5.111
∑(X - Mx)2 = SSx = 62.889
Y Values
∑ = 51
Mean = 5.667
∑(Y - My)2 = SSy = 140
X and Y Combined
N = 9
∑(X - Mx)(Y - My) = 90.333
R Calculation
r = ∑((X - My)(Y - Mx)) / √((SSx)(SSy))
r = 90.333 / √((62.889)(140)) = 0.9627
r = 0.9627
The value of R Pearson correlation coefficient between x and y is 0.9627.
This is a strong positive correlation, which means that high X variable scores go with high Y variable scores.
The value of R2, the coefficient of determination, is 0.9268.
B) The regression equation for y is calculated as below,
From the given data we have ,
The independent variable is XX, and the dependent variable is YY. In order to compute the regression coefficients, the following table needs to be used:
X | Y | X*Y | X^2 | Y^2 | |
7 | 8 | 56 | 49 | 64 | |
8 | 10 | 80 | 64 | 100 | |
4 | 5 | 20 | 16 | 25 | |
3 | 2 | 6 | 9 | 4 | |
9 | 12 | 108 | 81 | 144 | |
5 | 3 | 15 | 25 | 9 | |
7 | 9 | 63 | 49 | 81 | |
1 | 1 | 1 | 1 | 1 | |
2 | 1 | 2 | 4 | 1 | |
Sum = | 46 | 51 | 351 | 298 | 429. |
Based on the above table, the following is calculated:
This is the y regression equation for x from given data. So using the above regression equation we can predict the value of y Variable based on x variable.
C) The predicted value of y at given value of x is 5 is given below,
Y=−1.6749+1.4364 × 5 (x)
Y = 5.5071
Now this is the predicted value of y at given value of x is 5. Here only we have substitute the value of x and we get the predicted value of y.
C) Similarly the error value of estimate is the difference between observed value and predicted value it is also called as residual. It is calculated using following formula,
The observed value at x= 5 is 4 and from B) the predicted value is 5.5071.
Residual (e) = Yi - Y^
Residual (e) = 4 - 5.5071
Residual (e) = -1.5071.
This is the error estimate of y at x = 5 .
Hope you understood.
Thank you.