Student School_Ranking GPA Experience Salary 1 78 2.92 3 73,590 2 56 3.84 9 87,000 3 23 3.04 6 76,970 4 67 3.20 6 79,320 5 56 3.61 7 79,530 6 78 2.99 5 71,040 7 68 3.78 8 82,050 8 89 3.20 5 78,890 9 37 3.42 7 82,170 10 67 3.05 5 76,120 11 48 3.12 4 77,500 12 78 3.56 7 83,920 13 56 3.01 5 71,800 14 25 3.15 6 77,000 15 68 3.05 7 79,000 16 36 3.24 5 77,800 17 76 3.25 6 80,600 18 78 3.78 9 87,000 19 67 3.12 4 78,450 20 67 3.24 8 80,600 21 15 2.98 5 74,900 22 29 3.24 6 79,200 23 49 3.08 4 77,000 24 67 3.00 6 77,900 25 39 2.95 4 76,950 26 81 3.01 5 76,800 27 54 3.23 7 79,300 28 72 3.01 2 72,120 29 73 3.45 7 83,900 30 78 3.85 8 85,200 31 51 3.00 5 77,300 32 86 3.23 6 83,500 33 76 3.80 7 77,000 34 30 3.08 5 75,000 35 58 3.15 7 79,200 36 86 3.35 7 80,400 37 34 3.09 7 80,200 38 72 3.35 9 84,800 39 38 3.16 3 72,800 40 89 2.76 7 75,000 Provide a numeric example of how this regression equation may be used to predict students’ starting salaries
I used r software to solve this question.
R codes and output:
> d=read.table('salary.1.csv',header=T,sep=',')
> head(d)
Student Ranking GPA Experience Salary
1 1 78 2.92 3 73590
2 2 56 3.84 9 87000
3 3 23 3.04 6 76970
4 4 67 3.20 6 79320
5 5 56 3.61 7 79530
6 6 78 2.99 5 71040
> attach(d)
> fit=lm(Salary~Ranking+GPA+ Experience)
> fit
Call:
lm(formula = Salary ~ Ranking + GPA + Experience)
Coefficients:
(Intercept) Ranking GPA Experience
53086.914 9.738 5449.971 1243.192
Estimated least square regression equation is,
Salary = 53086.914 + 9.738 Ranking + 5449.971 GPA + 1243.192 Experience
Now consider a student with ranking 75, GPA = 3 and Experience = 7 then expected salary for this student is estimated as follows,
Salary = 53086.914 + 9.738 Ranking + 5449.971 GPA + 1243.192 Experience
Salary = 53086.914 + 9.738 (75) + 5449.971 (3) + 1243.192 (7)
Salary = 78869.521
Get Answers For Free
Most questions answered within 1 hours.