Download ACTIVITY SET 1 Jan

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Hypothesis Testing – Proportion and One Mean - Solutions
P-value Guidelines when using Standard Normal Table (i.e. the Z-table):
Keep this in mind: The method for finding the p-value is based on the alternative hypothesis.
Minitab will provide the p-value but if doing by hand using Table A1 observe the following:
For Ha: p ≠ po then the p-value = 2P(Z ≥ |z|) That is, find 1 – P(Z < |z|) and then
multiply this p-value by 2.
For Ha: p > po then the p-value = P( Z ≥ z)
For Ha: p < po then the p-value = P( Z ≤ z)
1 The present success rate in the treatment of a particular psychiatric disorder is 0.65 (65%). A research
group creates a new treatment for this disorder. Their null hypothesis is that the success rate for the new
treatment is 0.65 (no different from the standard). The alternative hypothesis is that the success rate is
better than 0.65 for the new treatment.
a. Let p = true success rate of the new treatment. Using mathematical notation, write null and alternative
hypotheses about p.
H0: p = .65 versus Ha: p > .65.
b. A clinical trial is done in which 144 of 200 patients who use the new treatment are successfully treated.
What is the value of p̂ = success rate for the sample? How does it compare to 0.65 (the old standard)?
144/200 = .72. Sample value is greater than .65.
c. Minitab Users: Go to Stat>Basic Stats>1 proportion, click Summarized Data, enter 200 for
number of trials and 144 for Number of events. Click on Perform Hypothesis Test and enter 0.65 where
it says “Hypothesized proportion” AND click Options to select the alternative hypothesis as “greater
than” AND also click on “Use test and interval based on normal distribution.”
SPSS Users: Open the Excel Summarized Procedures and select the tab “Z test of a Proportion”.
Enter 0.72 as the Sample proportion; 200 for the Sample Size; and 0.65 for the Hypothesized Proportion.
NOTE: The resulting p-value is for a two-sided test (i.e. “not equal” alternative hypothesis – if you are
conducting a one-sided test, where your alternative is specified as either “less than” or “greater than” you
will need to cut this p-value in half to arrive at the proper p-value for the one-sided test).
What value is given for the test statistic Z in the output? 2.08
What is the p-value? 0.019
d. Decide between the null hypothesis and the alternative hypothesis. Explain your decision.
Decide on alternative hypothesis because p-value is less than .05.
1
e. Write a conclusion about how the new treatment compares to previous treatment(s).
The new treatment appears to have a better success rate. The sample result was a
“statistically significant” departure from p = .65.
f. Suppose the data had been that 50 patients used the new treatment, with 36 successes. What is the value
of p̂ = success rate for this sample? How does it compare to the success rate for the sample used in parts
b-e?
Sample result is still .72 (same as before).
g. With the data given in part f, conduct a hypothesis test of whether the “true” success rate for the new
treatment is greater than .65. That is, repeat part c but change the number of trials and events to 50 and
36 respectively. For Excel Summarized Procedures just change the Sample Size from 200 to 50.
What value is given for the test statistic Z in the output? 1.04
What is the p-value? 0.150
Fail to reject the null because the p-value is not less than .05.
h. Refer to the previous two parts. Decide between the null hypothesis and the alternative hypothesis.
Explain your decision.
Fail to reject the null because the p-value is not less than .05.
We are not able to say that the new treatment is better than the previous treatment(s).
i. For the trial with only 50 patients (and 36 success), write a conclusion about how the new treatment
compares to previous treatment(s).
We are not able to say that the new treatment is better than the previous treatment(s).
j. Briefly explain what this activity illustrates about how sample size affects the statistical significance of
an observed result. As a starting points, note that the observed success rate was .72 for both samples, and
we wish to determine if this is “significant” evidence that the true proportion is greater than .65.
A specific amount of difference between a sample result and a null hypothesis becomes
more significant as the sample size increases.
2 In a marketing survey for an automobile manufacturer, 90 randomly selected adults are asked which car
color they would choose, if a particular car were available in either blue or red body colors. Of the 90
respondents, 53 said “blue.”
a. Let p = population proportion that would say “blue.” The manufacturer wants to learn if a majority of
buyers would pick blue. Keeping in mind that a majority is p>0.5, write a null and alternative hypothesis
about p in this situation. (Hint: What somebody wants to “prove” is usually the alternative.)
2
H0: p = .5 (or less)
Hs: p> .5
b. What is the value of p̂ =sample proportion that picked blue?
53/90 = .59
c. Test the hypotheses stated in part a above. By hand, calculate the test statistic by using (Notice that this
statistic is sensitive to the difference between the sample result and the null hypothesis value):
z
sample p - null hyp. p

