Hypothesis Testing - mh

advertisement
Statistics for Managers
Using Microsoft® Excel
4th Edition
Chapter 8
Fundamentals of Hypothesis
Testing: One-Sample Tests
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc.
Chap 8-1
Chapter Goals
After completing this chapter, you should be
able to:

Formulate null and alternative hypotheses for
applications involving a single population mean or
proportion

Formulate a decision rule for testing a hypothesis

Know how to use the p-value approaches to test the
null hypothesis for both mean and proportion
problems

Know what Type I and Type II errors are
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc.
Chap 8-2
What is a Hypothesis?
 A hypothesis is a claim
(assumption) about a
population parameter:
 population mean
Example: The mean monthly cell phone bill of
this city is μ = $42
 population proportion
Example: The proportion of adults in this city
with cell phones is p = .68
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc.
Chap 8-3
The Null Hypothesis, H0
 States the assumption to be tested
Example: The average number of TV sets in
U.S. Homes is equal to three ( H0 : μ  3 )
 Is always about a population parameter,
not about a sample statistic
H0 : μ  3
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc.
H0 : X  3
Chap 8-4
The Null Hypothesis, H0
(continued)
 Begins with the assumption that the null
hypothesis is true
 Similar to the notion of innocent until
proven guilty
 Refers to the status quo
 Always contains “=” , “≤” or “” sign
 May or may not be rejected
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc.
Chap 8-5
The Alternative Hypothesis, H1
 Is the opposite of the null hypothesis
 e.g.: The average number of TV sets in U.S.
homes is not equal to 3 ( H1: μ ≠ 3 )
 Challenges the status quo
 Never contains the “=” , “≤” or “” sign
 Is generally the hypothesis that is believed (or
needs to be supported) by the researcher
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc.
Chap 8-6
Hypothesis Testing
 We assume the null hypothesis is true
 If the null hypothesis is rejected we have proven
the alternate hypothesis
 If the null hypothesis is not rejected we have
proven nothing as the sample size may have
been to small
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc.
Chap 8-7
Hypothesis Testing Process
Claim: the
population
mean age is 50.
(Null Hypothesis:
H0: μ = 50 )
Population
Is X 20 likely if μ = 50?
If not likely,
REJECT
Null Hypothesis
Suppose
the sample
mean age
is 20: X = 20
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc.
Now select a
random sample
Sample
Sampling Distribution of X
 There are two
cutoff values
(critical values),
defining the regions
of rejection
H0: μ = 50
H1: μ  50
/2
/2
X
50
Reject H0
Do not reject H0
Reject H0
0
Likely Sample Results
20
Lower
critical
value
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc.
Upper
critical
value
Chap 8-9
Level of Significance, 
 Defines the unlikely values of the sample statistic if
the null hypothesis is true
 Defines rejection region of the sampling distribution
 Is designated by  , (level of significance)
 Typical values are .01, .05, or .10
 Is the compliment of the confidence coefficient
 Is selected by the researcher before sampling
 Provides the critical value of the test
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc.
Chap 8-10
Level of Significance
and the Rejection Region
Level of significance =
H0: μ = 3
H1: μ ≠ 3

/2
Two tailed test
/2
Rejection
region is
shaded
0
H0: μ ≤ 3
H1: μ > 3
Represents
critical value

0
Upper tail test
H0: μ ≥ 3
H1: μ < 3

Lower tail test
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc.
0
Chap 8-11
Errors in Making Decisions
 Type I Error
 When a true null hypothesis is rejected
 The probability of a Type I Error is 
 Called level of significance of the test
 Set by researcher in advance
 Type II Error
 Failure to reject a false null hypothesis
 The probability of a Type II Error is β
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc.
Chap 8-12
Example
Possible Jury Trial Outcomes
The Truth
Verdict
Innocent
Innocent
No
error
Guilty
Type I Error
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc.
Guilty
Type II Error
No Error
Chap 8-13
Outcomes and Probabilities
Possible Hypothesis Test Outcomes
Actual
Situation
H0 True
Decision
Key:
Outcome
(Probability)
H0 False
Do Not
Reject
H0
No error
(1 -  )
Type II Error
(β)
Reject
H0
Type I Error
()
No Error
(1-β)
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc.
Chap 8-14
Type I & II Error Relationship
 Type I and Type II errors can not happen at
