Title: Hypothesis Testing
1Chapter 8
- Hypothesis Testing
- Null and Alternative Hypotheses and Errors in
Testing - Large Sample Tests about a Mean Rejection
Points - Small Sample Tests about a Population Mean
- Hypothesis Tests about a Population Proportion
2Introduction
- A Hypothesis Test is a statistical procedure
- that involves formulating a hypothesis and
- using sample data to decide on the validity of
- the hypothesis.
- In this chapter we will focus on hypothesis tests
about population means and proportions (since we
are knowledgeable about how sample means and
proportions are distributed).
3- In order to test any hypothesis (even non
statistical hypotheses) you need three elements - 1. The Hypotheses (Both the hypothesis that you
are testing and the alternative hypothesis, which
is the opposite of the hypothesis) - 2. An unbiased test statistic- A measure that
you will use to evaluate the hypotheses. - 3. A rejection rule- the rule that you will use
to ultimately decide if a hypothesis should be
rejected.
4Non Statistical Examples
- Example 1
- Hypothesis I should be admitted to Harvard Law
School - Alternative Hypothesis I should not be admitted
to Harvard Law School - Test Statistic LSAT
- Rejection Rule Harvard may have a cut off LSAT
score for admitting students. - Example 2
- Hypothesis OJ is innocent
- Alternative Hypothesis OJ is guilty
- Test Statistic A jury of 12 of his peers.
- Rejection Rule If 12 of 12 jurors rule that he
is guilty beyond a reasonable doubt.
5Hypothesis Testing Rules
- In order to test a hypothesis, you must first
find the test statistic and rejection rule that
is appropriate for evaluating your hypotheses
(i.e., we could not evaluate OJs innocence based
upon his LSAT score). - All hypothesis tests will always end in 1 of 2
ways - 1. You conclude that you must reject the
hypothesis (This is the same as concluding that
you have proven the alternative true) or -
- 2. You conclude that you do not have enough
evidence to reject the hypothesis (This is the
same as concluding that you do not have enough
evidence to prove that the alternative is true).
6Developing Null and Alternative Hypotheses
- Hypothesis testing can be used to determine
whether a statement about the value of a
population parameter should or should not be
rejected. - The null hypothesis, denoted H0, is a statement
of the basic proposition being tested. The
statement is not rejected unless there is
convincing sample evidence that it is false. - The alternative or research hypothesis, denoted
Ha, is an alternative (to the null hypothesis)
statement that will be accepted only if there is
convincing sample evidence that it is true.
7Developing Null and Alternative Hypotheses
- Testing the Validity of a Claim
- If you wish to find evidence to contradict a
claim, the claim should be stated as the null
hypothesis. - If you wish to prove a claim to be true, then you
should state the claim as the alternative
hypothesis. - Claims that test whether the mean is equal to a
specific value must be stated as the null
hypothesis. -
Anderson, Sweeney, and Williams
8A Summary of Forms for Null and Alternative
Hypotheses about a Population Mean
- The equality part of the hypotheses always
appears in the null hypothesis. - In general, a hypothesis test about the value of
a population mean ?? must take one of the
following three forms - Where ?0 is a specific value
H0 ?gt ?0 Ha ? lt ?0
H0 ?lt ?0 Ha ? gt ?0
H0 ? ?0 Ha ? ? ?0
One-tailed
One-tailed
Two-tailed
9Example 8.1 Metro EMS
- A major west coast city provides one of the most
comprehensive emergency medical services in the
world. Operating in a multiple hospital system
with approximately 20 mobile medical units, the
service goal is to respond to medical emergencies
with a mean time of 12 minutes or less. - The director of medical services wants to
formulate a hypothesis test that could use a
sample of emergency response times to determine
whether there is sufficient evidence to prove
that they are not meeting their goal.
Anderson, Sweeney, and Williams
10- Null and Alternative Hypotheses
- Hypotheses Conclusion and Action
- H0 ?lt??? The emergency service is
meeting the response goal no
appropriate follow-up action is
necessary. - Ha???gt??? The emergency
service is not meeting - the response goal appropriate
follow-up action is necessary. - Where ? mean response time for the
population - of medical emergency
requests. -
- By defining the claim as the null hypothesis we
can set out to try to find sufficient evidence to
reject the claim.
11Example 8.2 The Potato Chip Manufacturer
- Many people eat chips with their soda. Suppose a
potato chip - manufacturer is concerned that the bagging
equipment may not be - functioning properly when filling 10-oz bags.
You have been asked to - set up a hypothesis test that will help determine
if there is a problem with - the bagging equipment. What null and alternative
hypothesis would you - use?
Pelosi and Sandifer
12- Hypotheses Conclusion and
Action - H0 ???0 The machine is working
properly no appropriate follow-up
action is necessary. - Ha??????0 The machine is
not working properly -
appropriate follow-up action is necessary. - Where ? mean filling weight for the
machine.
13Type I and Type II Errors
- Since hypothesis tests are based on sample data,
we must allow for the possibility of errors. - A Type I error is rejecting H0 when it is true.
- The person conducting the hypothesis test
specifies the maximum allowable probability of
making a Type I error, denoted by ? and called
the level of significance.
14- A Type II error is accepting H0 when it is false.
- Generally, we cannot control for the probability
of making a Type II error, denoted by ?. - Statistician avoids the risk of making a Type II
error by using the phrase do not reject H0
instead of accept H0.
15Large Sample Tests about Mean (n?30)
- If the sampled population is normal or if n is
large,
H0 ?gt ?0 Ha ? lt ?0 Test Statistic Reject
ion Rule Reject H0 if z lt- z?????
H0 ?lt ?0 Ha ? gt ?0 Test Statistic Reject
ion Rule Reject H0 if z gt z ????????
- H0 ? ?0
- Ha ? ? ?0
- Test Statistic
-
- Rejection Rule
- Reject H0 if z gt z???
If ? is unknown, use s to estimate ?
16Steps for Computing z? (The z value with an upper
tail area of ?.
- In order to determine the z value with an upper
tail area of ?, we need the area beneath the
normal curve between the mean and the z value of
interest.
area .5- ?
?
2. Go to the area section of the standard
normal table and find the area
closest to the area computed in 2. The
corresponding z value is z?.
17- One-Tailed Test about a Population Mean Large n
- ? P(Type I Error)
Sampling distribution of (assuming H0 is
true)
Reject H0
Do Not Reject H0
??
Anderson, Sweeney, and Williams
?0
z?
(Critical value)
18- Two-Tailed Test about a Population Mean Large n
- ? P(Type I Error)
Sampling distribution of (assuming H0 is
true)
Reject H0
Reject H0
???/2
???/2
Anderson, Sweeney, and Williams
z
z?/2
-z?/2
?0
(Critical values)
19Steps of Hypothesis Testing
- Determine the null and alternative hypotheses.
- Specify the level of significance ?.
- Select the test statistic that will be used to
test the hypothesis. - Using the Test Statistic
- State the rejection rule for H0 and use ??to
determine the critical value for the test
statistic. - Collect the sample data and compute the value of
the test statistic. - Use the value of the test statistic and the
rejection rule to determine whether to reject H0.
Anderson, Sweeney, and Williams
20Example 8.1 (Revisited)
- Recall example 8.1. Suppose we collected a
sample of n 40 EMS calls and computed
13.25 minutes and s 3.2 minutes. Using
?.05 conduct a hypothesis test to see if you can
find the evidence to refute their claim that the
average response time is less than 12 minutes. - (The sample standard deviation s can be used
to - estimate the population standard deviation
?.) - Step 1 H0 ??lt12 ?
- Ha? ?gt?12
- Step 2 ?????? ?.05
- Step 3
21- Step 4 Reject H0 if z gt za 1.645
(a0.05) -
- Step 5
- Step 6. Is zgt 1.645?
-
- Since 2.47 gt 1.645, we reject H0.
- Conclusion We are 95 confident that Metro
EMS - is not meeting the response goal of 12
minutes - appropriate action should be taken to improve
- service.
22Example 8.3
- Consider a company that is trying a new and
cheaper package design - for its product. The average sales for this
product are currently - 1500/month. Suppose they wish to prove that
sales will decrease as a - result of the new method. In order to test this
claim they used n36 - test stores and computed an average sale,
1450 with s 250. (Use ?.10) - Step 1 H0 ??gt1500 ?
- Ha? ?lt?1500
- Step 2 ?????? ?.1
- Step 3
23- Step 4 Reject H0 if z lt- za 1.28
(a0.10) -
- Step 5
- Step 6. Is zlt-1.28?
-
- Since -1.2 is not less than -1.28, we cannot
reject H0. - Thus we cannot find sufficient evidence to prove
that the new advertising - method will decrease sales
24Example 8.4 The Chapperel Steel Company
- Another recent management approach is to have
employees become actual - partners of the business. Chapperel Steel
Company has done exactly this - and the company feels that one of the benefits of
this concept is that the - average number of sick days will decrease. Prior
to implementing this - program, Chapperel had an average of 7.2 sick
days per employee. Set up - the null and alternative hypothesis to test if
the average number of sick - days per employee is different from 7.2.
- After implementing this program, a sample of 40
employees provides a - sample mean of 6.5 day and a standard deviation
of 2.5 days. Test this - hypothesis test using ?.01.
Pelosi and Sandifer
25- Step 1 H0 ????7.2 ?
- ????Ha? ? ? ?7.2
- Step 2 ?.01
-
- Step 3
- ??????
- Step 4 Reject H0 if z gt za/2 2.575
(?.01) -
26- Step 5
-
- Step 6 Is z gt 2.575 ?
-
- Since -1.77 1.77 does not exceed 2.575,
we cannot reject this claim. Thus we cant
refute the claim that this program does alter the
number of employee sick days.
27Example 8.5 Glow Toothpaste
- The production line for Glow toothpaste is
designed to fill tubes of toothpaste with a mean
weight of 6 ounces. - Periodically, a sample of 30 tubes will be
selected in order to check the filling process.
Quality assurance procedures call for the
continuation of the filling process if the sample
results are consistent with the assumption that
the mean filling weight for the population of
toothpaste tubes is 6 ounces otherwise the
filling process will be stopped and adjusted. -
Anderson, Sweeney, and Williams
28- Step 1 H0 ????? ?
- Ha? ??????
- Step 2 Assume a .05 level of significance.
- Step 3
- Step 4 ?????Assuming a .05 level of
significance, - Reject H0 if z gt za/2 1.96 (?.05)
-
Anderson, Sweeney, and Williams
29- Step 5
- Assume that a sample of 30 toothpaste tubes
- provides a sample mean of 6.1 ounces and standard
- deviation of 0.2 ounces.
- Let n 30, 6.1 ounces, s .2
ounces -
-
-
- Step 6 Is z gt 1.96 ?
- Since 2.74 gt 1.96, we reject H0. Thus, the
mean filling weight for the population of
toothpaste tubes is not 6 ounces.
Anderson, Sweeney, and Williams
30Confidence Interval Approach to aTwo-Tailed Test
about a Population Mean
- Select a simple random sample from the population
and use the value of the sample mean to
develop the confidence interval for the
population mean ?. - If the confidence interval contains the
hypothesized value ?0, do not reject H0.
Otherwise, reject H0.
Anderson, Sweeney, and Williams
31- Confidence Interval Approach to a Two-Tailed
Hypothesis Test - The 95 confidence interval for ? is
- or 6.0284 to 6.1716
- Since the hypothesized value for the population
mean, ?0 6, is not in this interval, the
hypothesis-testing conclusion is that the null
hypothesis, - H0 ? 6, can be rejected. (As shown in the
previous slide, following traditional hypothesis
testing steps.)
32Small Sample Tests about Mean
- If the sampled population is normal, and ? is
known, use the Large sample - formulas on slide 12.
33Small Sample Tests about Mean (nlt30)
- If the sampled population is normal, nlt30, and ?
is unknown
H0 ?gt ?0 Ha ? lt ?0 Test Statistic Reject
ion Rule Reject H0 if t lt- t?????
H0 ?lt ?0 Ha ? gt ?0 Test Statistic Reject
ion Rule Reject H0 if tgt t ????????
- H0 ? ?0
- Ha ? ? ?0
- Test Statistic
-
- Rejection Rule
- Reject H0 if t gt t???
34Summary of Hypothesis Testing Procedures for a
Population Mean
Yes
No
n gt 30 ?
No
Popul. approx. normal ?
? known ?
Yes
Yes
Use s to estimate ?
No
? known ?
No
Use s to estimate ?
Yes
Slide 15
Slide 15 use s for ?
Increase n togt 30
Slide 33
Slide 15
Anderson, Sweeney, and Williams
35Example 8.6 Highway Patrol
- A State Highway Patrol periodically samples
vehicle speeds at various locations on a
particular roadway. The sample of vehicle speeds
is used to test the hypothesis - H0 m lt 65.
- The locations where H0 is rejected are deemed
the best locations for radar traps. - At Location F, a sample of 16 vehicles shows a
mean speed of 68.2 mph with a standard deviation
of 3.8 mph. Use an a .05 to test the
hypothesis.
Anderson, Sweeney, and Williams
36- Let n 16, 68.2 mph, s 3.8 mph
-
- Step 1 H0 m lt 65
- Ha m gt 65
- Step 2 a .05
- Step 3
-
-
37A Summary of Forms for Null and Alternative
Hypotheses about a Population Proportion
- The equality part of the hypotheses always
appears in the null hypothesis. - In general, a hypothesis test about the value of
a population proportion p must take one of the
following three forms (where p0 is the
hypothesized value of the population proportion).
H0 p gt p0 H0 p lt p0 Ha p lt p0
Ha p gt p0
H0 p p0 Ha p ? p0
One-tailed
One-tailed
Two-tailed
38Tests about a Population ProportionLarge-Sample
Case (np gt 5 and n(1 - p) gt 5)
- H0 pgt p0
- Ha pltp0
- Test Statistic
-
- Rejection Rule
- Reject H0 if z lt- z?????
H0 pltp0 Ha pgt p0 Test Statistic Rejecti
on Rule Reject H0 if z gt z ????????
- H0 p p0
- Ha p ? p0
- Test Statistic
-
- Rejection Rule
- Reject H0 if z gt z???
where
39Example 8.7 NSC
- For a Christmas and New Years week, the
National Safety Council estimated that 500 people
would be killed and 25,000 injured on the
nations roads. The NSC claimed that 50 of the
accidents would be caused by drunk driving. - A sample of 120 accidents showed that 67 were
caused by drunk driving. Use these data to test
the NSCs claim with a 0.05.
40Example NSC
- Step 1 H0 p .5
- Ha p .5
- Step 2 a 0.05
- Step 3
41Step 4 Reject H0 if z gt za/2 1.96
(a.05) Step 5 Step 6 Is z gt 1.96
? No, so do not reject H0. Thus, we do not
have enough evidence to reject the claim that 50
of the accidents would be caused by drunk
driving.
42The End