Basic Business Statistics (8th Edition)

Download Report

Transcript Basic Business Statistics (8th Edition)

Statistics for Managers
using Excel
3rd Edition
Chapter 7
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 m = 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
Level of Significance, 

Defines unlikely values of sample statistic if
null hypothesis is true


Is designated by



Called rejection region of the sampling distribution
 , (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-9
Level of Significance
and the Rejection Region

H0:  3
H1:  < 3
H0:   3
H1:  > 3
Rejection
Regions
0
0
H0:  3
H1:   3
Critical
Value(s)

/2
0
© 2002 Prentice-Hall, Inc.
Chap 7-10
Errors in Making Decisions

Type I Error
Rejects a true null hypothesis
 Has serious consequences
The probability of Type I Error is





Type II Error



© 2002 Prentice-Hall, Inc.
Called level of significance
Set by researcher
Fails to reject a false null hypothesis
The probability of Type II Error is 
The power of the test is 1  


Chap 7-11
Errors in Making Decisions

(continued)
Probability of not making Type I Error


1   
Called the confidence coefficient
© 2002 Prentice-Hall, Inc.
Chap 7-12
Result Probabilities
H0: Innocent
Jury Trial
Hypothesis Test
The Truth
Verdict
Innocent
Guilty
© 2002 Prentice-Hall, Inc.
The Truth
Innocent Guilty
Correct
Error
Error
Decision H0 True H0 False
Do Not
Reject
H0
Correct Reject
H0
1-
Type II
Error (  )
Type I
Error
( )
Power
(1 -  )
Chap 7-13
Type I & II Errors Have an
Inverse Relationship
If you reduce the probability of one
error, the other one increases so that
everything else is unchanged.


© 2002 Prentice-Hall, Inc.
Chap 7-14
Factors Affecting Type II Error

True value of population parameter



Increases when



Increases when  increases
Sample size



decreases
Population standard deviation


Increases when the difference between
hypothesized parameter and its true value
decrease
Significance level



Increases when n decreases
 

n
© 2002 Prentice-Hall, Inc.
Chap 7-15
How to Choose between
Type I and Type II Errors


Choice depends on the cost of the errors
Choose smaller Type I Error when the cost of
rejecting the maintained hypothesis is high



A criminal trial: convicting an innocent person
The Exxon Valdez: causing an oil tanker to sink
Choose larger Type I Error when you have an
interest in changing the status quo


A decision in a startup company about a new piece
of software
A decision about unequal pay for a covered group
© 2002 Prentice-Hall, Inc.
Chap 7-16
Critical Values
Approach to Testing


Convert sample statistic (e.g.: X ) to test
statistic (e.g.: Z, t or F –statistic)
Obtain critical value(s) for a specified 
from a table or computer


If the test statistic falls in the critical region,
reject H0
Otherwise do not reject H0
© 2002 Prentice-Hall, Inc.
Chap 7-17
p-Value Approach to Testing


Convert Sample Statistic (e.g. X ) to Test
Statistic (e.g. Z, t or F –statistic)
Obtain the p-value from a table or computer




p-value: Probability of obtaining a test statistic
more extreme (  or  ) than the observed
sample value given H0 is true
Called observed level of significance
Smallest value of  that an H0 can be rejected
Compare the p-value with


© 2002 Prentice-Hall, Inc.
If p-value
If p-value
 
 

, do not reject H0
, reject H0
Chap 7-18
General Steps in
Hypothesis Testing
e.g.: Test the assumption that the true mean number of of
TV sets in U.S. homes is at least three (
Known)

1. State the H0
H0 :   3
2. State the H1
H1 :   3
3. Choose
 =.05

4. Choose n
5. Choose Test
© 2002 Prentice-Hall, Inc.
n  100
Z test
Chap 7-19
General Steps in
Hypothesis Testing
6. Set up critical value(s)
(continued)
Reject H0

7. Collect data
8. Compute test statistic
and p-value
-1.645
100 households surveyed
Z
Computed test stat =-2,
p-value = .0228
9. Make statistical decision Reject null hypothesis
10. Express conclusion
© 2002 Prentice-Hall, Inc.
The true mean number of TV
sets is less than 3
Chap 7-20
One-tail Z Test for Mean
(  Known)

Assumptions




Population is normally distributed
If not normal, requires large samples
Null hypothesis has  or  sign only
Z test statistic

Z
© 2002 Prentice-Hall, Inc.
X  X
X
X 

/ n
Chap 7-21
Rejection Region
H0: 0
H1:  > 0
H0: 0
H1:  < 0
Reject H0
Reject H0


0
Z Must Be Significantly
Below 0 to reject H0
© 2002 Prentice-Hall, Inc.
Z
0
Z
Small values of Z don’t
contradict H0
Don’t Reject H0 !
Chap 7-22
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 0.05 level.
© 2002 Prentice-Hall, Inc.
368 gm.
H0: 368
H1: > 368
Chap 7-23
Finding Critical Value: One Tail
What is Z given  = 0.05?
Standardized Cumulative
Normal Distribution Table
(Portion)
Z 1
Z
.95
 = .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-24
Example Solution: One Tail Test
H0: 368
H1:  > 368
Test Statistic:
 = 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  = .05
Conclusion:
No evidence that true
mean is more than 368
Chap 7-25
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-26
p -Value Solution
(continued)
(p-Value = 0.0668)  ( = 0.05)
Do Not Reject.
p Value = 0.0668
Reject
 = 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-27
One-tail Z Test for Mean
(  Known) in PHStat


PHStat | one-sample tests | Z test for the
mean, sigma known …
Example in excel spreadsheet
© 2002 Prentice-Hall, Inc.
Chap 7-28
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
0.05 level.
© 2002 Prentice-Hall, Inc.
368 gm.
H0:  368
H1:   368
Chap 7-29
Example Solution: Two-Tail Test
H0: 368
H1:  368
Test Statistic:
X   372.5  368
Z

 1.50

15
n
25
 = 0.05
n = 25
Critical Value: ±1.96
Reject
.025
-1.96
© 2002 Prentice-Hall, Inc.
.025
0 1.96
1.50
Z
Decision:
Do Not Reject at  = .05
Conclusion:
No Evidence that True
Mean is Not 368
Chap 7-30
p-Value Solution
(p Value = 0.1336)  ( = 0.05)
Do Not Reject.
p Value = 2 x 0.0668
Reject
Reject
 = 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-31
Two-tail Z Test for Mean
(  Known) in PHStat


PHStat | one-sample tests | Z test for the
mean, sigma known …
Example in excel spreadsheet
© 2002 Prentice-Hall, Inc.
Chap 7-32
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-33
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-34
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 
0.01 level.
 is not given
© 2002 Prentice-Hall, Inc.
368 gm.
H0:  368
H1: > 368
Chap 7-35
Example Solution: One-Tail
H0: 368
H1: > 368
Test Statistic:
 = 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  = .01
Conclusion:
No evidence that true
mean is more than 368
Chap 7-36
p -Value Solution
(p Value is between .025 and .05)  ( = 0.01).
Do Not Reject.
p Value = [.025, .05]
Reject
 = 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-37
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-38
Proportion


Involves categorical values
Two possible outcomes


“Success” (possesses a certain characteristic) and
“Failure” (does not possesses a certain
characteristic)
Fraction or proportion of population in the
“success” category is denoted by p
© 2002 Prentice-Hall, Inc.
Chap 7-39
Proportion

Sample proportion in the success category is
denoted by pS


(continued)
X Number of Successes
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  p
s
© 2002 Prentice-Hall, Inc.
p(1  p)
 ps 
n
Chap 7-40
Example: Z Test for Proportion
Q. A marketing company
claims that it receives
4% responses from its
mailing. To test this
claim, a random
sample of 500 were
surveyed with 25
responses. Test at the
 = .05 significance
level.
© 2002 Prentice-Hall, Inc.
Check:
np  500 .04   20
5
n 1  p   500 1  .04 
 480  5
Chap 7-41
Z Test for Proportion: Solution
H0: p .04
H1: p  .04
Test Statistic:
Z
 = .05
n = 500
.025
-1.96
© 2002 Prentice-Hall, Inc.
p 1  p 
n

.05  .04
.04 1  .04 
500
 1.14
Decision:
Critical Values:  1.96
Reject
pS  p
Do not reject at  = .05
Reject
.025
0 1.96 Z
1.14
Conclusion:
We do not have sufficient
evidence to reject the
company’s claim of 4%
response rate.
Chap 7-42
p -Value Solution
(p Value = 0.2542)  ( = 0.05).
Do Not Reject.
p Value = 2 x .1271
Reject
Reject
 = 0.05
0
1.14
1.96
Z
Test Statistic 1.14 is in the Do Not Reject Region
© 2002 Prentice-Hall, Inc.
Chap 7-43
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-44
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-45
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-46
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-47
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-48