Basic Business Statistics (8th Edition)

Download Report

Transcript Basic Business Statistics (8th Edition)

Business Statistics: A First
course
4th Edition
Chapter 9
Fundamentals of Hypothesis
Testing: One-Sample Tests
© 2002 Prentice-Hall, Inc.
Chap 7-1
Chapter Topics








Hypothesis testing methodology
Z test for the mean (  known)
P-value approach to hypothesis testing
Connection to confidence interval estimation
One-tail tests
T test for the mean ( unknown)
Z test for the proportion
Potential hypothesis-testing pitfalls and ethical
considerations
© 2002 Prentice-Hall, Inc.
Chap 7-2
What is a Hypothesis?

A hypothesis is a
claim (assumption)
about the population
parameter


I claim the mean GPA of
this class is   3.5!
Examples of parameters
are population mean
or proportion
The parameter must
be identified before
analysis
© 1984-1994 T/Maker Co.
© 2002 Prentice-Hall, Inc.
Chap 7-3
The Null Hypothesis, H0

States the assumption (numerical) to be
tested


e.g.: The average number of TV sets in U.S.
Homes is at least three (H 0 :   3 )
Is always about a population parameter
( H0 :   3), not about a sample
statistic ( H0 : X  3 )
© 2002 Prentice-Hall, Inc.
Chap 7-4
The Null Hypothesis, H0

Begins with the assumption that the null
hypothesis is true




(continued)
Similar to the notion of innocent until
proven guilty
Refers to the status quo
Always contains the “=” sign
May or may not be rejected
© 2002 Prentice-Hall, Inc.
Chap 7-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 less than 3 ( H1 :   3 )
Challenges the status quo
Never contains the “=” sign
May or may not be accepted
Is generally the hypothesis that is
believed (or needed to be proven) to be
true by the researcher
© 2002 Prentice-Hall, Inc.
Chap 7-6
Hypothesis Testing Process
Assume the
population
mean age is 50.
( H0 :   50)
Identify the Population
Is X  20 likely if    ?
No, not likely!
REJECT
Null Hypothesis
© 2002 Prentice-Hall, Inc.
Take a Sample
 X  20 
Chap 7-7
Reason for Rejecting H0
Sampling Distribution of X
... Therefore,
we reject the
null hypothesis
that μ = 50.
It is unlikely that
we would get a
sample mean of
this value ...
... if in fact this were
the population mean.
20
© 2002 Prentice-Hall, Inc.
 = 50
If H0 is true
X
Chap 7-8
Filling Process


You are in charge of the filling process for the
one pound jars of Cheese Whiz
You take a random sample of 36 jars each
hour to determine if the filling process is in
control
© 2002 Prentice-Hall, Inc.
Chap 7-9
Identify the Problem

Steps:
 State the Null Hypothesis (H0:   16)
State its opposite, the Alternative
Hypothesis (H1:   16)
 Hypotheses are mutually exclusive &
exhaustive
 Sometimes it is easier to form the
alternative hypothesis first.
© 2002 Prentice-Hall, Inc.
Decision Rule
Accept H0 if
15.8 oz X  16 oz
Reject H0 if
X < 15.8 oz or X > 16.2 oz
• Assume a sample of 36 jars tested each hour
• Population standard deviation is .6 oz.
© 2002 Prentice-Hall, Inc.
Chap 7-11
Possible Results
States of Nature
H0 is True
 = 16
