In: Statistics and Probability
Here are the salaries for a sample of professors in a mathematics department at a large midwestern university for the academic years 2014–2015 and 2015–2016.
2014–2015 salary ($) |
2015–2016 salary ($) |
2014–2015 salary ($) |
2015–2016 salary ($) |
---|---|---|---|
145,700 | 147,600 | 136,650 | 138,750 |
112,700 | 114,760 | 132,260 | 134,150 |
109,100 | 111,500 | 74,290 | 76,490 |
98,900 | 101,800 | 74,400 | 77,100 |
112,100 | 113,100 | 83,100 | 85,400 |
111,790 | 113,800 | 141,950 | 143,930 |
103,400 | 105,600 | 122,500 | 124,410 |
149,000 | 150,900 | 115,100 | 117,100 |
(a)
Construct a scatterplot with the 2015–2016 salaries on the vertical axis and the 2014–2015 salaries on the horizontal axis.
(b)
Comment on the form, direction, and strength of the relationship in your scatterplot.
The form of the scatterplot is ---Select--- nonlinear linear , the direction is ---Select--- negative positive , and the strength is ---Select--- weak strong .
(c)
What proportion of the variation in 2015–2016 salaries is explained by 2014–2015 salaries? (Round your answer to four decimal places.)
Solution-:
By using R-Software:
>X=c(145700,112700,109100,98900,112100,111790,103400,149000,136650,132260,74290,74400,83100,141950,122500,115100);X
[1] 145700 112700 109100 98900 112100 111790 103400 149000 136650
132260
[11] 74290 74400 83100 141950 122500 115100
>Y=c(147600,114760,111500,101800,113100,113800,105600,150900,138750,134150,76490,77100,85400,143930,124410,117100);Y
[1] 147600 114760 111500 101800 113100 113800 105600 150900 138750
134150
[11] 76490 77100 85400 143930 124410 117100
> #(a) For Scatter diagram with the 2015-2016 salaries Vs
2014-2015 salaries
> plot(X,Y,xlab="2014-2015 salaries",ylab="2015-2016
salaries",main="Scatter Diagram 2014-2015 salariesVs 2015-16
salaries ")
> #(b)Comment: This scatter diagram shows perfect positive
correlation.
> #(c) Correlation
> r=cor(X,Y);r
[1] 0.9998794
> round(r,4)
[1] 0.9999
> rr=r^2;rr
[1] 0.9997587
> round(rr,4)
[1] 0.9998
The proportion is of the variation in 2015–2016 salaries is explained by 2014–2015 salaries is,
Therefore, 99.98 % of the variation in 2015–2016 salaries can be explained by the variation in 2014–2015 salaries.
R-Code:
X=c(145700,112700,109100,98900,112100,111790,103400,149000,136650,132260,74290,74400,83100,141950,122500,115100);X
Y=c(147600,114760,111500,101800,113100,113800,105600,150900,138750,134150,76490,77100,85400,143930,124410,117100);Y
#(a) For Scatter diagram with the 2015-2016 salaries Vs 2014-2015
salaries
plot(X,Y,xlab="2014-2015 salaries",ylab="2015-2016
salaries",main="Scatter Diagram 2014-2015 salariesVs 2015-16
salaries ")
#(b)Comment: This scatter diagram shows perfect positive
correlation.
#(c) Correlation
r=cor(X,Y);r
round(r,4)
rr=r^2;rr
round(rr,4)