Question 6 A state official was investigating the relationship between salary (x
ID: 3362029 • Letter: Q
Question
Question 6 A state official was investigating the relationship between salary (x) and the number of absences (y) for state employees. The variable y in the following table represents the average number of absences per year for employees at that salary x Eploye bsences Salary (x) in thousands 20.0 22.5 25.0 27.5 30.0 32.5 35.0 37.5 40.0 2.3 2.0 2.0 4 2.2 1.5 1.2 1.3 0.6 Using the above information, please determine the following a. b. c. Find the linear equation of regression of absences on salary for the line of best fit Compute the correlation coefficient (r) Please estimate the average number of absence for an employee earning $29,000Explanation / Answer
SOlution:
code in R:
absences <- c(2.3,2,2,1.8,2.2,1.5,1.2,1.3,0.6)
salinthousands <- c(20,22.5,25,27.5,30,32.5,35,37.5,40)
mod1 <- lm(absences~salinthousands)
summary(mod1)
Output
Call:
lm(formula = absences ~ salinthousands)
Residuals:
Min 1Q Median 3Q Max
-0.33556 -0.09556 -0.03556 0.02444 0.54444
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 3.81556 0.42276 9.025 4.19e-05 ***
salinthousands -0.07200 0.01378 -5.226 0.00122 **
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 0.2668 on 7 degrees of freedom
Multiple R-squared: 0.796, Adjusted R-squared: 0.7669
F-statistic: 27.31 on 1 and 7 DF, p-value: 0.001218
regreesion eq from output is
number of absences=3.81556-0.07200 (salary)
slope=-0.07200
y intercept=3.81556
Solutionb:
r= -0.8921863
there exists a string negative relationship between
absences and salary
as no of absences increases ,salary decreases and vice versa
Solutionc:
substtitute X=29 in the regression eq obtained
number of absences=3.81556-0.07200 (salary)
number of absences=3.81556-0.07200 (29)
=1.727
=1.73
no of absences=1.73
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.