Chapter 8 - Notes

advertisement
STA 2023
Chapter 8 – Inferences Based on a Single Sample: Tests of Hypothesis

The Elements of a Test of Hypothesis (8.1)
o Introduction – In each hypothesis test, we will have two hypotheses of which we
will determine which one is correct.
o H0 (read “h-o”)
 Also known as the “null hypothesis”
 Assumes the status quo
 Always includes a statement of equality (=, , )
 We will believe this is true, unless further evidence proves otherwise
 Based on our test results, we will decide whether or not to reject this
hypothesis
o Ha (read “h-a”)
 Also known as the “alternative hypothesis”
 Other texts refer to it as H1
 Never includes a statement of equality (, <, >)
 This is usually what we want to try to prove
 To conclude this hypothesis as “true”, we must do research by comparing
 P-value versus  “alpha”
 Test statistic versus rejection region
 Based on our test results, we will never make any direct decisions about
this hypothesis (only about the null hypothesis)
o Other Guidelines for Hypothesis Testing
 The parameter space for the hypotheses can never overlap
 The actual value in each hypothesis will always be the same
o Example – Hypothesis test setup
 For each of the following construct the appropriate hypotheses
 Test whether or not  < 2. H0:  = 2, Ha:  < 2
 Test to see if p > .38. H0: p = .38, Ha: p > .38
 Determine whether or not   55. H0:  = 55, Ha:   55
o Example – Hypothesis test setup
 Pizza Hut claims its average delivery time is 25 minutes. Set up a
hypothesis test to determine whether it takes longer.
 Write out the initial statements.  = 25,  > 25
 Determine whether it goes in H0 or Ha. H0, Ha
 Write out the hypotheses. H0:  = 25, Ha:  > 25
 The CIA claims that the proportion of people who are literate in Cameroon
is 63.4%. Test to see whether or not the true proportion is different.
 Write out the initial statements. p = .634, p  .634
 Determine whether it goes in H0 or Ha. H0, Ha
 Write out the hypotheses. H0: p = .634, Ha: p  .634
o Conclusions and Consequences
Conclusion
Accept H0
Reject H0
True State (Unknown)
H0 True
Ha True
Correct Decision
Type II Error ()
Correct Decision
Type I Error ()
1
STA 2023
Chapter 8 – Inferences Based on a Single Sample: Tests of Hypothesis
o Example – Type I Error and Type II Error
 Given the following null and alternative hypotheses classify each error as
Type I or Type II
 H0: Water = Harmful to drink, Ha: Water = Safe to drink
 Saying that the water is safe to drink when it really is harmful.
Type I Error
 Saying that the water is harmful to drink when it really is safe.
Type II Error
o Steps of a Hypothesis Test
 Step 1: State the null and alternative hypotheses
 Step 2: Find the rejection region and critical value(s)
 Step 3: Calculate the test statistic
 Step 4a: By comparing steps 2 and 3, determine whether to reject H0
 Step 4b: Make a conclusion in terms of the problem

Large-Sample Test of a Hypothesis About a Population Mean (8.2)
o Finding the rejection regions (8.2, 8.5)
 We base our rejection regions and corresponding critical value(s) on Ha
Critical Values for Common Levels of Significance
 = .10
 = .05
 = .01
Lower-Tail Test (<)
Z < -1.28
Z < -1.645
Z < -2.33
Upper-Tail Test (>)
Z > 1.28
Z > 1.645
Z > 2.33
Two-Tail Test ()
Z < -1.645 or Z > 1.645
Z < -1.96 or Z > 1.96
Z < -2.575 or Z > 2.575
o Test Statistic (8.2)
x  0
 z

n
 Since n  30, s  
o Conclusion (Consistent for all hypothesis tests)
 If our test statistic falls in our rejection region, then we should reject H0
 Otherwise, do not reject H0
o Example – Orlando Airport check-in times
 The Orlando Airport claims that its average check-in time for passengers
is 17 minutes. You sample 100 people and determine their mean check-in
time to be 18.4 minutes with a standard deviation of 5 minutes. Test at the
5% significance level whether or not the average check-in time is longer
than 17 minutes.
 Step 1: State the null and alternative hypotheses
 H0:  = 17
 Ha:  >17
 Step 2: Find the rejection region and critical value(s)
