In: Math
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 (use ANVOA table to get p-value and confirm with 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.
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: | 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 |
What is the estimated value of the regression coefficient for age? [2 pt(s)]
Tries 0/3 |
What is the estimated value of the regression coefficient for cable? [2 pt(s)]
Tries 0/3 |
According to the regression equation, which of the following
statements is true?
Females watch television 3.577 hours more per week than
males.
Males watch television 3.577 hours more per week than
females.
From the data given, one can not tell which gender watches more
television per week.
Females watch television approximately the same number of hours per
week as males.
[2 pt(s)]
Tries 0/1 |
What is the value of the test-statistic for the overall regression significance test? [3 pt(s)]
Tries 0/3 |
What are the degrees of freedom associated with the test-statistic? Numerator: Denominator: [1 pt(s)]
Tries 0/3 |
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
[3 pt(s)]
Tries 0/3 |
Compute a 90% confidence interval for the coefficient for cable. Lower Bound: Upper Bound: [3 pt(s)]
Tries 0/3 |
Compute a 95% confidence interval for the mean number of hours watched by 18-year old females with cable and 2 TV sets. Lower Bound: Upper Bound: [3 pt(s)]
Tries 0/3 |
Compute a 95% prediction interval for the mean number of hours watched by 18-year old females with cable and 2 TV sets. Lower Bound: Upper Bound: [3 pt(s)]
Tries 0/3 |
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)]
Tries 0/3 |
What are the degrees of freedom associated with this test? Numerator: Denominator: [1 pt(s)]
Tries 0/3 |
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
[3 pt(s)]
Tries 0/3 |
The estimated value of the regression coefficient for age=0.1000
The estimated value of the regression coefficient for cable=4.1985
Males watch television 3.577 hours more per week than females.
(Since the estimated value of the regression coefficient for sex=-3.577)
the test-statistic for the overall regression significance test=12.62
The degrees of freedom associated with the test-statistic:4 and 35 DF (Numerator=4, Denominator=35)
Select the interval below that contains the p-value for this
test.
p-value ≤ 0.001
90% confidence interval for the coefficient for cable
:
(4.19849-t0.05,35x1.21864, 4.19849+t0.05,35x1.21864)=(2.1395, 6.2575)
where t0.05,35=1.6896
95% confidence interval for the mean number of hours watched by 18-year old females with cable and 2 TV sets.
Lower Bound: 12.93179
Upper Bound: 18.67932
95% prediction interval for the mean number of hours watched by 18-year old females with cable and 2 TV sets.
Lower Bound: 8.396038
Upper Bound: 23.21507
R code:
age=c(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=c(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=c(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=c(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=c(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)
model <- lm(hours~age+sex+num.tv+cable)
summary(model)
newdata = data.frame(age=18,sex=1,num.tv=2,cable=1)
predict(model, newdata , interval="confidence", level=.95)
predict(model, newdata , interval="predict", level=.95)