Use Minitab , R, or your preferred software for this question, but calculate the
ID: 3219480 • Letter: U
Question
Use Minitab, R, or your preferred software for this question, but calculate the 90% confidence interval for the coefficient for cable by hand (but use the SE from the software output) and do the test whether age and number of TVs should be dropped by hand (but use the ANVOA tables from software).
The data in the table below contains observations on age, sex (male = 0, female = 1), number of television sets in the household, cable (no = 0, yes = 1), and number of hours of television watched per week. Using hours of television watched per week as the response, you can use Minitab's Regress or R's lm() command [e.g., model <- lm(hours~age+sex+num.tv+cable)] to fit a least squares regression model to all the other given variables.
Hours TV:
Test whether age and number of TV sets are needed in the model or should be dropped. What is the value of the test-statistic? [3 pt(s)]
Select the interval below that contains the p-value for this test.
p-value 0.001
0.001 < p-value 0.01
0.01 < p-value 0.05
0.05 < p-value 0.1
0.1 < p-value 0.25
p-value > 0.25
Hours TV:
Test whether age and number of TV sets are needed in the model or should be dropped. What is the value of the test-statistic? [3 pt(s)]
Incorrect. Tries 2/3 Previous Tries What are the degrees of freedom associated with this test? Numerator: Denominator: [1 pt(s)] Incorrect. Tries 2/3 Previous TriesSelect the interval below that contains the p-value for this test.
p-value 0.001
0.001 < p-value 0.01
0.01 < p-value 0.05
0.05 < p-value 0.1
0.1 < p-value 0.25
p-value > 0.25
Explanation / Answer
On running the command, I get the below output.
> model <- lm(hours~age+sex+num.tv+cable)
> summary(model)
Call:
lm(formula = hours ~ age + sex + num.tv + cable)
Residuals:
Min 1Q Median 3Q Max
-9.245 -1.379 0.399 2.521 4.781
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 11.46871 2.36716 4.845 2.56e-05 ***
age 0.14654 0.05129 2.857 0.00715 **
sex1 -2.77782 1.14692 -2.422 0.02075 *
num.tv -0.22757 1.17383 -0.194 0.84740
cable1 3.00755 1.24984 2.406 0.02153 *
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 3.45 on 35 degrees of freedom
Multiple R-squared: 0.5169, Adjusted R-squared: 0.4616
F-statistic: 9.361 on 4 and 35 DF, p-value: 2.973e-05
The standard error of the coefficient of cable is 1.24984
Z-value for 90% confidence interval is 1.644
So, margin error = standard error * Z-value = 1.24984*1.644 = 2.054737
coefficient of the cable = 3.00755
90% confidence interval is ( 3.00755 - 2.054737, 3.00755 + 2.054737)
= (0.952813, 5.062287)
Running anova, we get,
> anova(model)
Analysis of Variance Table
Response: hours
Df Sum Sq Mean Sq F value Pr(>F)
age 1 271.62 271.622 22.8173 3.143e-05 ***
sex 1 104.99 104.990 8.8196 0.005353 **
num.tv 1 0.18 0.184 0.0155 0.901642
cable 1 68.93 68.931 5.7905 0.021528 *
Residuals 35 416.65 11.904
Critical value of F for 90% confidence interval is 4.121338
> qf(0.95,1,35)
[1] 4.121338
As, the F-value for age (22.8173) > critical value, age cannot be dropped.
As, the F-value for num.tv (0.0155) < critical value, num.tv can be dropped from the model.
What are the degrees of freedom associated with this test?
Numerator degree of freedom = 1
Denominator degree of freedom = 35
What is the value of the test-statistic?
For age - F-value = 22.8173
For num.tv , F-value = 0.0155
The p-value interval should be 0.01 < p-value 0.05
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.