2
STA 2023
Chapter 8 – Inferences Based on a Single Sample: Tests of Hypothesis
Since =.05, and we are doing an upper-tail test, we
should use z > 1.645 as our rejection region.
Step 3: Calculate the test statistic
x   0 18.4  17

 2.8
 z

5


n
100
 Step 4a: Reject H0?
 Since 2.8 > 1.645, the test statistic falls in our rejection
region, and we should reject H0
 Step 4b: Make a conclusion in terms of the problem
 There is sufficient evidence to suggest that the average
check-in time at Orlando Airport is longer than 17 minutes,
at =.05.
o Example – SAT scores
 An MCAT preparatory course advertises an average score on the
Biological Sciences section of 12.6 (out of 15 possible). In order to refute
this claim, we sample 64 individuals who have successfully completed the
course and their average score is determined to be 12.45 with a standard
deviation of .72. Is there sufficient evidence to suggest the preparatory
course is incorrectly advertising an inflated score, at =.01?

Step 1: State the null and alternative hypotheses
 H0:  = 12.6
 Ha:  < 12.6
 Step 2: Find the rejection region and critical value(s)
 Since =.01, and we are doing a lower-tail test, we should
use z < -2.33 as our rejection region.
 Step 3: Calculate the test statistic
x   0 12.45  12.6

 -1.67
 z

.72



n
64
Step 4a: Reject H0?
 Since –1.67 is not less than –2.33, we should not reject H0
Step 4b: Make a conclusion in terms of the problem
 There is not enough evidence to suggest that the
preparatory course is incorrectly advertising an inflated
score, at =.01.
Observed Significance Levels: p-values (8.3)
o P-value
 The p-value is the observed significance level of an experiment
 P-values provide an alternative criteria to the rejection region format of
hypothesis testing – if the p-value < , then reject the null hypothesis,
otherwise, do not reject the null hypothesis
 Most of the time, tests are significant if they are less than .05
3
STA 2023
Chapter 8 – Inferences Based on a Single Sample: Tests of Hypothesis

o
o
o
o
Sometimes p-values are further described in words:
 If .05 < p-value  .10, then the test is “weakly significant”
 If .01 < p-value  .05, then the test is “moderately significant”
 If p-value < .01, then the test is “highly significant”
Calculating the p-value
 Based on the relational operator in Ha, and our test statistic, we calculate
the p-value as follows:
 If Ha contains <, then the p-value is the area under the curve to the
left of the test statistic
 If Ha contains >, then the p-value is the area under the curve to the
right of the test statistic
 If Ha contains , then the p-value is the area under the curve in the
direction of the nearest tail, then multiplied by 2
Example – Orlando Airport, revisited
 Recall that we tested Ha:  > 17 and we had a test statistic of z = 2.8.
Calculate the p-value of the test. Since the alternative hypothesis contains
a “greater than” we should find the area under the z-curve to the right of
2.8. From Table IV, we can find P(z > 2.8) = .5 - .4974 = .0026. Hence,
our p-value = .0026. Thus, our test was “highly significant”.
Example – MCAT preparatory course, revisited
 Recall that we tested Ha:  < 12.6 and we had a test statistic of z = -1.67.
Calculate the p-value of the test. Since the alternative hypothesis contains
a “less than” we should find the area under the z-curve to left of –1.67.
From Table IV, we can find P(z < -1.67) = .5 - .4525 = .0475. Hence, our
p-value = .0475. Thus, our test was “moderately significant”.
 Suppose we had tested to see whether or not the average score on the
MCAT was different from 12.6. Assuming the same sample data,
calculate the p-value of the new test. Since the alternative hypothesis now
contains a “not equal to” we should find the area under the z-curve to the
left of –1.67, and then double it. Our desired p-value is .0950, which is
“weakly significant”.
Example – Morningstar Farms Chik Patties
 I’m considering suing the Kellogg’s company because I suspect their
boxes of Morningstar Farms Chik Patties are consistently under filled, as
their boxes that advertise 10 ounces. I randomly sample, weigh, and eat
36 boxes of this product and I determine the average weight from my
sample to be 10.4 ounces with a standard deviation of 1.2 ounces. Based
on my sample, do I have a case against the Kellogg’s company? Report
the p-value associated with this test.
 Step 1: State the null and alternative hypotheses
 H0:  = 10
 Ha:  < 10
 Step 3a: Calculate the test statistic
4
STA 2023
Chapter 8 – Inferences Based on a Single Sample: Tests of Hypothesis





