In: Statistics and Probability
A teacher believes that the third homework assignment is a key predictor in how well students will do on the test. Let x represent the third homework score and y the test score. A random sample of last terms students were selected and their grades are shown below. Assume scores are normally distributed.
HW3 | term |
13.3 | 59.811 |
21.9 | 87.539 |
9.7 | 53.728 |
25 | 96.283 |
5.4 | 39.174 |
13.2 | 66.092 |
20.9 | 89.729 |
18.5 | 78.985 |
20 | 86.2 |
15.4 | 73.274 |
25 | 93.25 |
9.7 | 52.257 |
6.4 | 43.984 |
20.2 | 79.762 |
21.8 | 84.258 |
23.1 | 92.911 |
23 | 87.82 |
11.4 | 45.034 |
14.9 | 71.869 |
18.4 | 76.704 |
15.1 | 60.431 |
15 | 65.15 |
16.8 | 77.208 |
Approximately what
percentage of the variation in the test grade is accounted for by
the HW3 grade in this model?
Place your answer, rounded to 1 decimal place, in the blank. Do not
use any stray punctuation marks or a percentage sign. For example,
78.9 would be a legitimate entry.
Solution :
Here test grades depends on HW3 grades. Hence HW3 grade is independent variable and test grade (term) is dependent variable.
Hence define variables x and y as:
x: HW3 grade
y: test grade (term)
We know that percentage of variation in dependent variable explained by independent variable is measured by R_Squared value in regression analysis.
Lets perform regression analysis using R. R code :
#enter dependent variable values x=c(13.3, 21.9, 9.7, 25 , 5.4 , 13.2, 20.9, 18.5, 20, 15.4, 25, 9.7, 6.4, 20.2, 21.8, 23.1, 23, 11.4, 14.9, 18.4, 15.1,15, 16.8)
#enter independent variable values
y=c(59.811, 87.539, 53.728, 96.283, 39.174 , 66.092, 89.729, 78.985 , 86.2, 73.274, 93.25, 52.257, 43.984, 79.762 , 84.258 , 92.911 , 87.82 , 45.034 , 71.869, 76.704, 60.431 , 65.15 , 77.208
)
#fit the regression model using lm() function
model = lm( y~x)
model
#summay of model
summary(model)
Output :
Call:
lm(formula = y ~ x)
Coefficients:
(Intercept) x
23.395 2.925
Call:
lm(formula = y ~ x)
Residuals:
Min 1Q Median 3Q Max
-11.7024 -2.5968 0.0937 3.0273 5.2084
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 23.3954 2.7998 8.356 4.07e-08 ***
x 2.9247 0.1591 18.388 2.00e-14 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 4.245 on 21 degrees of freedom
Multiple R-squared: 0.9415, Adjusted R-squared: 0.9387
F-statistic: 338.1 on 1 and 21 DF, p-value: 1.999e-14
Conclusion :
From the regression analysis report, we have value of R squared is 0.9415
Hence percentage of variation explained in test grade accounted for by HW3 grade is 0.9415×100=94.15 i.e 94.2.
Answer : 94.2