A
C
T
I
O
N
S
Do Not
Reject Ho
Reject H0
© 2002 Prentice-Hall, Inc.
Correct
Decision
Type I Error
(a
H0 is False
  16
Type II Error
(b
Correct
Decision
Chap 7-12
Type I Error
Do Not
Reject H0
Reject H0
Reject H0
.0228
.4772 .4772
15.8
16
-2
16.2
+2
15.8 - 16
-
X

 -
Z
6

n
.0228
X
Z
Z
36
16.2 - 16
6
 +
36
a  8 + 8  46  46%
© 2002 Prentice-Hall, Inc.
Chap 7-13
Reject H0
Do Not
Reject H0
.3413
15.8 - 15.9
6
36
© 2002 Prentice-Hall, Inc.
.8400 = b
.4987
15.8 15.9 16.2
0
Z1 
.3413
.4987
Reject H0
 - 1
X
Z
Z2 
16.2 - 15.9
6
 + 3
36
Chap 7-14
a & b Have an
Inverse Relationship
Reduce probability of one error
and the other one goes up.
b
a
© 2002 Prentice-Hall, Inc.
Factors Affecting
Type II Error, b

True Value of Population Parameter


Significance Level a


b
Increases When a Decreases
Population Standard Deviation 


Increases When Difference Between Hypothesized Parameter
& True Value Decreases
Increases When  Increases
b 
Sample Size n

Increases When n Decreases
b
n
© 2002 Prentice-Hall, Inc.
a
Hypothesis Testing: Steps
1. State H0 and H1
2. Choose a - level of significance
3. Use Information in Steps 1 and 2 to Design a
Decision Rule
4. Collect Data
5. Compare Sample Data to Decision Rule and State
Conclusion.
© 2002 Prentice-Hall, Inc.
Chap 7-17
Setting Up H0 and H1



H0 must contain the equality (=)
Either H0 or H1 must precisely represent what
is being tested
H0 and H1 must be mutually exhaustive (must
cover all possible outcomes)
© 2002 Prentice-Hall, Inc.
Chap 7-18
Level of Significance, a

Defines unlikely values of sample statistic if
null hypothesis is true


Is designated by



Called rejection region of the sampling distribution
a , (level of significance)
Typical values are .01, .05, .10
Is selected by the researcher at the beginning
Provides the critical value(s) of the test
© 2002 Prentice-Hall, Inc.
Chap 7-19
Level of Significance
and the Rejection Region
a
H0:   3
H1:  < 3
H0:   3
H1:  > 3
Rejection
Regions
0
0
H0:   3
H1:   3
Critical
Value(s)
a
a/2
0
© 2002 Prentice-Hall, Inc.
Chap 7-20
Example: One Tail Test
Q. Does an average box of
cereal contain more than
368 grams of cereal? A
random sample of 25
boxes showed X = 372.5.
The company has
specified  to be 15 grams.
Test at the a  0.05 level.
© 2002 Prentice-Hall, Inc.
368 gm.
H0:   368
H1:  > 368
Chap 7-21
Finding Critical Value: One Tail
What is Z given a = 0.05?
Standardized Cumulative
Normal Distribution Table
(Portion)
Z 1
Z
.95
a = .05
0 1.645 Z
Critical Value
= 1.645
© 2002 Prentice-Hall, Inc.
.04
.05
.06
1.6 .9495 .9505 .9515
1.7 .9591 .9599 .9608
1.8 .9671 .9678 .9686
1.9 .9738 .9744 .9750
Chap 7-22
Example Solution: One Tail Test
H0:   368
H1:  > 368
Test Statistic:
a = 0.5
n = 25
Critical Value: 1.645
Reject
.05
0 1.645 Z
© 2002 Prentice-Hall, Inc.
1.50
X -
Z
 1.50

n
Decision:
Do Not Reject at a = .05
Conclusion:
No evidence that true
mean is more than 368
Chap 7-23
p -Value Solution
p-Value is P(Z  1.50) = 0.0668
Use the
alternative
hypothesis
to find the
direction of
the rejection
region.
© 2002 Prentice-Hall, Inc.
P-Value =.0668
1.0000
- .9332
.0668
0
From Z Table:
Lookup 1.50 to
Obtain .9332
1.50
Z
Z Value of Sample
Statistic
Chap 7-24
p -Value Solution
(continued)
(p-Value = 0.0668)  (a = 0.05)
Do Not Reject.
p Value = 0.0668
Reject
a = 0.05
0
1.50
1.645
Z
Test Statistic 1.50 is in the Do Not Reject Region
© 2002 Prentice-Hall, Inc.
Chap 7-25
Example: Two-Tail Test
Q. Does an average box
of cereal contain 368
grams of cereal? A
random sample of 25
boxes showed X =
372.5. The company
has specified  to be
15 grams. Test at the
a  0.05 level.
© 2002 Prentice-Hall, Inc.
368 gm.
H0:   368
H1:   368
Chap 7-26
Example Solution: Two-Tail Test
H0:   368
H1:   368
Test Statistic:
a = 0.05
n = 25
Critical Value: ±1.96
Reject
.025
-1.96
© 2002 Prentice-Hall, Inc.
.025
0 1.96
1.50
Z
X -  372.5 - 368
Z

 1.50

15
n
25
Decision:
Do Not Reject at a = .05
Conclusion:
No Evidence that True
Mean is Not 368
Chap 7-27
p-Value Solution
(p Value = 0.1336)  (a = 0.05)
Do Not Reject.
p Value = 2 x 0.0668
Reject
Reject
a = 0.05
0
1.50
1.96
Z
Test Statistic 1.50 is in the Do Not Reject Region
© 2002 Prentice-Hall, Inc.
Chap 7-28
Connection to
Confidence Intervals
For X  372.5,   15 and n  25,
the 95% confidence interval is:
372.5 - 1.96 15 / 25    372.5 + 1.96 15 / 25
or
366.62    378.38
If this interval contains the hypothesized mean (368),
we do not reject the null hypothesis.
It does. Do not reject.
© 2002 Prentice-Hall, Inc.
Chap 7-29
t Test:  Unknown

Assumption



Population is normally distributed
If not normal, requires a large sample
T test statistic with n-1 degrees of freedom

© 2002 Prentice-Hall, Inc.
X -
t
S/ n
Chap 7-30
Example: One-Tail t Test
Does an average box of
cereal contain more than
368 grams of cereal? A
random sample of 36
boxes showed X = 372.5,
and s  15. Test at the a 
0.01 level.
 is not given
© 2002 Prentice-Hall, Inc.
368 gm.
H0:   368
H1:  > 368
Chap 7-31
Example Solution: One-Tail
H0:   368
H1:  > 368
Test Statistic:
a = 0.01
n = 36, df = 35
Critical Value: 2.4377
Reject
.01
0 2.437
© 2002 Prentice-Hall, Inc.
7
1.80
t35
X -  372.5 - 368
t

 1.80
S
15
n
36
Decision:
Do Not Reject at a = .01
Conclusion:
No evidence that true
mean is more than 368
Chap 7-32
p -Value Solution
(p Value is between .025 and .05)  (a = 0.01).
Do Not Reject.
p Value = [.025, .05]
Reject
a = 0.01
0
t35
2.4377
Test Statistic 1.80 is in the Do Not Reject Region
© 2002 Prentice-Hall, Inc.
1.80
Chap 7-33
t Test:  Unknown in PHStat


PHStat | one-sample tests | t test for the
mean, sigma known …
Example in excel spreadsheet
© 2002 Prentice-Hall, Inc.
Chap 7-34
Proportions




Involves categorical variables
Fraction or % of population in a category
If two categorical outcomes, binomial
distribution


Either possesses or doesn’t possess the characteristic
Sample proportion ( p )
p
© 2002 Prentice-Hall, Inc.
X
num berof successes

n
sam plesize
Chap 7-35
Example: Z Test for Proportion
• Problem: AstraZeneca claims that less
than 5% of patients taking Nexium
experience an upset stomach.
• Approach: To test this claim, a random
sample of 500 patients were interviewed.
15 of the patients experienced stomach
pain.
• Solution: Test at the a = .05 significance level.
© 2002 Prentice-Hall, Inc.
Chap 7-36
Z Test for Proportion:
Solution
H0: p  .05
H1: p  .05



Test Statistic:
a = .05
n = 500
p = 15/500 = .03
p -p
Z @
p (1 - p)
n
.03 -.05
=
= -2.05
.05 (1 - .05)
500
Decision:
Reject at a = .05
Reject
.05
Conclusion:
0
Critical Value: 164
© 2002 Prentice-Hall, Inc.
Z
We do have sufficient evidence to
support the claim that less than
5% of patients experience an
upset stomach.
Chap 7-37
Z Test for Proportion:
Solution
H0: p  .05
H1: p  .05



Test Statistic:
a = .05
n = 500
p = 15/500 = .03
p -p
Z @
p (1 - p)
n
Decision:
Reject
Ho
Reject at a = .05
.05
Conclusion:
0
Critical Value: 164
© 2002 Prentice-Hall, Inc.
.03 -.05
=
= -2.05
.05 (1 - .05)
500
Z
We do have sufficient evidence to
support the claim that less than
5% of patients experience an
upset stomach.
Chap 7-38
Z Test for Proportion in PHStat


PHStat | one-sample tests | z test for the
proportion …
Example in excel spreadsheet
© 2002 Prentice-Hall, Inc.
Chap 7-39
Controlling a and b
A bank wishes to open a new branch if average monthly income is
at least 4,000. It does not want to open the branch if average monthly
income is less than or equal to 3,800.
Assume that   
If the bank wants:
a  
b  1
What sample size should be used?
What should the Decision Rule be?
© 2002 Prentice-Hall, Inc.
Chap 7-40
H0:   4,00
H1:  ≤ 3,800
Reject H0
Do not reject Ho
.05 = a
Xc 4,000
-1.645 0
reject H0
X
Z
Do not reject H0
.01 = b
3,800
0
-1.645 =
Xc
2.33
Xc - 4,000
500 n
n = 99
Do not Reject H0 if Xc $ 3,917
Reject H0 if Xc < $3,917
© 2002 Prentice-Hall, Inc.
X
Z
2.33 =
Xc - 3,800
500 n
Chap 7-41
Potential Pitfalls and
Ethical Considerations



Randomize data collection method to reduce
selection biases
Do not manipulate the treatment of human
subjects without informed consent
Do not employ “data snooping” to choose
between one-tail and two-tail test, or to
determine the level of significance
© 2002 Prentice-Hall, Inc.
Chap 7-42
Potential Pitfalls
and Ethical Considerations
(continued)


Do not practice “data cleansing” to hide
observations that do not support a stated
hypothesis
Report all pertinent findings
© 2002 Prentice-Hall, Inc.
Chap 7-43
Chapter Summary

Addressed hypothesis testing methodology

Performed Z Test for the mean ( Known)

Discussed p –Value approach to hypothesis
testing

Made connection to confidence interval
estimation
© 2002 Prentice-Hall, Inc.
Chap 7-44
Chapter Summary
(continued)

Performed one-tail and two-tail tests

Performed t test for the mean (  unknown)

Performed Z test for the proportion

Discussed potential pitfalls and ethical
considerations
© 2002 Prentice-Hall, Inc.
Chap 7-45