null std. error
p̂  p 0
p 0 (1  p 0 )
n
=
.59  .50
= 1.71
.50*(1  .50)
90
(round your final value to two
decimal places)
d. Use Standard Normal Table to find the p-value associated with this test statistic. Use the p-value
guidelines found at the beginning of this activity.
From standard normal table, P(Z > 1.71) = 1 – 0.9564 = 0.0436
e. Minitab users: Go to Stat>Basic Stats>1 proportion, click Summarized Data, enter 90 for number
of trials and 53 for Number of events. Click on Perform Hypothesis Test and enter 0.50 where it says
“Hypothesized proportion” AND click Options to select the alternative hypothesis as “greater than” AND
also click on “Use test and interval based on normal distribution.”
SPSS Users: Open the Excel Summarized Procedures and select the tab “Z test of a Proportion”.
Enter 0.59 as the Sample Proportion; 90 for the Sample Size; and 0.50 for the Hypothesized Proportion.
NOTE: The resulting p-value is for a two-sided test (i.e. “not equal” alternative hypothesis – if you are
conducting a one-sided test, where your alternative is specified as either “less than” or “greater than” you
will need to cut this p-value in half to arrive at the proper p-value for the one-sided test).
What value is given for Z in the output? 1.69 (Minitab) 1.71 (Excel)
What is the p-value? 0.046 (Minitab) 0.044 (Excel)
i. Do the Z test statistic you found by hand in part c and the p-value from part d approximately
equal to the Z statistic found in part e when using Minitab? Yes
ii. Decide whether the result is significant based on the p-value from Minitab and report a
conclusion in the context of this situation. Since the p-value is less than 0.05 we would reject the null
hypothesis and conclude that our result is significant. The manufacturer would be correct in saying
that a majority of buyers would pick blue M&Ms.
iii What would the p-value have been if manufacturer wanted to test if a equal proportion of red
and blue cars would be purchased? That is, test Ho: p = 0.5 versus Ha: p ≠ 0.5 For a two-sided test we
would double the p-value found from a one-sided test resulting in a p-value of 0.092 (or 0.088 with
Excel) which would be greater than 0.05 meaning we would not reject Ho for the two sided test.
This helps (hopefully!) to illustrate the importance of selecting the correct alternative hypothesis,
Ha. Depending on the selected Ha you can reach different decisions and conclusions. (NOTE:
conversely, for a one-sided test we would use half of the p-value from a two-sided test.)
3
3 Use the T-Table to estimate the p-value for each of the following hypothesis testing situations. Then use
the p-value to make a conclusion about the hypotheses. (Note: The value given for t is the calculated
value of the test statistic).
a. H0: = 72, Ha: >72, n=20, t=2.10
p-value  0.010 < p < 0.025
DF = 19
Conclusion : Reject Ho
b. H0: = 0, Ha:   0, n=40, t=2.41
DF = 39 (use 30 in table)
p-value  2*(0.010 < p < 0.025) = 0.020 < p < 0.050 We
double the p-value since the alternative is 2-sided
Conclusion : Reject Ho
c. H0: = 98.6, Ha: < 98.6, n=10, t= 1.33
DF = 9
p-value 
p > 0.100
Conclusion : Do Not Reject Ho
d. H0: = 100, Ha: > 100, n=16, t= 4.26
DF = 15
p-value  p < 0.001 Conclusion : Reject Ho
4 PSU claims that the average SATM score for the incoming fall 2005 class at University Park was
approximately 610. Use the Class Survey to test whether the current population of PSU undergrads at
UP campus differs from this claim. Again first by hand and then with Minitab. The descriptive statistics
are: sample size is 216; sample mean is 599; and the sample standard deviation is 85.3
a. Write the null and alternative hypotheses using appropriate statistical notation.
Ha: u ≠ 610
H0: u = 610
b. Calculate DF and the t-statistic:
DF = 215
t=
x - 0
599 - 610
=
= -1.89 (Note this is a negative!)
s
85.34
n
216
c. From T-Table what is the range of the p-value based on you t-statistic? NOTE: if you selected a
two-sided Ha (i.e. used ≠) then you need to double the p-values found in the table.
Two-sided alternative so p-value range is 2*(0.025 < p < 0.050) = 0.050 < p < 0.100
d. Based on your p-value what is your decision and conclusion? Does this conclusion make sense
based on your confidence interval calculated above? That is, does your confidence interval
contain/not contain 610? If you rejected Ho then your interval should not contain 610 and viceversa.
Based on our p-value we would not reject Ho since the range of values contains our usual alpha
value of 0.05. This agrees with our confidence interval as the interval contains 610 (even though
just barely).
e. Use software to verify your results. Do your results by hand and those from Minitab roughly match?
4
Minitab Users: Go to Stat > Basic Statistics > 1-Sample t and select SATM (column C16). Click the
box for “Perform Hypothesis Test” and enter the value from your hypotheses statements (i.e. uo). Click
on Options and select the correct alternative. Click OK twice and copy and paste your Minitab results.
Do your results by hand and those from Minitab roughly match?
One-Sample T: SATM
Test of mu = 610 vs not = 610
Variable
SATM
N
216
Mean
599.00
StDev
85.34
SE Mean
5.81
95% CI
(587.56, 610.45)
T
-1.89
P
0.060
The t-statistic and the p-value match those from Minitab and the hypothesized value of 610 is in our
interval. Notice that if you just calculated by hand the one sided p-value range that this interval
would not have contained the p-value from Minitab.
SPSS Users: Go to Analyze > Compare Means > Ones Sample T Test. Select SATM and move to the
Test Variables box. Enter 610 in the box for Test Mean. Click Options and verify that 95 is the
Confidence Level Percentage. Click Continue then OK.
One-Sample Statistics
N
SATM
Mean
216
599.00
Std. Deviation
Std. Error Mean
85.335
5.806
One-Sample Test
Test Value = 610
t
df
Sig. (2-tailed)
Mean Difference
95% Confidence Interval of the
Difference
Lower
SATM
-1.894
215
.060
-10.995
-22.44
Upper
.45
The t-statistic and p-value match those from SPSS and the confidence interval for the
difference contains zero indicating that we cannot say a our sample produced a result
different from our hypothesized value of 610. Not that if you conducted a one-sided test
of less than 610 the p-value would change to 0.03 and we would reject the null
hypothesis concluding the mean SATM scores were less than 610.
5
6