Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
(a) Construct a 90% confidence interval for the true mean TCDD level
in the plasma of all Vietnam veterans exposed to Agent Orange.
(b) Interpret the interval in part (a).
(c) What assumptions are you making?
1
(d) Compute a 95% confidence interval for the difference in mean union-
ization rates within each group of states. What assumptions are you
making?
(e) At level α = 0.10, test the null hypothesis that the mean unioniza-
tion rate is the same within each group. What assumptions are you
making? What can you conclude?
(f) Repeat the test in (e) using the function lm.
Q. 3) (a) (RABE, 2.7) Load the Anscombe quartet data into R, located at
http://www-stat.stanford.edu/˜jtaylo/courses/stats191/data/anscombe.table
using the command read.table.
(b) Attach the table using the command attach.
(c) Plot the 4 data sets on a 2-by-2 grid of plots using the commands
plot and par(mfrow=c(2,2)). Add the number of each plot as the
main title on each plot.
(d) Fit a regression model to the data sets:
• Y1 ˜X1
• Y2 ˜X2
• Y3 ˜X3
• Y4 ˜X4
using the command lm. Verify that all the fitted models have the
exact same coefficients.
(e) Using the command cor, compute the sample correlation for each
data set.
(f) Fit the models with X and Y reversed
• X1 ˜Y1
• X2 ˜Y2
• X3 ˜Y3
• X4 ˜Y4
Using the command summary, does anything about the results stay
the same when you reverse X and Y ?
(g) Compute the SSE, SST and R2 value for each data set. Use the
commands mean, sum, predict.
(h) Using the command summary, verify that all 4 models have exactly
the same t-statistics for testing the hypotheses H0 : β0 = 0 and
H0 : β1 = 0.
(i) Using the command abline, replot the data, adding the regression
line to each plot.