Homework 9.5 (not due!)

load(url("http://www.rossmanchance.com/iscam3/ISCAM.RData"))
library(dplyr)
library(ggplot2)
homework at: http://www.rossmanchance.com/iscam3/instructors.html

Chapter 4 HW 9

Low Carb Diet

A study by Foster el al., reported in The New England Journal of Medicine (May, 2003), investigated the effectiveness of a popular “low-carb” diet. The researchers randomly assigned 63 obese men and women to either a low-carbohydrate, high-protein, high-fat (Atkins) diet or a low-calorie, high-carbohydrate, low-fat (conventional) diet. The mean amount of weight lost, as percent of body weight, after 3 months, 6 months and 12 months are shown in the table below.
(The baseline weight was carried forward in the case of missing values.)

Time Diet n Mean SD

3 months

Low-carb Conventional

33 30

6.8 2.7

5.0 3.7

6 months

Low-carb Conventional

33 30

7.0 3.2

6.5 5.6

12 months

Low-carb Conventional

33 30

4.4 2.5

6.7 6.3

  1. Is this an observational study or an experiment? Explain.
  2. Identify the explanatory and response variables.
  3. Report the relevant hypotheses (in symbols) for testing whether the mean weight losses differ significantly between the two diets.
  4. Calculate the t-test statistic for testing these hypotheses at the 3-month point. Also report the p-value and your test decision at the .05 significance level.
  5. Repeat (d) for comparing the weight losses between the two diets at the 6-month point and again at the 12-month point.
  6. Summarize your conclusions from these three tests. In particular, what do you notice about the trend in the p-value as time passes, and what does that reveal?
  7. Report the 95% confidence intervals for the difference in mean weight loss between the two diets at each time point. Comment on how these confidence intervals change across the three time points.

Chapter 4 HW 42

Close Friends

One of the questions asked of a random sample of adult Americans on the 2004 General Social Survey was:

From time to time, most people discuss important matters with other people. Looking back over the last six months - who are the people with whom you discussed matters important to you? Just tell me their first names or initials.
The interviewer then recorded how many names each person gave, with the person’s sex.

  1. The relevant parameter for this study can be symbolized as \(\mu_{men} - \mu_{women}\). Describe what this parameter means in this context.

  2. State the appropriate null and alternative hypotheses (in symbols) for testing whether American men and women differ with regard to average number of close friends.
    The survey responses are summarized in the following table (and in the data file http://www.rossmanchance.com/iscam2/data/CloseFriends.txt):

Number of close friends 0 1 2 3 4 5 6 Total
Number of men responses 196 135 108 100 42 40 33 654
Number of women responses 201 146 155 132 86 56 37 813
  1. Use technology to produce graphs for comparing the distribution of number of close friends between men and women. Comment on what the histograms reveal about the shapes of the distributions.

  2. Use technology to determine the sample mean and sample standard deviation of the number of close friends for each sex. Report these with appropriate symbols. Also show how to calculate the sample means by hand from the table above.

  3. Conduct a two-sample t-test of the hypotheses from (b). Report the test statistic and p-value. State your test decision at the 0.05 significance level, and summarize your conclusion.

  4. Produce a 95% confidence interval for the difference in population means (for the number of close friends) between men and women. Also write a sentence or two interpreting what the interval reveals.

  5. Are the technical conditions for the two-sample t-test satisfied here? Explain.

  6. Now conduct a test of whether these sample data suggest that the proportion of Americans who say they have zero close friends differs between men and women. Report the hypotheses, test statistic, and p-value. State your test decision at the 0.05 significance level, and summarize your conclusion.

  7. Produce a 95% confidence interval for the difference in population proportions (who have zero close friends) between men and women. Also write a sentence or two interpreting what the interval reveals.

Chapter 4 HW 6

Feeling Motivated?
Reconsider the previous study.

  1. Suppose you thought the intrinsic motivation would, on average, add 10 points to the creativity scores. Specify the corresponding null and (two-sided) alternative hypotheses.

  2. Open the creativity.txt file (http://www.rossmanchance.com/iscam2/data/creativity.txt). Are the data in stacked or unstacked format?

  3. Copy and paste the data into the Randomization Test applet (http://www.rossmanchance.com/applets/AnovaShuffle.htm). This applet lets you specify a hypothesized group 1 effect. Specify 10 as the hypothesized group 1 effect and generate 1000 repetitions. Explain why this distribution is centered where it is.

  4. Count the samples beyond the observed difference in sample means. Does 10 appear to be a plausible value for the difference in the underlying treatment means? Explain your reasoning.

  5. Use R to compute a 95% confidence interval comparing the two groups. Include your output and interpret the interval.

  6. Using the confidence interval, does 10 appear to be a plausible value for the difference in the underlying treatment means? Explain your reasoning.

  7. Use R to carry out the two-sample t-test to obtain a p-value. How does the analysis compare?