load(url("http://www.rossmanchance.com/iscam3/ISCAM.RData"))
library(dplyr)
library(ggplot2)
homework at: http://www.rossmanchance.com/iscam3/instructors.html
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 |
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.
The relevant parameter for this study can be symbolized as \(\mu_{men} - \mu_{women}\). Describe what this parameter means in this context.
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 |
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.
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.
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.
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.
Are the technical conditions for the two-sample t-test satisfied here? Explain.
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.
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.
Feeling Motivated?
Reconsider the previous study.
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.
Open the creativity.txt file (http://www.rossmanchance.com/iscam2/data/creativity.txt). Are the data in stacked or unstacked format?
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.
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.
Use R to compute a 95% confidence interval comparing the two groups. Include your output and interpret the interval.
Using the confidence interval, does 10 appear to be a plausible value for the difference in the underlying treatment means? Explain your reasoning.
Use R to carry out the two-sample t-test to obtain a p-value. How does the analysis compare?