Problem Set II: Probability, Sign Test, Z-test and the Three T-tests
1. / A pharmaceutical company would like to evaluate its newest weight-loss drug on women. Below are the weights of 12 women before and after having used the diet pill for three months. Using an alpha level of .05, test the hypothesis that the diet pill affects weight. Assume a normal distribution.
before / after
145 / 140
160 / 158
140 / 141
134 / 132
170 / 160
134 / 129
150 / 130
120 / 131
150 / 120
130 / 122
135 / 121
140 / 136
a. Which test is appropriate? Paired-Samples t-test
b. Report the null hypothesis: The diet pill does not affect weight.
c. Report the alternative hypothesis: The diet pill does affect weight.
d. Find the critical value: +/-2.20
e. Calculate the obtained statistic: 2.42



f. Make a decision:Reject the null hypothesis.
g. What does your decision mean?This pill does affect weight.
2. / For the past 8 days I have been recording the time it takes a train to arrive at my local station. My data are below (in minutes). On a particular day, when I fear I may be running late to an important appointment, I have the option to take the train or I could spend money on a cab. I reach the station and wait for the train. Construct the 95% confidence interval of my wait estimate. Would you wait or take a cab at this point? Justify your answer using the confidence interval you calculated.
x = {5, 7, 12, 14, 4, 6, 6, 7}
The mean of my sample is 7.63. The standard deviation of my sample (s) is 3.50.
tcrit ( df=7, two-tailed, alpha=.05) = +/- 2.37
Standard error = s/, so 3.50/2.83 = 1.24
95% Confidence Interval =
So we have:
7.63 + 2.37(1.24) = 10.57
and 7.63 – 2.37(1.24) = 4.69
So my confidence interval is 4.69 to 10.57minutes. Since the average wait time is 7.63 minutes, and I know theres a 95% probability the MOST I’d have to wait is 10.57 minutes, to me that’s not a long wait at all, so I’d stick around. (ps the part of the question that asks you to state whether you would or would not wait doesn’t necessarily have a right answer, however, you should still be explaining what exactly the confidence interval tells you about your wait time in this part of the answer). In other words, you should be referring to the width of the interval and what it means for your decision.
3. / The Hershey company has been receiving complains about the number of almonds in their chocolate almond bars. Customers believe Hershey’s bars contain fewer almonds than they’ve previously contained because the company is trying to spend less money on their product. In a review of the company’s records from over the course of Hershey’s history, it was documented that each bar of candy contains a mean of 13 almonds with a standard deviation of 4 almonds. A sample of 49 of last month’s chocolate bars has been collected, and has a mean of 9 almonds. Test the hypothesis ( = .05) that Hershey’s has been skimping on almonds and thus there are fewer almonds in recent chocolate bars than in previous years.
a. Which test is appropriate? Z-test
b. Report the null hypothesis: RecentHershey bars do not have fewer almonds than in previous years
c. Report the alternative hypothesis: RecentHershey bars have fewer almonds than in previous years
d. Find the critical value: zcrit (alpha = .05, one-tailed, and must be negative since we think the sample will have LESS almonds) = -1.65
e. Calculate the obtained statistic:
= = .57
= = -7.02
f. Make a decision:Reject the null hypothesis.
g. What does your decision mean? RecentHershey bars have fewer almonds than in previous years
4. / I believe that Zinc helps reduce the duration of a cold. On average, in the US, a cold lasts 7.5 days. I would like to ask a group of 14 friends to use Zinc for 1 year, and document the length of their colds (assuming they all become ill at least once that year). Using an alpha level of .01, test the hypothesis that Zinc reduces the duration of a cold, using the data below:
Name / Duration of Cold (days) / Name / Duration of Cold (days)
Perle / 3 / Diane / 5
Benjamin / 8 / Max / 9
Rosie / 12 / Kamil / 5
Greg / 5 / Briana / 6
Stephen / 4 / Rita / 11
Matt / 8 / Sibel / 7
Joanna / 17 / Stavros / 6
a. Which test is appropriate? One-sample t-test
b. Report the null hypothesis: Zinc does not reduce the duration of a cold.
c. Report the alternative hypothesis: Zinc reduces the duration of a cold.
d. Find the critical value: -2.65 (one-tailed, negative because we think theres a reduction of cold duration relative to the pop average, 13df, and alpha = .01)
e. Calculate the obtained statistic: .07
First I find the mean and standard deviation of my sample: xbar = 7.57 ; s= 3.74
= = 1
= .07
f. Make a decision: Retain the null hypothesis
g. What does your decision mean? Zinc does not reduce the duration of a cold.
5. / Assume I toss a fair coin exactly 17 times. Find the probability of the following outcomes:
a. 4 tails .0182
b. 17 tails.0000
c. 5 heads .0472
d. 17 heads .0000
e. 13 or more tails.0245
Since “13 or more” means 13, 14, 15, 16, or 17 tails, we obtain the probabilities for each of these outcomes:
P(13) = .0182
P(14) = .0052
P(15) = .0010
P(16) = .0001
P(17) = .0000
When we add these up, we get .0245.
f. 5 or less tails .0717
Again, “5 or less” means 5, 4, 3, 2, 1, or 0 tails. (Don’t forget about 0!)
P(5) = .0472
P(4) =.0182
P(3) =.0052
P(2) = .0010
P(1) = .0001
P(0) = .0000
These sum to .0717.
Now assume I toss an unfair coin (45% baseline probability for Heads) 17 times as well:
Note that if the question tells you that this coin has a 45% baseline for heads, then it must be assumed that the baseline for tails is 55%.
a. 4 tails.0068
This question is being asked in terms of tails. Remember the baseline for tails is 55%, which is NOT in the binomial table. Therefore, we have to RE-WORD it to read in terms of HEADS. If I flip a coin 17 times, and 4 of those flips came up tails, then 13 must have come up heads. Therefore, under the .45 column in the table, we look up p(13) for N=17 flips: .0068
b. 17 tails.0000
Same idea here as the question above. We need to REWORD to heads. So, 17 tails = 0 heads. P(0) under the .45 column is .0000
c. 5 heads.0875
No rewording necessary here; the question is already being asked in terms of heads. So p(5) under the .45 column is .0875
d. 17 heads.0000
Question asked in terms of heads so p(17) under the .45 column is .0000
e. 13 or more tails .0595
Because this is being asked in terms of tails, we need to reword: “13 or more” means 13, 14, 15, 16, or 17 tails, but each of these outcomes has to be reworded in terms of heads:
13 tails = 4 heads
14 tails = 3 heads
15 tails = 2 heads
16 tails = 1 head
17 tails = 0 heads
So, saying “13 or more tails” is exactly the same as “4 or less heads”. Under the .45 column, we add up p(4) + p(3) + p(2) + p(1) + p(0) = .0411 + .0144 + .0035 + .0005 + .0000 = .0595
f. 5 or less tails.0302
Because this is being asked in terms of tails, we need to reword: “5 or less” means 5, 4, 3, 2, 1, or 0 tails, but each of these outcomes has to be reworded in terms of heads:
5 tails = 12 heads
4 tails = 13 heads
3 tails = 14 heads
2 tails = 15 heads
1 tail= 16 heads
0 tails= 17 heads
So, saying “5 or less tails” is exactly the same as “12 or more heads”. Under the .45 column, we add up p(12) + p(13) + p(14) + p(15) + p(16) + p(17) = .0215 + .0068 + .0016 + .0003 + .0000 +.0000= .0302
6. / I walk into the Psych department and notice that there is a box of pens and pencils being given away for free. They are all Brooklyn College-brand pens and pencils so they all have the same size and shape—the only way to tell whether it’s a pen or a pencil is to write with it. It turns out, however, that they do vary in color. The breakdown in the box is as follows:
4 red pens
2 red pencils
2 blue pens
8 blue pencils
9 black pens
Evaluate the probability for each of the following, assuming you are starting with a fresh box for each question. (assume WITHOUT replacement for multiple reaches):
Please report all probabilities to FOUR decimal places.
a. Reaching in once and pulling out a red writing utensil?6/25 = .2400
b. Reaching in once and pulling out a blue pen? 2/25= .0800
c. Reaching in twice and pulling out a red utensil followed by a blue utensil?
(6/25)(10/24) = 60/600 = .1000
d. Reaching in three times and pulling out three blue pencils in a row?
(8/25)(7/24)(6/23) = 336/13800 = .0243
e. Reaching in 7 times and pulling out the following sequence:
Red pen, Blue pencil, Blue Pencil, Red Pen, Blue Pencil, Blue Pencil
(4/25)(8/24)(7/23)(3/22)(6/21)(5/20) = .0001581 = .0002
f. Reaching in once and pulling out either a red or a blue pen?(4/25) + (2/25) = 6/25 = .2400
g. Reaching in once and pulling out either a black pen, a blue pencil, or a red utensil?
(9/25) + (8/25) + (6/25) = 23/25 = .9200
h. Reaching in once and pulling out either a red utensil or a pen?
(6/25) + (15/25) – (4/25) = 17/25 = .6800
i. Reaching in twice and pulling out first a black pen and then either a blue utensil or a pencil?

