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

Stat 311 Homework 7

This assignment parallels HW6 and requires the same data sets. Thus, no template is provided. You can start with the template for HW6 and modify as needed or start with your Rmd file for HW6 and modify as necessary.

•   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. Use tsum.test if you only have summary data. Do NOT use z.test or

zsum.test.

•   For all hypothesis tests, be sure to state the null and alternative hypotheses using symbols, the value of the test statistic (including df if applicable), the p-value, the decision, and a conclusion in the context of the problem.

•   You will need to install the BSDA library before you start. You need this library for problem 6.

Ice Cream Data Set

1.   Testing a claim

a.   Test the claim that students with a preference for vanilla ice cream have mean video scores that are different than students that prefer strawberry ice cream. Use a 5% significance level. Assume the   population variances are not equal. (5 points)

b.   Set up a permutation test for the test in part (a) with set.seed(25). You do NOT need to restate   hypotheses, but you should show the histogram of the null distribution with a vertical line showing     the observed test statistic. Report the p-value for the permutation test. How does it compare with the   p-value from the test in part (a)? Do you make the same conclusion as in (a)? [Hint:  you need to        make a subset of the ice cream data that only has the flavors vanilla and strawberry; also do not forget to add the infer package in the set up chunk at the top of the Rmd file]. (3 points)

c.   Do you think the statistical test results from parts (a and b) have practical significance? (1 point)

Birthweight Data Set

2.   Consider birthweights for mothers that are smokers and nonsmokers.

a.   Use R as a calculator to do the “by-hand” calculations (means to show the steps as if you were           solving by hand) to test the claim that the proportion of low birthweight babies is higher for mothers that smoked (use smoked – did not smoke) at the 5% significance level. Show your work in the R      chunk. Assume large sample conditions are met. [be sure to follow all steps for hypothesis testing for this part] (5 points)

b.   Repeat the test in part a) using prop.test in R. You do not need to restate the hypotheses and  other information, as you should get comparable results and the same conclusion. Show that the    square root of the chi-square test statistic from prop.test is equal to the z-score you got in part (a), within rounding error. (2 points)

c.   Do you have confidence in the results of the tests from part a) and part b)? Briefly explain. (1 point)

Cholesterol Data Set

3.   This problem was modified fromhere. 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.

a.   Using a 5% significance level, test the claim that a diet that includes oat bran decreases serum cholesterol. (5 points)

b.   Construct an appropriate confidence interval that is equivalent to the test in part (a). Explain your choice of interval, and report and interpret the interval. (2 points)

No Data Set

4.   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 test 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

25

22.5

3.77

Placebo

18

25.2

3.85

a.   Use a 0.05 significance level to test the claim that the treatment and placebo groups come from populations with the same mean. Assume equal population variances. (5 points)

b.   Do you agree with the assumption of equal population variances used in the test in (a)? Support your answer with some numbers as part of your explanation. (1 point)