In: Statistics and Probability
The table below gives the number of hours ten randomly selected students spent studying and their corresponding midterm exam grades. Using this data, consider the equation of the regression line, yˆ=b0+b1xy^=b0+b1x, for predicting the midterm exam grade that a student will earn based on the number of hours spent studying. Keep in mind, the correlation coefficient may or may not be statistically significant for the data given. Remember, in practice, it would not be appropriate to use the regression line to make a prediction if the correlation coefficient is not statistically significant.
Hours Studying | 1 | 1.5 | 2 | 2.5 | 3 | 3.5 | 4.5 | 5 | 5.5 | 6 |
---|---|---|---|---|---|---|---|---|---|---|
Midterm Grades | 64 | 69 | 73 | 75 | 79 | 83 | 84 | 85 | 97 | 99 |
Step 1 of 6:
Find the estimated slope. Round your answer to three decimal places.
Step 2 of 6:
Find the estimated y-intercept. Round your answer to three decimal places.
Step 3 of 6:
Determine if the statement "Not all points predicted by the linear model fall on the same line" is true or false.
Step 4 of 6:
Find the estimated value of y when x=4.5x=4.5. Round your answer to three decimal places.
Step 5 of 6:
Find the error prediction when x=4.5x=4.5. Round your answer to three decimal places.
Step 6 of 6:
Find the value of the coefficient of determination. Round your answer to three decimal places.
I used R software to solve this question.
R codes and output:
hours=c(1,1.5,2,2.5,3,3.5,4.5,5,5.5,6)
> grade=c(64,69,73,75,79,83,84,85,97,99)
> fit=lm(grade~hours)
> summary(fit)
Call:
lm(formula = grade ~ hours)
Residuals:
Min 1Q Median 3Q Max
-5.5583 -0.9865 0.7548 1.7461 3.2938
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 59.0799 2.1135 27.95 2.90e-09 ***
hours 6.2957 0.5526 11.39 3.18e-06 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 2.884 on 8 degrees of freedom
Multiple R-squared: 0.9419, Adjusted R-squared: 0.9347
F-statistic: 129.8 on 1 and 8 DF, p-value: 3.183e-06
> data=data.frame(hours=4.5)
> predict(fit, newdata=data)
1
87.41047
Step 1
Slope = 6.296
Step 2
y - intercept = 59.080
Step 3
True
Step 4
When X= 4.5 then Y = 87.410
Step 5
Error = observed value - predicted value = 84 - 87.410 = -3.410
Step 6
Coefficient of determination = Multiple R - Squared = 0.942