First reach: 9/25

Second reach (out of 24, because we’ve removed a black pen):

(10/24) + (10/24) – (8/24) = 12/24

Now, since we’re looking for the probability of this sequence, we multiply the two: (9/25)(12/24) = .1800

7. / Below are pupil sizes from two samples: 8 men and 8 women (measured in millimeters). Test the hypothesis that there is a difference in pupil sizes between males and females, using an alpha level of .01.
males / females
7.7 / 8.9
7.5 / 8.7
6.9 / 9.0
7.8 / 8.8
7.7 / 7.9
6.9 / 8.8
4.5 / 9.0
7.5 / 9.0
a. Which test is appropriate? Independent-Samples t-test
b. Report the null hypothesis: There is no difference in pupil size between males and females.
c. Report the alternative hypothesis: There is a difference in pupil size between males and females.
d. Find the critical value: (2-tailed, alpha = .01, df=14) +/- 2.98
e. Calculate the obtained statistic: -4.15



f. Make a decision:Reject the null hypothesis.
g. What does your decision mean? There Is a difference in pupil size between males and females.
8. / I believe that Echinacea helps reduce the duration of a cold. On average, in the US, a cold lasts 7.5 days, with a standard deviation of 2.5 days. I would like to ask a group of 25 friends to use Echinacea for 1 year, and document the length of their colds (assuming they all become ill at least once that year). If I plan to use an alpha level of .05 for this analysis, what is the maximum cold duration average I would have to observe in my sample in order to still reject the null hypothesis?
We know that in order to compare this kind of data, we need to be using a z-test (because we have the pop mean AND the pop standard deviation). The idea here is that we are looking for the smallest possible difference to exist between our sample mean and population mean in order to JUST be able to reject the null. Remember, we expect our sample to have a smaller mean than our population.
If , then I’m looking for the sample mean which will give me exactly zobt = -1.65.

