Title: HYPOTHESIS TESTING
1HYPOTHESIS TESTING
CONFIDENCE INTERVALS
DEPARTMENT OF STATISTICS
REDGEMAN_at_UIDAHO.EDU
OFFICE 1-208-885-4410
DR. RICK EDGEMAN, PROFESSOR CHAIR SIX SIGMA
BLACK BELT
2 Conjectures ? (Hypotheses)
B
or
A
Consequences
Meaning Action(s)
Information Risk Requirements
Evaluation (Test Method)
Zone of Belief
Decision Criteria
Informed Decision
Gather Evaluate Facts
The Hypothesis Testing Approach
3The Scientific Method
Noninformative Event
Informative Event
Little or Nothing Learned
No Observer or Uninformed Observer
Nothing Learned
Scientific Method of Investigation
Informed Observer
Little or Nothing Learned
Discovery!
4Motivation for Hypothesis Testing
- The intent of hypothesis testing is formally
examine two opposing conjectures (hypotheses),
H0 and HA. - These two hypotheses are mutually exclusive and
exhaustive so that one is true to the exclusion
of the other. - We accumulate evidence - collect and analyze
sample information - for the purpose of
determining which of the two hypotheses is true
and which of the two hypotheses is false. - Beyond the issue of truth, addressed
statistically, is the issue of justice. Justice
is beyond the scope of statistical investigation.
5 The American Trial System
In Truth, the Defendant is
H0 Innocent HA
Guilty
Correct Decision Incorrect
Decision Innocent Individual
Guilty Individual Goes Free
Goes Free
Incorrect Decision Correct Decision
Innocent Individual Guilty
Individual Is Disciplined
Is Disciplined
Innocent Guilty
Verdict
6 Hypothesis Testing the American Justice System
- State the Opposing Conjectures, H0 and HA.
- Determine the amount of evidence required, n, and
the risk of committing a type I error, ? - What sort of evaluation of the evidence is
required and what is the justification for this?
(type of test) - What are the conditions which proclaim guilt and
those which proclaim innocence? (Decision Rule) - Gather evaluate the evidence.
- What is the verdict? (H0 or HA?)
- Determine Zone of Belief Confidence Interval.
- What is appropriate justice? --- Conclusions
7 True, But Unknown State of the World
H0 is True
HA is True
Correct Decision Incorrect
Decision
Type II Error Probability ?? Incorrect
Decision Correct Decision Type I
Error Probability ?
Ho is True Decision HA is True
8Hypothesis Testing Algorithm
- Specify H0 and HA
- Specify n and ?
- What Type of Test and Why?
- Critical Value(s) and Decision Rule (DR)
- Collect Pertinent Data and Determine the
Calculated Value of the Test Statistic (e.g.
Zcalc, tcalc, ?2calc, etc) - Make a Decision to Either Reject H0 in Favor of
HA or to Fail to Reject (FTR) H0. - Construct Interpret the Appropriate Confidence
Interval - Conclusions? Implications Actions
9Z-test C.I. for µ
- H0 ? lt gt ?0 vs. HA ? ? gt lt ?0
- n _______ ? _______
- Testing a Hypothesis About a Mean
- Process Performance Measure is Approximately
Normally Distributed - We Know ?
- Therefore this is a Z-test - Use the Normal
Distribution. - DR (? in HA) Reject H0 in favor of HA if Zcalc
lt -Z?/2 or if Zcalc gt Z?/2. Otherwise, FTR H0. - DR (gt in HA) Reject H0 in favor of HA iff Zcalc
gt Z? . Otherwise, FTR H0. - DR (lt in HA) Reject H0 in favor of HA iff Zcalc
lt -Z?. Otherwise, FTR H0.
10Z-test Algorithm (Continued)
- Zcalc (X - ?0)/(?/ /n)
- _____ Reject H0 in Favor of HA. _______ FTR
H0. - The Confidence Interval for ? is Given by
X Z?/2(?/ n ) - Interpretation
11t-test and Confidence Interval for ?
- H0 ? lt gt ?0 vs. HA ? ? gt lt ?0
- n _______ ? _______
- Testing a Hypothesis About a Mean
- Process Performance Measure is Approximately
Normally Distributed or We Have a Large Sample - We Do Not Know ???Which Must be Estimated by S.
- Therefore this is a t-test - Use Students T
Distribution. - DR (? in HA) Reject H0 in favor of HA if tcalc
lt -t?/2 or if tcalc gt t?/2. Otherwise, FTR H0. - DR (gt in HA) Reject H0 in favor of HA iff tcalc
gt t? . Otherwise, FTR H0. - DR (lt in HA) Reject H0 in favor of HA iff tcalc
lt -t? Otherwise, FTR H0.
12t-test Algorithm (Continued)
- tcalc (X - ?0)/(s/ /n )
- _____ Reject H0 in Favor of HA. _______ FTR
H0. - The Confidence Interval for ? is Given by
- X t?/2(s/ n )
- Interpretation
13Z-test C.I. for p
- H0 p lt gt p0 vs. HA p ? gt lt p0
- n _______ ? _______
- Testing a Hypothesis About a Proportion
- We have a large sample???that is, both np0 and
n(1-p0) gt 5 - Therefore this is a Z-test - Use the Normal
Distribution. - DR (? in HA) Reject H0 in favor of HA if Zcalc
lt -Z?/2 or if Zcalc gt Z?/2. Otherwise, FTR H0. - DR (gt in HA) Reject H0 in favor of HA iff Zcalc
gt Z? . Otherwise, FTR H0. - DR (lt in HA) Reject H0 in favor of HA iff Zcalc
lt -Z?. Otherwise, FTR H0.
14 Z-test for a proportion
- Zcalc (p - p0)/( ? p0(1-p0)/n )
- _____ Reject H0 in Favor of HA. _______ FTR
H0. - The Confidence Interval for p is Given by
- p Z?/2( ? p(1-p)/n )
- Interpretation
15Advance, Inc.
Integrated Circuit Manufacturing Methods
Materials
16 Z-Test Confidence Interval Training Effect
Example
- Interested in increasing productivity rating in
the integrated circuit division, Advance Inc.
determined that a methods review course would be
of value to employees in the IC division. - To determine the impact of this measure they
reviewed historical productivity records for the
division and determined that the average level
was 100 with a standard deviation of 10. - Fifty IC division employees participated in the
course and the post-course productivity of these
employees was measured, on average, to be 105. - Assume that productivity ratings are
approximately distributed. Did the course have a
beneficial effect. Test the appropriate
hypothesis at the ? .05 level of significance.
17Training Effect Example
- H0 ? lt 100 HA ? gt 100
- n 50 ? .05
- (i) testing a mean (ii) normal distribution
(iii) ? 10 is known so that this is a Z-test - DR Reject H0 in favor of HA iff Zcalc gt
1.645. Otherwise, FTR H0 - Zcalc (X - ?0)/(? /? n) (105 - 100)/
(10/ ?50 ) 5/1.414 3.536 - X Reject H0 in favor of HA. _______
FTR H0 - The 95 Confidence Interval is Given by X
Z?/2 (?/ ? n) which is 105 1.96(1.414)
105 2.77 or 102.23 lt ? lt 107.77 - Thus the course appears to have helped improve IC
division employee productivity from an average
level of 100 to a level that is at least 102.23
and at most 107.77. - A follow-up question is this increase worth the
investment?
18Loan Application Processing
19First Peoples Bank of Central City
- First Peoples Bank of Central City would like to
improve their loan application process. In
particular currently the amount of time required
to process loan applications is approximately
normally distributed with a mean of 18 days. - Measures intended to simplify and speed the
process have been identified and implemented.
Were they effective? Test the appropriate
hypothesis at the ? .05 level of significance
if a sample of 25 applications submitted after
the measures were implemented gave an average
processing time of 15.2 days and a standard
deviation of 2.0 days.
20First Peoples Bank of Central City
- H0 ? gt 18 HA ? lt 18
- n 25 ? .05
- (i) testing a mean (ii) normal distribution
(iii) ? is unknown and must be estimated so that
this is a t-test - DR Reject H0 in favor of HA iff tcalc lt
-1.711. Otherwise, FTR H0 - tcalc (X - ?0)/(s / vn) (15.2 - 18)/ (2/
v 25 ) -2.8/.4 -7.00 - X Reject H0 in favor of HA. _______
FTR H0 - The 95 Confidence Interval is Given by X
t?/2 (s/vn) which is 15.2 2.064(.4)
15.2 .83 or 14.37 lt ? lt 16.03 - Thus the course appears to have helped decrease
the average time required to process a loan
application from 18 days to a level that is at
least 14.37 days and at most 16.03 days.
21Small Business Loan Defaults
22First Peoples Bank of Central City Small
Business Loan Defaults
- Historically, 12 of Small Business Loans granted
result in default. Three years ago, FPB of
Central City purchased software which they hope
will assist in reducing the default rate by more
effectively discriminating between small business
loan applicants who are likely to default and
those who are not likely to do so. - After adequately training their loan officers in
use of software, FPB sampled 150 small business
loan applications processed using the software
and found 9 to be in default at the end of two
years. - Using a .10, does it appear that the software
is of value?
23 Small Business Loan Default Rate
- H0 p gt .12 HA p lt .12
- n 150 ? .10
- (i) testing a proportion (ii) np0 150(.12)
18 and n(1-p0 ) 132 - DR Reject H0 in favor of HA iff Zcalc lt
-1.282. Otherwise, FTR H0 - Zcalc (p - p0)/( p0(1-p0)/n ) (.06
- .12)/ (.12(.88)/150 )
-.06/.026533 -2.261 - X Reject H0 in favor of HA. _______
FTR H0 - The 95 Confidence Interval is Given by p
Z?/2 ( p(1-p)/ n ) which is .06 1.645(
.06(.94)/150 ) .06 1.645(.0194) or
.06 .032 or .028 lt p lt .092 - Thus the course appears to have helped decrease
the small business loan default rate from a level
of 12 to a level that is between 2.8 and 9.2
with a best estimate of 6.
24?2-test C.I. for ?
- H0 ? lt gt ?0 vs. HA ? ? gt lt ?0
- n _______ ? _______
- Testing a Hypothesis About a Standard Deviation
(or Variance) - The Measured Trait (e.g. the PPM) is
Approximately Normal - Therefore this is a ?2-test - Use the
Chi-Square Distribution. - DR (?in HA) Reject H0 in favor of HA if ?2calc lt
?2small,?/2 or if ?2calc gt ?2large,?/2.
Otherwise, FTR H0. - DR (gt in HA) Reject H0 in favor of HA iff ?2calc
gt ?2large,? Otherwise, FTR H0. - DR (lt in HA) Reject H0 in favor of HA iff ?2calc
lt ?2small,? Otherwise, FTR H0.
25?2 Test C.I. (continued)
- ?2calc (n-1)s2/(?20 )
- _____ Reject H0 in Favor of HA. _______ FTR
H0. - The Confidence Intervals for ???and ??are Given
by - (n-1)s2/?2large,?/2 lt ?2 lt (n-1)s2/?2small,?/2
- and
- (n-1)s2/?2large,?/2 lt ? lt
(n-1)s2/?2small,?/2 - Interpretation
26Fast Facts Financial, Inc.
Fast Facts Financial (FFF), Inc. provides credit
reports to lending institutions that evaluate
applicants for home mortgages, vehicle, home
equity, and other loans. A pressure faced by
FFF Inc. is that several competing credit
reporting companies provide reports in about the
same average amount of time, but are able to
promise a lower time than FFF Inc - the reason
being that the variation in time required to
compile and summarize credit data is smaller than
the time required by FFF. FFF has identified
implemented procedures which they believe will
reduce this variation. If the historic standard
deviation is 2.3 days, and the standard deviation
for a sample of 25 credit reports under the new
procedures is 1.8 days, then test the appropriate
hypothesis at the ? .05 level of significance.
Assume that the time factor is approximately
normally distributed.
27FFF Example
- H0 ? lt gt ?0 vs. HA? ? gt lt ?0
where ?0 2.3 - n 25 ????? .05 .
- Testing a Hypothesis About a Standard Deviation
(or Variance) - The Measured Trait (e.g. the PPM) is
Approximately Normal - Therefore this is a ?2-test - Use the
Chi-Square Distribution. - DR (lt in HA) Reject H0 in favor of HA iff ?2calc
lt ?2small,? 13.8484. Otherwise, FTR H0. - ?2calc (n-1)s2/?20 (24)( 1.82 )/ (2.32)
77.76/5.29 14.70 - Reject H0 in favor of HA. X FTR
H0. - 77.76/39.3641 lt ?2 lt 77.76/12.4011 or 1.975 lt
?2 lt 6.27 so that 1.405 days lt ? lt
2.50 days - Evidence is inconclusive. Work should continue
on this.
28Two Sample Tests and Confidence Intervals
29Tests and Intervals for Two Means
H0 µ1 µ2 µd HA µ1 µ2 ? lt gt µd n1
_____ n2 _____ a 0 Comparison of
Means from Two Processes Normality Can Be
Reasonably Assumed Are the two variances known or
unknown? (a) Known ? Z-test (b) Unknown but
Similar in Value ? t-test with n1n2 2 df (c)
Unknown and Unequal ? t-test with complicated
df Critical Values and Decision Rules are the
same as for any Z-test or t-test.
30C.I. for µ1 µ2 X1 X2 ? ZsX1-X2
or X1 X2 ? tSX1-X2 Decisions
Same as any other Z or T test. Implications
Context Specific
31- Z (X1 X2) µd
-
- sv(1/n1 1/n2)
- Z (X1 X2) µd
-
- v(s21/n1 s22/n2)
- (b) t (X1 X2) µd (assume equal
variances) -
- Spv(1/n1 1/n2) where df
n1n2 2 -
and Sp2 (n1-1)S12 (n2-1)S22 - (c ) t (X1 X2) µd (do not assume
equal variances) -
- v(S12/n1 S22/n2) where df
(s12 /n1) (s22/n2)2 -
- (s12 /n1)2 (s22/n2)2
32- Equality of Variances The F-Test
- H0 s1 s2 vs. HA s1 ? lt gt s2
- n1 _____ n2 _____ a _____
- Test of equality of variances ? F-test
- ___ gt in HA reject H0 in favor of HA iff Fcalc gt
Fa,big. Otherwise, FTR H0. - ___ lt in HA reject H0 in favor of HA iff Fcalc lt
Fa,small. Otherwise, FTR H0. - ___ ? in HA reject H0 in favor of HA iff Fcalc lt
Fa/2,small or if Fcalc gt Fa/2,big. Otherwise, FTR
H0.
33Fcalc S12/S22 Make a decision. Fcalc/
Fn1-1,n2-1,a/2 large s12/s22
Fcalc/Fn1-1,n2-1,a/2 small C.I. for s1/s2 is
obtained by taking square roots of the endpoints
of the above C.I. for s12/s22 Conclusions /
Implications Context Specific.
34Tests Intervals for Two Proportions
H0 p1 p2 pd HA p1 p2 ? lt gt pd n1
_____ n2 _____ a 0 Comparison of
Proportions from Two Processes n1p1, n2p2,
n1(1-p1) and n2(1-p2) all 5 ? Z-test Critical
Values and Decision Rules are the same as for any
Z-test.
35 Z (p1 p2)
IF pd 0 v p(1-p)(1/n1 1/n2)
where p (X1X2)/(n1 n2)
Z
(p1 p2) pd IF pd ? 0
v (p1(1--p1)/n1 p2(1-p2)/n2
C.I. for p1-p2 is (p1
p2) ? Z?/2 v (p1(1--p1)/n1 p2(1-p2)/n2
36HYPOTHESIS TESTING
CONFIDENCE INTERVALS
End of Session
DEPARTMENT OF STATISTICS
REDGEMAN_at_UIDAHO.EDU
OFFICE 1-208-885-4410
DR. RICK EDGEMAN, PROFESSOR CHAIR SIX SIGMA
BLACK BELT