the same time

Type I error can only occur if H0 is true

Type II error can only occur if H0 is false
If Type I error probability (  )
, then
Type II error probability ( β )
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc.
Chap 8-15
p-Value Approach to Testing
 p-value: Probability of obtaining a test
statistic more extreme ( ≤ or  ) than the
observed sample value given H0 is true
 Also called observed level of significance
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc.
Chap 8-16
p-Value Approach to Testing
(continued)
 Convert Sample Statistic (e.g. X ) to Test
Statistic (e.g. t statistic )
 Obtain the p-value from a table or computer
 Compare the p-value with 
 If p-value <  , reject H0
 If p-value   , do not reject H0
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc.
Chap 8-17
9 Steps in
Hypothesis Testing
1.
2.
3.
4.
5.
6.
7
8.
9.
State the null hypothesis, H0
State the alternative hypotheses, H1
Choose the level of significance, α
Choose the sample size, n
Determine the appropriate test statistic to use
Collect the data
Compute the p-value for the test statistic from the
sample result
Make the statistical decision: Reject H0 if the p-value
is less than alpha
Express the conclusion in the context of the problem
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc.
Chap 8-18
Hypothesis Tests for the Mean
Hypothesis
Tests for 
 Known
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc.
 Unknown
Chap 8-19
Hypothesis Testing Example
Test the claim that the true mean # of TV
sets in U.S. homes is equal to 3.
 1-2. State the appropriate null and alternative
hypotheses
H0: μ = 3
H1: μ ≠ 3 (This is a two tailed test)
 3. Specify the desired level of significance
Suppose that  = .05 is chosen for this test
 4. Choose a sample size
Suppose a sample of size n = 100 is selected
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc.
Chap 8-20
Hypothesis Testing Example
(continued)
 5.
 6.
Determine the appropriate Test
σ is unknown so this is a t test
Collect the data
Suppose the sample results are
n = 100,
 7.
X = 2.84 s = 0.8
So the test statistic is:
t 
X μ
2.84  3
 .16


 2.0
s
0.8
.08
n
100
The p value for n=100, =.05, t=-2 is .048
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc.
Chap 8-21
Hypothesis Testing Example
(continued)
 8. Is the test statistic in the rejection region?
 = .05/2
 = .05/2
Reject H
Do not reject H
Reject H
Reject H0 if p
0
-t= -1.98
+t= +1.98
is < alpha;
otherwise do
Here, t = -2.0 < -1.98, so the test
not reject H0
statistic is in the rejection region
0
0
0
The p-value .048 is < alpha .05, we
reject the null hypothesis
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc.
Chap 8-22
Hypothesis Testing Example
(continued)

9. Express the conclusion in the context of the problem
Since The p-value .048 is < alpha .05,
we have rejected the null hypothesis
Thereby proving the alternate hypothesis
Conclusion: There is sufficient evidence that the mean
number of TVs in U.S. homes is not equal to 3
If we had failed to reject the null hypothesis the
conclusion would have been: There is not sufficient
evidence to reject the claim that the mean number of
TVs in U.S. home is 3
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc.
Chap 8-23
One Tail Tests
 In many cases, the alternative hypothesis
focuses on a particular direction
H0: μ ≥ 3
H1: μ < 3
H0: μ ≤ 3
H1: μ > 3
This is a lower tail test since the
alternative hypothesis is focused on
the lower tail below the mean of 3
This is an upper tail test since the
alternative hypothesis is focused on
the upper tail above the mean of 3
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc.
Chap 8-24
Lower Tail Tests
H0: μ ≥ 3
 There is only one
