Docsity

Stat 371 Homework 6: Confidence Intervals and Comparison of Two Independent Samples, Assignments of Statistics

Toggle sidebar
bg1
Stat 371 Homework #6 Due Thursday March 9, 2006
This assignment is about confidence intervals for a proportion as well as comparison of two
independent samples. Some problems require the use of R, as it comes very handy to avoid
tedious calculations.
1. Exercises 6.36, 6.41 and 6.48 (on p.212-213). For proportions, we did not do confidence
levels other than 95% in class, so please construct a 95% confidence interval in 6.41
(instead of a 90% CI).
2. Exercise 7.11 (p.231).
3. Exercise 7.19 (p. 233). Additionally, calculate the p-value of the data as analysed by the
t-test. Do it both ways: by hand as well as with R. To do it with R, use the commands:
> caffeine=c(28,11,-3,14,-2,-4,18,2,2) (this is to load the data)
> decaf=c(26,1,0,-4,-4,14,16,8,0,18,-10)
> t.test(caffeine,decaf)
The last command will give you (among other things) a 95% confidence interval for the
difference µcaffeine āˆ’Āµdecaf . Try also
> t.test(decaf,caffeine)
It is about µdecaf āˆ’Āµcaffeine instead. See what happens. The following command will get
you a different confidence level:
> t.test(caffeine,decaf, conf.level=.80)
Plot a normal probability plot for each data set, with
> qqnorm(caffeine)
> qqnorm(decaf)
and determine whether the observations are approximately normally distributed, or at
least not too much skewed to one side. Is the t-test valid here?
4. Exercise 7.31 (on p.245).
Readings:
•Chapter 7: sections 4 to 10.
Cecile Ane

Partial preview of the text

Download Stat 371 Homework 6: Confidence Intervals and Comparison of Two Independent Samples and more Assignments Statistics in PDF only on Docsity!

Stat 371 Homework #6 Due Thursday March 9, 2006

This assignment is about confidence intervals for a proportion as well as comparison of two independent samples. Some problems require the use of R, as it comes very handy to avoid tedious calculations.

  1. Exercises 6.36, 6.41 and 6.48 (on p.212-213). For proportions, we did not do confidence levels other than 95% in class, so please construct a 95% confidence interval in 6. (instead of a 90% CI).
  2. Exercise 7.11 (p.231).
  3. Exercise 7.19 (p. 233). Additionally, calculate the p-value of the data as analysed by the t-test. Do it both ways: by hand as well as with R. To do it with R, use the commands:

    caffeine=c(28,11,-3,14,-2,-4,18,2,2) (this is to load the data) decaf=c(26,1,0,-4,-4,14,16,8,0,18,-10) t.test(caffeine,decaf)

The last command will give you (among other things) a 95% confidence interval for the difference μcaffeine āˆ’ μdecaf. Try also

t.test(decaf,caffeine) It is about μdecaf āˆ’ μcaffeine instead. See what happens. The following command will get you a different confidence level: t.test(caffeine,decaf, conf.level=.80)

Plot a normal probability plot for each data set, with

qqnorm(caffeine) qqnorm(decaf) and determine whether the observations are approximately normally distributed, or at least not too much skewed to one side. Is the t-test valid here?

  1. Exercise 7.31 (on p.245).

Readings:

  • Chapter 7: sections 4 to 10.

Cecile Ane