In: Statistics and Probability
Please give numerical measures not percentage and round to the three decimal places. Thank you.
The data from data349.dat contains information on 78 seventh-grade students. We want to know how well each of IQ score and self-concept score predicts GPA using least-squares regression. We also want to know which of these explanatory variables predicts GPA better. Give numerical measures that answer these questions. (Round your answers to three decimal places.) (Regressor: IQ) R 2 Incorrect: (Regressor: Self-Concept) R 2 29% IWhich variable is the better predictor? IQ
Self Concept
obs gpa iq gender concept 1 7.94 112 2 50 2 8.292 101 2 44 3 4.643 95 2 46 4 7.47 102 2 51 5 8.882 94 1 60 6 7.585 108 2 61 7 7.65 106 2 51 8 2.412 79 2 47 9 6 117 1 64 10 8.833 113 2 34 11 7.47 104 1 57 12 5.528 105 1 44 13 7.167 90 2 45 14 7.571 98 1 61 15 4.7 121 1 48 16 8.167 114 1 70 17 7.822 114 1 64 18 7.598 117 1 63 19 4 105 2 44 20 6.231 113 1 34 21 7.643 113 2 62 22 1.76 94 2 18 24 6.419 103 1 49 26 9.648 111 2 70 27 10.7 137 1 72 28 10.58 125 2 41 29 9.429 110 2 77 30 8 101 2 58 31 9.585 124 2 72 32 9.571 133 1 58 33 8.998 109 1 49 34 8.333 110 1 50 35 8.175 108 2 29 36 8 105 2 82 37 9.333 124 1 42 38 9.5 84 2 72 39 9.167 119 2 55 40 10.14 101 1 62 41 9.999 107 1 53 43 10.76 119 2 73 44 9.763 134 2 65 45 9.41 123 2 62 46 9.167 125 2 89 47 9.348 101 2 82 48 8.167 97 2 67 50 3.647 102 2 54 51 3.408 77 1 31 52 3.936 98 2 56 53 7.167 101 2 38 54 7.647 103 2 70 55 .53 73 2 35 56 6.173 101 2 34 57 7.295 104 2 54 58 7.295 122 1 58 59 8.938 110 1 83 60 7.882 106 1 48 61 8.353 118 2 58 62 5.062 99 2 48 63 8.175 112 2 35 64 8.235 100 2 67 65 7.588 102 2 57 68 7.647 94 2 62 69 5.237 97 1 44 71 7.825 119 2 61 72 7.333 116 1 54 74 9.167 126 2 44 76 7.996 105 2 53 77 8.714 116 1 48 78 7.833 105 1 45 79 4.885 90 2 55 80 7.998 118 1 60 83 3.82 104 2 22 84 5.936 107 1 52 85 9 121 1 59 86 9.5 102 1 75 87 6.057 89 2 46 88 6.057 113 1 44 89 6.938 111 2 58
Here I am using the R software to solve it.
R-Code
aa=read.table("C:/Users/DELL/OneDrive/Desktop/New Text Document.txt",header=T)
summary(lm(gpa~iq,data=aa))
summary(lm(gpa~concept,data=aa))
OUTPUT:
Call:
lm(formula = gpa ~ iq, data = aa)
Residuals:
Min 1Q Median 3Q Max
-4.3301 -0.8448 0.2547 0.8282 4.4138
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -3.34605 1.68258 -1.989 0.0503 .
iq 0.10038 0.01555 6.457 9.1e-09 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’
1
Residual standard error: 1.698 on 76 degrees of
freedom
Multiple R-squared: 0.3542, Adjusted R-squared: 0.3457
F-statistic: 41.69 on 1 and 76 DF, p-value:
9.098e-09
Call:
lm(formula = gpa ~ concept, data = aa)
Residuals:
Min 1Q Median 3Q Max
-5.3295 -0.8105 -0.0631 1.1373 4.2335
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 3.01832 0.81114 3.721 0.000378 ***
concept 0.08118 0.01441 5.635 2.83e-07 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’
1
Residual standard error: 1.775 on 76 degrees of
freedom
Multiple R-squared: 0.2947, Adjusted R-squared: 0.2854
F-statistic: 31.75 on 1 and 76 DF, p-value:
2.829e-07
Conclusion: R-squared for iq = 35.42% and R-squared for concept = 29.47%
So the variable "iq" is better predictor to predict GPA. As both the p-value is < 0.05, both regression coefficients are significant we would say the better predictor by R-squared value.