Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

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

Age: 22,22,50,43,54,24,15,23,34,18,58,19,26,15,21,30,37,44,29,27,30,17,15,21,47,26,13,39,22,20,14,47,21,38,23,32,19,15,21,18 Sex: 0,0,1,1,0,1,0,1,1,1,0,0,0,1,1,0,1,0,0,1,1,0,1,0,0,1,1,0,1,1,1,1,0,0,1,1,1,0,1,0 Num. TV: 2,2,1,1,1,1,2,1,1,1,2,1,1,1,1,2,2,2,1,1,2,1,2,1,1,1,2,2,1,1,1,1,1,1,2,1,2,1,1,2 Cable: 1,0,1,1,1,0,1,0,1,0,1,0,0,0,0,0,1,1,1,0,0,1,1,1,1,0,0,0,1,0,0,1,0,1,0,0,1,0,0,1

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 Tries

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

28,16,18,20,25,14,21,7,12,14,15,12,10,11,12,18,17,20,21,15,17,18,13,21,23,11,10,21,13,12,10,19,12,21,8,16,13,9,11,21

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

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Chat Now And Get Quote