critical value, since
the rejection area is
in only one tail
H1: μ < 3

Reject H0
-t
Do not reject H0
3
X
Critical value
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc.
Chap 8-25
Upper Tail Tests
 There is only one
critical value, since
the rejection area is
in only one tail
t
H0: μ ≤ 3
H1: μ > 3

Do not reject H0
3
tα
Reject H0
X
Critical value
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc.
Chap 8-26
Assumptions of the One-Sample t Test
 The data is randomly selected
 The population is normally distributed or
the sample size is over 30 and the population is
not highly skewed
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc.
Chap 8-27
Hypothesis Tests for Proportions
 Involves categorical values
 Two possible outcomes
 “Success” (possesses a certain characteristic)
 “Failure” (does not possesses that characteristic)
 Fraction or proportion of the population in the
“success” category is denoted by p
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc.
Chap 8-28
Proportions
(continued)
 Sample proportion in the success category is
denoted by ps
X number of successesin sample
 ps  n 
sample size
 When both np and n(1-p) are at least 5, ps
can be approximated by a normal distribution
with mean and standard deviation

p(1 p)
μps  p
σ ps 
n
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc.
Chap 8-29
Hypothesis Tests for Proportions
 The sampling
distribution of ps
is approximately
normal, so the test
statistic is a Z
value:
Z
ps  p
p(1  p)
n
Hypothesis
Tests for p
np  5
and
n(1-p)  5
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc.
np < 5
or
n(1-p) < 5
Not discussed
in this chapter
Chap 8-30
Z Test for Proportion
in Terms of Number of Successes
 An equivalent form
to the last slide,
but in terms of the
number of
successes, X:
X  np
Z
np(1  p)
Hypothesis
Tests for X
X5
and
n-X  5
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc.
X<5
or
n-X < 5
Not discussed
in this chapter
Chap 8-31
Example: Z Test for Proportion
A marketing company
claims that it receives
8% responses from its
mailing. To test this
claim, a random sample
of 500 were surveyed
with 25 responses. Test
at the  = .05
significance level.
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc.
Check:
n p = (500)(.08) = 40

n(1-p) = (500)(.92) = 460
Chap 8-32
Z Test for Proportion: Solution
Test Statistic:
H0: p = .08
H1: p  .08
Z
 = .05
n = 500, ps = .05
ps  p

p(1 p)
n
Critical Values: ± 1.96
Reject
Reject
.025
.025
-1.96
0
1.96
z
-2.47
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc.
.05  .08
 2.47
.08(1 .08)
500
p-value for -2.27 is .0134
Decision:
Reject H0 at  = .05
There is sufficient
Conclusion:
evidence
to reject the
company’s claim of 8%
response rate.
Chap 8-33
Using PHStat
Options
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc.
Chap 8-34
Sample PHStat Output
Input
Output
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc.
Chap 8-35
Potential Pitfalls and
Ethical Considerations
 Use randomly collected data to reduce selection biases
 Do not use human subjects without informed consent
 Choose the level of significance, α, before data
collection
 Do not employ “data snooping” to choose between onetail and two-tail test, or to determine the level of
significance
 Do not practice “data cleansing” to hide observations
that do not support a stated hypothesis
 Report all pertinent findings
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc.
Chap 8-36
Chapter Summary
 Addressed hypothesis testing methodology
 Discussed critical value and p–value approaches to
hypothesis testing
 Discussed type 1 and Type2 errors
 Performed two tailed t test for the mean (σ unknown)
 Performed Z test for the proportion
 Discussed one-tail and two-tail tests
 Addressed pitfalls and ethical issues
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc.
Chap 8-37
Answer Sheet for All Problems
 ___________ Null Hypothesis
 ___________ Alternate Hypothesis
 ___________ Alpha
 ___________ p-value
 ___________ Decision (reject or do not reject)
 Conclusion:
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc.
Chap 8-38
Download