In: Statistics and Probability
Numerous studies have shown that watching too much television hurts school grades. Others have argued that television is not necessarily a bad thing for children (Psychology Today, October 22, 2012). Like books and stories, television not only entertains, it also exposes a child to new information about the world. While watching too much television is harmful, a little bit may actually help. Researcher Matt Castle gathers information on the grade point average (GPA) of 28 middle school children and the number of hours of television they watched per week. A portion of the data is shown in the accompanying table.
a. Estimate a quadratic regression model where the GPA of middle school children is regressed on hours and hours-squared. (Negative values for regression coefficients should be indicted by a minus sign. Round your answers to 4 decimal places.)
constant:
hours:
hours squared:
b.Is the quadratic term in this model justified?
c.Find the optimal number of weekly hours of TV for middle school children.(Round intermediate calculations to at least 4 decimal places and final answer to 2 decimal places.)
Optimal number of weekly hours:
Be sure to show your code in Rstudio.
values (column 1): GPA 3.24 3.1 3.24 2.61 3.03 3.37 1.6 3.2 2.96 2.18 2.5 2.95 2.72 2.86 3.45 2.49 3.62 2.33 2.36 3.28 3.35 2.64 2.88 2.02 2.6 3.18 3.31.......... and for the values for column 2: Hours 19 21 18 30 23 10 36 10 13 31 33 4 25 21 8 27 11 29 30 10 15 18 24 29 22 21 4
a)
Answer:
Explanation:
The quadratic regression model is defined as,
The regression analysis is done in R.
R code:
GPA<-c(3.24, 3.1, 3.24, 2.61, 3.03, 3.37, 1.6, 3.2, 2.96,
2.18, 2.5, 2.95, 2.72, 2.86, 3.45, 2.49, 3.62, 2.33, 2.36, 3.28,
3.35, 2.64, 2.88, 2.02, 2.6, 3.18, 3.31)
Hours<-c(19, 21, 18, 30, 23, 10, 36, 10, 13, 31, 33, 4, 25, 21,
8, 27, 11, 29, 30, 10, 15, 18, 24, 29, 22, 21, 4)
m <- lm(GPA ~ poly(Hours,2,raw=TRUE))
summary(m)
R output:
The regression equation is,
b)
Answer:
No, because the estimated coefficient for Hours is not statistically significant at the 5% level.
Explanation:
From the regression output summary,
P-value | Significance level | |||
Hour | 0.11392 | > | 0.05 | Not significant |
Hour^2 | 0.00125 | < | 0.05 | Significant |
The p-value for the estimated coefficient for Hours is greater than 0.05 at a 5% significance level, hence the variable hour is not significant in the model.
c)
Explanation:
The optimal value is obtained by solving the quadratic equation using the quadratic formula,
The equation cal be written as,
a = -0.0021, b = 0.0375, c = 3.1154
Uisng the quadratic formula,
negative value is not possible hence, the optimal value is,