Test 2 Solutions Comments

1
Math 243 – Spring 2007 – Test 1
Name
Show all your work. Unsupported answers will not receive full credit. No mystery numbers please! If you use R
or your calculator, be sure to indicate both what you entered and the result. If you want to load the R extras I have
written, type getCalvin(’m243’).
True/False. Indicate your answer by writing a ‘T’ or an ‘F’ in the margin to the left of the item.
1. True/False. If they are computed from the same data, a 90% confidence interval will be wider than a 95%
confidence interval.
2. True/False. Every hypothesis test that is significant at the α = 0.05 level is also significant at the α = 0.01
level.
3. True/False. Every hypothesis test that is significant at the α = 0.01 level is also significant at the α = 0.05
level.
4. True/False. A campus newspaper reports a 95% confidence interval for the mean weight (in pounds) of male
students at that school to be 180 ± 15. This means that 95% of the male students weigh between 165 and 195 pounds.
5. True/False. We can decrease the rate of type I error by increasing the sample size.
6. True/False. We can increase the power of a statistical test by increasing the sample size.
7. True/False. When doing a hypothesis test, if the p-value is large, it means that the null hypothesis is true.
Give a brief explanation of your answer in the space below.
2
Math 243 – Spring 2007 – Test 1
8. Short Answer.
a) In the context of statistical inference, what is the difference between a parameter and a statistic? Illustrate the
difference with a well-chosen example.
b) What is a sampling distribution? (Give a careful but brief description.)
9. A random sample of 20 mothers was taken. Their ages at the birth of their first child were recorded. Here are
some summary statistics from this sample.
> favstats(mother$age)
0%
25%
50%
75%
100%
mean
15.000000 19.000000 22.500000 25.000000 29.000000 22.400000
sd
4.018379
Use this information to compute a 95% confidence interval for the mean age of a mother at the birth of her first child.
Math 243 – Spring 2007 – Test 1
3
What do I do? In each of the following situations, pretend you want to know some information and you are
designing a statistical study to find out about it. Give the following THREE pieces of information for each: (i), what
variables you would need to have in your data set (ii) whether they are categorical or quantitative, and (iii)
what statistical procedure you would use to analyze the results.
Select your procedures from the following list: 1-proportion, 2-proportion, 1-sample Z, 1-sample t, paired t, 2sample t, (Some procedures may be repeated or omitted. For some situations there may be more than one solution –
one correct solution suffices – but do not choose a design that is clearly inferior to other designs.)
Record your answers below. The first one has been done as an example.
10. You want to know if boys or girls score better on reading tests at your grade school.
Variables: reading score (quant), gender (cat);
Procedure: 2-sample t;
11. You want to estimate what fraction of the people in Kent County have never smoked a cigarette.
Variables:
Procedure:
12. You want to estimate the typical amount of fat in a Twinkie. (A Twinkie is a sweet snack “food” item).
Variables:
Procedure:
13. You want to know if female college students are more likely to have voted in the last presidential election than
male college students.
Variables:
Procedure:
14. You want to know if people can click a ball point pen faster with their dominant hand (right hand if right-handed)
or their non-dominant hand.
Variables:
Procedure:
15. You suspect that male Calvin students work more hours per week than female Calvin students and you want to
know if this is really so.
Variables:
Procedure:
4
Math 243 – Spring 2007 – Test 1
16. Match the histograms to their normal quantile plots by placing the appropriate letters in the blanks below.
X:
Y:
Z:
17. You flip a coin 100 times and get 42 heads. Should you suspect that the coin is biased? Justify your answer
using statistics.
18. A local paper wants to predict the outcome of a vote on a local referendum. The plan is to use a random-digit
dialer to call voters in their city. Each qualifying responder (reponders must claim to be registered to vote in the
appropriate jurisdiction to qualify) will be asked whether they favor or oppose the referendum that will be on the
upcoming ballot.
You have been asked to consult the newspaper because the editor doesn’t know much statistics. The editer wants to
be able to publish his results with “a margin of error of 4%, whatever that means.” When you ask what confidence
level to use, the editor says “how about 90%?” Your job is to tell the newspaper how large the sample must be.
What is the smallest number of qualifying people that must be contacted to acheive a margin of error no more than
4% with 90% confidence regardless of the percentage of the population that is in favor of the referendum?
Math 243 – Spring 2007 – Test 1
5
19. In an experiment to measure the effects of sleep deprivation on learning, Stickgold, James, and Hobson (2000)
investigated whether subjects could “make up” for sleep deprivation by getting a full night’s sleep in subsequent
nights. 21 subjects (18–25-year-old volunteers) were randomly placed into to groups. Each group was given a visual
discrimination task. That night, one group was permitted to sleep normally, the other group was deprived of sleep.
The following two nights all subjects were allowed to sleep normally. The subjects were then retested (three days after
the original test) to see how much improvement (or worsening) there was in their scores.
a) Is this an observational study or an experiment? Explain.
b) Is this a paired design? Explain.
Here is some R output from the resulting data.
> t.test(improvement~sleep.condition,sleep)
Welch Two Sample t-test
data: improvement by sleep.condition
t = -2.6851, df = 17.557, p-value = 0.01535
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
-28.398779 -3.441221
sample estimates:
mean in group deprived mean in group unrestricted
3.90
19.82
c) State the null and alternative hypotheses being tested in both symbols and words.
d) What do you conclude based on the output above?
e) The p-value is a probability. Carefully explain what the p-value given above measures by finishing one of the two
following phrases, “The p-value is the probability . . . ” or “The p-value indicates how often . . . ” (or something
similar).
Math 243 – Spring 2007 – Test 1
6
Solutions
1. False. Higher confidence yields wider intervals. This can be seen by noticing that n occurs in the denominator of
the standard error expressions. It also makes intuitive sense: The more information you have, the more accurately
you can estimate something.
2. False. If the p-value is 0.03, for example, then the result is significant at the 0.05 level but not at the 0.01 level.
3. True. If the p-value is less than 0.01, then it is certainly less than 0.05.
4. False. The 95% refers to the probability that the confidence interval for a random sample will contain the mean
of the population. That is, 95% of samples drawn using this method will lead to CI’s that contain the true mean of
the population.
5. False. If the null hypothesis is true, the rate of type I error is determined by the α threshold chosen and will be
the same for any size sample.
6. True.
7. False. The large p-value only says that the value of your test statistic would not be that unusual if the null
hypothesis were true, but there may be other hypotheses besides the null hypothesis that also explain this.
8. (a) A parameter is a number that describes a population or process; a statistic is a number that describes a sample.
(b) A statistic computed from a sample can be treated as a random variable, since its value is random – it depends
on which items are in the sample, which is determined randomly. The distribution of this random variable is called a
sampling distribution. Note that this is not about the distribution of a sample, rather it is about the distribution of
the statistic across all (possible) samples.
9. One Sample t-test
data: age t = 24.9294, df = 19, p-value = 5.612e-16 alternative hypothesis: true mean is not equal to 0 95 percent
confidence interval: 20.51934 24.28066 sample estimates: mean of x 22.4
10. reading score (quant), gender (cat); 2-sample t;
11. whether a person has smoked a cigarette (cat); 1-proportion
12. fat in twinkie (quant); 1-sample t;
13. ”did you vote?”(cat), gender (cat) – 2-proportion
7
Math 243 – Spring 2007 – Test 1
14. number of clicks per minute with dom. hand (quant), number of clicks per minute with non-dom. hand (quant)
– paired t
15. hours worked last week (quant), gender (cat); 2-sample t;
16. X = B (values in both tails are too large compared to what we expect for normal distributions)
Y = C (low values not low enough, high values not high enough
Z = A (most like normal)
17.
> prop.test(42,100)
1-sample proportions test with continuity correction
data: 42 out of 100, null probability 0.5 X-squared = 2.25, df = 1, p-value = 0.1336 alternative hypothesis: true
p is not equal to 0.5 95 percent confidence interval: 0.3233236 0.5228954 sample estimates: p 0.42
> binom.test(42,100)
Exact binomial test
data: 42 and 100 number of successes = 42, number of trials = 100, p-value = 0.1332 alternative hypothesis: true
probability of success is not equal to 0.5 95 percent confidence interval: 0.3219855 0.5228808 sample estimates:
probability of success 0.42
Using either method (or others) we get a p-value > 0.10, so getting only 42 heads is not that unusual.
18. The margin of error for a CI in this situation is z∗ SE where SE =
q
p̂(1−p̂)
.
n
We don’t know what p̂ will be, but
the largest p̂(1 − p̂) can be is .25 = .5 · .5. (The graph of p̂(1 − p̂) is a parabola with maximium value when p̂ = .5.)
So we need to choose n so that qnorm(.95) * sqrt(.5 * .5 / n) ≤ .04. This can be found algebraically or by smart
guess and check (binary search). n = 423 is large enough.
Of course, there are R methods to automate this as well. Here is a method that uses uniroot(). You must provide
uniroot() a function and an interval such that the function is positive at one endpoint and negative on the other.
Assuming the function is continuous on the interval, this means there is a zero in the interval, and uniroot will
approximate such a zero. I believe it is using a version of binary search to do this. It should work well for well-behaved
functions provided you can find an appropriate surrounding interval.
> me <- function(n) { qnorm(.95) * sqrt(.25/n) }
> mez <- function(n) { me(n) - .04 }
> uniroot(mez, c(10,10000))
$root
[1] 422.7412
> me(423)
[1] 0.03998776
> me(422)
[1] 0.04003511
>
Use ?uniroot to find out more about this function.
19. a) Experiment (because researchers determined who was deprived of sleep)
b) Yes it is paired (we have two measurements for each subject and are looking at the differences between them)
c) H0 : µ1 − µ2 = 0. (The mean improvement is the same for both groups.)
Ha : µ1 − µ2 6= 0. (The mean improvement is different in the two groups.)
d) Since the p-value is between .01 and .05 we have reasonable but not overwhelming evidence that sleep deprivation
is associated with less improvement in this visual task.
e) The p-value is the probability of seeing a difference between the two group means (for improvement) at least as
large as the difference we saw in this data set assuming that there really is no difference in the two population means.
Actually this isn’t quite right since the standard deviations come into play. Technically it is the probability of seeing
Math 243 – Spring 2007 – Test 1
8
a t-statistic at least as large as 2.6851 (in absolute value) assuming there is no difference in the means of the two
groups.