soxbar must be at most 6.675, or 6.68.
9. / A scientist would like to determine whether athletes are generally different in height than non-athletes. He asks 10 individuals (a sample of 5 athletes and a sample of 5 non-athletes) to record their heights (the table below contains known information about this data set). Using an alpha level of .05, test the hypothesis that athletes and non-athletes have different heights.
/ s
Athlete / 61” / 3.4”
Non-athlete / 64” / 1.4”
a. Which test is appropriate? Independent-samples t-test
b. Report the null hypothesis: Athletes and non-athletes do not differ in height.
c. Report the alternative hypothesis: Athletes and non-athletes differ in height.
d. Find the critical value: (alpha = .05, two-tailed, df=8) +/- 2.31
e. Calculate the obtained statistic: -1.83
We know that the tobt formula contains the pooled error estimate:

Therefore, we need to find the SS for athletes, and for non-athletes. We are given s. If you think back to the formula for s, s = √(SS/N-1). If we are GIVEN s, and need to find SS, we simply do the backwards calculations: SS = (N-1)s2
In other words, to get s, we divide SS by N-1 and take the square root. So, to get SS, we need to square s and multiply by N-1.
So for athletes, SS: 46.24, non-athletes SS = 7.84

Now,

f. Make a decision:Retain the null hypothesis.
g. What does your decision mean? Athletes and non-athletes do not differ in height.
10. / In a specific population, there are just as many females as males. Forbes magazine publishes an article that 11 out of 15 of the wealthiest individuals in this population are male. I would like to test the hypothesis that the wealthiest individuals in this population are male (using alpha=.01).
a. Which test is appropriate? Sign test
b. Report the null hypothesis: It is not the case that the wealthiest individuals in the population are male.
c. Report the alternative hypothesis: The wealthiest individuals in the population are male.
d. Find the critical value: 13 males
e. Calculate the obtained statistic: 11 males
f. Make a decision: Retain the null hypothesis
g. What does your decision mean? It is not the case that the wealthiest individuals in the population are male.
11. / A feline researcher would like to evaluate the effect of catnip on motor activity in kittens. He puts 5 kittens in a playpen and counts how many times each kitten swats at a hanging toy placed in the middle of the pen. He then exposes the kittens to catnip and again lets them play in the pen and counts the number of swats. Test the hypothesis that catnip has an effect on motor activity in kittens using an alpha of .01. Assume a normal distribution.
No catnip / catnip
5 / 8
7 / 9
6 / 8
8 / 8
1 / 0
a. Which test is appropriate? Paired-samples t-test
b. Report the null hypothesis: Catnip does not have an effect on motor activity.
c. Report the alternative hypothesis: Catnip has an effect on motor activity.
d. Find the critical value: +/- 4.60
e. Calculate the obtained statistic: -1.67


f. Make a decision:Retain the null hypothesis.
g. What does your decision mean? Catnip does not have an effect on motor activity.