z
x  0


10.4  10
2
1.2
n
36
Step 3b: Calculate the p-value
 Since the alternative hypothesis contains a “less than” we
should find the area under the curve to the left of 2. From
Table IV, we can find P(z < 2) = .5 + .4772 = .9772. Our
desired p-value is .9772.
Step 4a: Reject H0?
 Since the p-value is larger than any (feasible) alpha we
could choose, we should not reject the null hypothesis.
Step 4b: Make a conclusion in terms of the problem
 There is not sufficient evidence to suggest that the
Kellogg’s company under fills their boxes of Chik Patties.
Small-Sample Test of a Hypothesis About a Population Mean (8.4)
o Alterations to the Large-Sample Test
 We use this test whenever the sample size is less than 30, and the original
population is approximately normally distributed
 The rejection region in step 2, is specified by the t-distribution with v=n–1
degrees of freedom
x  0
 The test statistic is as follows: t 
s
n
 P-values cannot usually be determined exactly from the tables in the book
o Example – pH levels of soil
 In order to attract more farmers to central Florida, the chamber of
commerce advertises that the soil here is ideal for most types of farming,
that is, its pH level is approximately 6. In order to refute this claim,
researchers measure the pH levels of 9 soil samples and determine the
average pH level to be 5.7 with a standard deviation of .24. Are the
researchers findings significant? Use =.10.
 Step 1: State the null and alternative hypotheses
 H0:  = 6
 Ha:   6
 Step 2: Find the rejection region and critical value(s)
 Since =.10, v=8, and we are doing a two-tail test, we
should use t < -1.860 or t > 1.860 as our rejection region
 Step 3a: Calculate the test statistic
x   0 5.7  6

 -3.75
 t
s
.24

n
9
Step 3b: Calculate the p-value
5
STA 2023
Chapter 8 – Inferences Based on a Single Sample: Tests of Hypothesis




Since the alternative hypothesis contains a “not equal to”
we should find the area under the t curve to the left of –3.75
and then double it. Using v=8, -3.75 would fall between –
3.355 and –4.501, so P(t < -3.75) is between .001 and .005.
If we double that it would yield an area between .002 and
.01. Hence our p-value is between .002 and .01.
Step 4a: Reject H0?
 Since –3.75 < -1.860, we should reject H0.
Step 4b: Make a conclusion in terms of the problem
 There is sufficient evidence to suggest that the average pH
levels are below 6, at =.10. Thus, the researchers
findings are significant.
Large-Sample Hypothesis Test About a Population Proportion (8.5)
o Alterations to Population Mean Tests
 Just as in Chapters 4 and 7, we must still check to see whether the
p q
precondition is true; that is, p0  3 0 0  (0,1)
n
 When the precondition indicates that the sample size is large enough, we
can always use the standard normal distribution for our rejection regions
and p-values
pˆ  p 0
x
 The test statistic is as follows: z 
, where pˆ 
n
p0  q0
n
o Example – The Green Party
 The Green Party claims that the proportion of Americans that will vote for
their candidate in the upcoming election is 6%. We randomly sample 200
people and find that 5 people will vote for a Green Party candidate in the
upcoming election. Is there evidence to suggest that the claim made by
the Green Party is too high, at the 2% significance level?
 Step 1: State the null and alternative hypotheses
 H0: p = .06
 Ha: p < .06
 Step 1.5: Check precondition
p q
(.06)(.94)
 p0  3 0 0  .06  3
 .06  .050  (.01,.11)  (0,1)
n
200


Step 2: Find the rejection region and critical value(s)
 Since =.02, and we are doing a lower-tail test, we should
use z < -2.05 as our rejection region.
Step 3a: Calculate the test statistic
pˆ  p 0
.025  .06

 -2.08
 z
p0  q0
(.06)(. 94)
200
n
6
STA 2023
Chapter 8 – Inferences Based on a Single Sample: Tests of Hypothesis



Step 3b: Calculate the p-value
 Since the alternative hypothesis contains a “less than” we
should find the area under the curve to the left of –2.08.
From Table IV, we can find P(z < -2.08) = .0188.
Step 4a: Reject H0?
 Since –2.08 < -2.05, we should reject the null hypothesis.
Step 4b: Make a conclusion in terms of the problem
 There is sufficient evidence to suggest that the claim made
by the Green Party is too high, at =.02.
7
Download