Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

Stat 311 Homework 6

This assignment requires the ice cream, birthweight, and cholesterol data sets provided with the assignment. See the data description documents for the ice cream and birthweight data sets for keys to coded variables and applicable units.

· Problems 1 and 2 use the ice cream data set. Problems 3 and 4 use the birthweight data set, problem 5 uses the cholesterol data set and problem 6 does not require a data set.

· Use the T distribution for all problems involving means, even if the sample size is large. Use t.test for any problems with raw data for CIs about means. Use the custom functions in the template for CIs for means when you only have summary data.

· Make sure to interpret all confidence intervals in the context of the problem.

· Be sure to add $conf.int at the end of built-in R function calls so that only CI output is shown.

Ice Cream Data Set

1. Calculate the 98% confidence interval for the population mean video score “by-hand” by coding the steps in R. Then use an R function to check your results. Report and interpret the interval in the context of the problem. (2 points)

2. Estimate the minimum sample size needed to estimate video scores in Problem 1 within a margin of error of 1 point with 98% confidence. (2 points)

3. Calculate the 95% confidence interval for the difference in population mean puzzle scores for students that prefer chocolate and vanilla ice creams “by-hand” by coding the steps in R. Then use an R function to check your results. Report and interpret the interval in the context of the problem. Assume the population variances are not equal when doing your calculations. (2 points)

4. Do you agree or disagree with the variance assumption made in Problem 3? Support your answer by considering the rule of thumb presented in lecture combined with your understanding considerations regarding pooling or not pooling variances. (2 points)

Birthweight Data Set

5. Calculate the 90% confidence interval for the population proportion of smokers “by-hand” by coding the steps in R. Then use an R function to check your results. Report and interpret the interval in the context of the problem. Assume the large enough sample conditions are met. (2 points)

6. Estimate the minimum sample size needed to estimate the proportion of smokers in Problem 5 within a margin of error of 5% with 90% confidence. (2 points)

7. Calculate the 90% confidence interval for the difference in the population proportion of low birthweight babies of non-smokers and smokers “by-hand” by coding the steps in R. Then use an R function to check your results. Report and interpret the interval in the context of the problem. Assume large sample conditions are met. (2 points)

8. Are the large sample conditions met for the estimation in Problems 5 and 7? Explain. (1 point)

Cholesterol Data Set

9. This problem was modified from here. This study used a cross-over trial experiment to investigate whether eating oat bran lowered serum cholesterol levels. Twelve individuals were randomly assigned a diet that included either oat bran or corn flakes. After two weeks on the initial diet, serum cholesterol (mmol/L) was measured and then participants were “crossed-over” to the other diet. After two-weeks on the second diet, cholesterol levels were measured again.

Calculate the 99% confidence interval for the population difference in mean serum cholesterol for people eating oat bran and those eating cornflakes “by-hand” by coding the steps in R. Then use an R function to check your results. Report and interpret the interval in the context of the problem. (2 points)

No Data Set

10. In clinical experiments involving distinct groups of independent samples, it is important that the groups be similar in the important ways that affect the experiment. In an experiment designed to assess the effectiveness of paroxetine for treating bipolar depression, subjects were measured using the Hamilton depression scale with the summary results given below (based on data from a “Double-Blind, Placebo- Controlled Comparison of Imipramine and Paroxetine in the Treatment of Bipolar Depression,” by Nemeroff et al., American Journal of Psychiatry, Vol. 158, No. 6). [lower scores indicate lower depression]

n

s

Treatment

18

22.5

3.77

Placebo

25

25.2

3.85

Calculate the 90% confidence interval for the population difference in mean Hamilton depression scale scores for the treatment and placebo groups “by-hand” by coding the steps in R. Then use an R function to check your results. Report and interpret the interval in the context of the problem. Assume equal population variances when doing your calculations. (2 points)