Years of experience (X) 1 3 4 2 5 6
Performance score (Y) 1 2 5 3 5 8
(i) Plot a scatter diagram for these data.
(ii) Calculate the coefficient of linear correlation (r) and briefly explain the
meaning of your answer.
(iii) Calculate the coefficient of determination and briefly explain the meaning of
your answer.
(iv) Calculate the coefficients of the Least Squares Regression Equation
answer briefly explain the meaning of each one.
(v) Estimate, using the equation found in (iv) above, the performance score of an employee with 6 years of work experience.
"i)"
To obtain the scatter diagram for the given data, the following commands were used in "R,"
> Years_of_experience=c(1,3,4,2,5,6)
> Perfomance_score=c( 1,2,5,3,5,8)
> plot(Years_of_experience,Perfomance_score,main='Scatter plot of Perfomance Score against Years of experience ')
The output of these commands is the scatter plot below.
"ii)"
The coefficient of linear correlation "(r)" is determined by entering the following commands in "R".
> x=c(1,3,4,2,5,6)
> y=c( 1,2,5,3,5,8)
> cor(x,y)
[1] 0.9296697
The output of 0.9296697 is the desired value of the correlation coefficient.
Therefore, "r=0.9296697"
The value of "r=0.9296697" shows that there is a strong positive relationship between the years of experience and the performance score.
"iii)"
The coefficient of determination "(r^2)" is given as,
"r^2=0.9296697^2= 0.8642857". To interpret this value, we convert it into percentage. In percentage form, "r^2=0.8642857*100=86.42857\\approx 86\\%"
Thus, 86% of the total variability in performance score is explained by the years of experience.
"iv)"
To calculate the coefficients of the Least Squares Regression Equation, we enter the following commands in "R".
> x=c(1,3,4,2,5,6)
> y=c( 1,2,5,3,5,8)
> lm(y~x)
The output of these commands are,
Call:
lm(formula = y ~ x)
Coefficients:
(Intercept) x
-0.400 1.257
The regression equation line is of the form, "\\hat{y}=ax+b", where "a" is the slope coefficient and "b" is the y-intercept.
From the above output, "a=1.257" and "b=-0.400". Therefore, the regression equation line is given as, "\\hat{y}=1.257x-0.400".
Now, the value of the slope coefficient of "a=1.257" represent the increase in performance score for a unit increase in the years of experience.
The y-intercept, "b=-0.400" is the value of the performance score when the years of experience is 0.
"v)"
When the years of experience is 6, the performance score is given as,
"\\hat{y}=(1.257*6)-0.4=7.142"
Therefore, when the years of experience "x=6" the corresponding performance score "\\hat{y}=7.142".
Comments
Leave a comment