In: Statistics and Probability
The following data was collected to explore how the average number of hours a student studies per night and the student's GPA affect their ACT score. The dependent variable is the ACT score, the first independent variable (x1) is the number of hours spent studying, and the second independent variable (x2) is the student's GPA.
Study Hours | GPA | ACT Score |
---|---|---|
3 | 3 | 17 |
3 | 3 | 17 |
4 | 4 | 21 |
5 | 4 | 27 |
6 | 4 | 31 |
Step 1 of 2 :
Find the p-value for the regression equation that fits the given data. Round your answer to four decimal places.
Step 2 of 2 : Determine if a statistically significant linear relationship exists between the independent and dependent variables at the 0.01 level of significance. If the relationship is statistically significant, identify the multiple regression equation that best fits the data, rounding the answers to three decimal places. Otherwise, indicate that there is not enough evidence to show that the relationship is statistically significant.
#### R Statistical
Software ####
StudyHours
= c(3,
3, 4, 5, 6)
GPA
= c(3,
3, 4, 4, 4)
ACTScore
= c(17,
17, 21, 27, 31)
model
= lm(ACTScore
~
StudyHours
+
GPA)
summary(model)
##
## Call:
## lm(formula = ACTScore ~
StudyHours + GPA)
##
## Residuals:
##
1
2
3
4
5
## -3.608e-15 3.659e-15
-3.333e-01 6.667e-01 -3.333e-01
##
##
Coefficients:
##
Estimate Std. Error t value Pr(>|t|)
## (Intercept)
4.0000 2.2730 1.760
0.2205
##
StudyHours 5.0000 0.4082
12.247 0.0066 **
##
GPA
-0.6667 0.9718 -0.686
0.5636
## ---
## Signif. codes: 0 '***'
0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error:
0.5774 on 2 degrees of freedom
## Multiple R-squared:
0.9957, Adjusted R-squared: 0.9914
## F-statistic: 231.8 on 2
and 2 DF, p-value: 0.004296
#### Step 1 of 2:
####
pvalue
= 1 -
pf(summary(model)$fstatistic[1],
summary(model)$fstatistic[2],
summary(model)$fstatistic[3])
round(pvalue,
4)
## value
##
0.0043
#### Step 2 of 2:
####
# as
the pvalue < alpha = 0.01, implies that there exist a
statistically significant
#
relationship between the independent and the dependent
variable
intercept
= summary(model)$coefficients[1,
1];intercept
## [1] 4
Coefficient_X1 = round(summary(model)$coefficients[2, 1], 3);Coefficient_X1
## [1] 5
Coefficient_X2 = round(summary(model)$coefficients[3, 1], 3);Coefficient_X2
## [1] -0.667
## regression equation is y = 4 + 5*x1 - 0.667*x2