Vous êtes sur la page 1sur 36

HYPOTHESIS TESTING &

DEPARTMENT OF STATISTICS
DR. RICK EDGEMAN, PROFESSOR & CHAIR SIX SIGMA BLACK BELT
REDGEMAN@UIDAHO.EDU OFFICE: +1-208-885-4410
CONFIDENCE INTERVALS
The Hypothesis Testing Approach
Conjectures
(Hypotheses)
E
v
a
l
u
a
t
i
o
n

(
T
e
s
t

M
e
t
h
o
d
)

G a t h e r & E v a l u a t e
F a c t s
Z
o
n
e

o
f

B
e
l
i
e
f

Consequences
A
B
or
The Scientific Method
No Observer
or Uninformed
Observer
Informed
Observer
Noninformative Event Informative Event
Scientific Method



of Investigation
Nothing Learned
Little or
Nothing Learned
Little or
Nothing Learned
Discovery!
Motivation for Hypothesis Testing
The intent of hypothesis testing is formally examine two
opposing conjectures (hypotheses), H
0
and H
A
.
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.
The American Trial System
In Truth, the Defendant is:
H
0
: Innocent H
A
: 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
V
e
r
d
i
c
t

Hypothesis Testing & the American Justice System
State the Opposing Conjectures, H
0
and H
A
.
Determine the amount of evidence required, n,
and the risk of committing a type I error, o
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? (H
0
or H
A
?)
Determine Zone of Belief: Confidence Interval.
What is appropriate justice? --- Conclusions
True, But Unknown State of the World
H
0
is True H
A
is True
H
o
is True

Decision

H
A
is True
Correct Decision Incorrect Decision
Type II Error Probability = |

Incorrect Decision Correct Decision
Type I Error Probability = o
Hypothesis Testing Algorithm
1) Specify H
0
and H
A
2) Specify n and o
3) What Type of Test and Why?
4) Critical Value(s) and Decision Rule (DR)
5) Collect Pertinent Data and Determine the Calculated Value of the
Test Statistic (e.g. Z
calc
, t
calc
, X
2
calc
, etc)
6) Make a Decision to Either Reject H
0
in Favor of H
A
or to Fail to
Reject (FTR) H
0
.
7) Construct & Interpret the Appropriate Confidence Interval
8) Conclusions? Implications & Actions
H
0
: = < >
0
vs. H
A
: > <
0

n = _______ o = _______
Testing a Hypothesis About a Mean;
Process Performance Measure is Approximately Normally Distributed;
We Know o
Therefore this is a Z-test - Use the Normal Distribution.
DR: ( in H
A
) Reject H
0
in favor of H
A
if Z
calc
< -Z
o/2
or if Z
calc
>
+Z
o/2
. Otherwise, FTR H
0
.
DR: (> in H
A
) Reject H
0
in favor of H
A
iff Z
calc
> +Z
o
. Otherwise,
FTR H
0
.
DR: (< in H
A
) Reject H
0
in favor of H
A
iff Z
calc
< -Z
o
. Otherwise,
FTR H
0
.
Z-test & C.I. for
Z-test Algorithm (Continued)
Zcalc = (X -
0
)/(o/ /n)
_____ Reject H
0
in Favor of H
A
. _______ FTR H
0
.
The Confidence Interval for is Given by:
X + Z
o/2
(o/ n )
Interpretation
t-test and Confidence Interval for
H
0
: = < >
0
vs. H
A
: = > <
0

n = _______ o = _______
Testing a Hypothesis About a Mean;
Process Performance Measure is Approximately Normally Distributed or We
Have a Large Sample;
We Do Not Know o Which Must be Estimated by S.
Therefore this is a t-test - Use Students T Distribution.
DR: (= in H
A
) Reject H
0
in favor of H
A
if t
calc
< -t
o/2
or if t
calc
> +t
o/2
.
Otherwise, FTR H
0
.
DR: (> in H
A
) Reject H
0
in favor of H
A
iff t
calc
> +t
o
. Otherwise, FTR H
0
.
DR: (< in H
A
) Reject H
0
in favor of H
A
iff t
calc
< -t
o
Otherwise, FTR H
0
.
t-test Algorithm (Continued)
t
calc
= (X -
0
)/(s/ /n )
_____ Reject H
0
in Favor of H
A
. _______ FTR H
0
.
The Confidence Interval for is Given by:
X + t
o/2
(s/ n )
Interpretation
Z-test & C.I. for p
H
0
: p = < > p
0
vs. H
A
: p = > < p
0

n = _______ o = _______
Testing a Hypothesis About a Proportion;
We have a large sample, that is, both np
0
and n(1-p
0
) > 5
Therefore this is a Z-test - Use the Normal Distribution.
DR: (= in H
A
) Reject H
0
in favor of H
A
if Z
calc
< -Z
o/2
or if Z
calc
> +Z
o/2
.
Otherwise, FTR H
0
.
DR: (> in H
A
) Reject H
0
in favor of H
A
iff Z
calc
> +Z
o
. Otherwise, FTR
H
0
.
DR: (< in H
A
) Reject H
0
in favor of H
A
iff Z
calc
< -Z
o
. Otherwise, FTR
H
0
.
Z-test for a proportion
Zcalc = (p - p
0
)/( \ p
0
(1-p
0
)/n )
_____ Reject H
0
in Favor of H
A
. _______ FTR H
0
.
The Confidence Interval for p is Given by:
p + Z
o/2
( \ p(1-p)/n )
Interpretation
^
^ ^ ^
Advance, Inc.
Integrated Circuit
Manufacturing

Methods & Materials

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 o = .05 level of significance.
Z-Test & Confidence Interval:
Training Effect Example
Training Effect Example
H
0
: < 100 H
A
: > 100
n = 50 o = .05
(i) testing a mean (ii) normal distribution (iii) o = 10 is known so that this is a Z-
test
DR: Reject H
0

in favor of H
A
iff Z
calc
> 1.645. Otherwise, FTR H
0
Z
calc
= (X -
0
)/(o /\ n) = (105 - 100)/ (10/ \50 ) = 5/1.414 = 3.536
X Reject H
0
in favor of H
A
. _______ FTR H
0
The 95% Confidence Interval is Given by: X + Z
o/2
(o/ \ n) which is 105 +
1.96(1.414) = 105 + 2.77 or 102.23 < < 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?
Loan Application Processing
First 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 o = .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.
First Peoples Bank of Central City
H
0
: > 18 H
A
: < 18
n = 25 o = .05
(i) testing a mean (ii) normal distribution (iii) o is unknown and must
be estimated so that this is a t-test
DR: Reject H
0

in favor of H
A
iff t
calc
< -1.711. Otherwise, FTR H
0
t
calc
= (X -
0
)/(s / n) = (15.2 - 18)/ (2/ 25 ) = -2.8/.4 = -7.00
X Reject H
0
in favor of H
A
. _______ FTR H
0
The 95% Confidence Interval is Given by: X + t
o/2
(s/n) which is
15.2 + 2.064(.4) = 15.2 + .83 or 14.37 < < 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.
Small Business





Loan Defaults
First 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 o = .10, does it appear that the software is of value?
H
0
: p > .12 H
A
: p < .12
n = 150 o = .10
(i) testing a proportion (ii) np
0
= 150(.12) = 18 and n(1-p
0
) = 132
DR: Reject H
0

in favor of H
A
iff Z
calc
< -1.282. Otherwise, FTR H
0
Z
calc
= (p - p
0
)/( p
0
(1-p
0
)/n ) = (.06 - .12)/ (.12(.88)/150 ) =
-.06/.026533 = -2.261
X Reject H
0
in favor of H
A
. _______ FTR H
0
The 95% Confidence Interval is Given by: p + Z
o/2
( p(1-p)/ n ) which is
.06 + 1.645( .06(.94)/150 ) = .06 + 1.645(.0194) or .06 + .032 or
.028 < p < .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%.
^
^
^ ^
Small Business
Loan Default Rate
_
2
-test & C.I. for o
H
0
: o = < > o
0
vs. H
A
: o == > < o
0

n = _______ o = _______
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 H
A
) Reject H
0
in favor of H
A
if _
2
calc
< _
2
small,o/2
or if _
2
calc
>
_
2
large,o/2
. Otherwise, FTR H
0
.
DR: (> in H
A
) Reject H
0
in favor of H
A
iff _
2
calc
> _
2
large,o
Otherwise, FTR H
0
.
DR: (< in H
A
) Reject H
0
in favor of H
A
iff _
2
calc
< _
2
small,o
Otherwise, FTR H
0
.
_
2
Test & C.I. (continued)
_
2
calc
= (n-1)s
2
/(o
2
0
)
_____ Reject H
0
in Favor of H
A
. _______ FTR H
0
.

The Confidence Intervals for o
2
and o are Given by:
(n-1)s
2
/_
2
large,o/2
< o
2
< (n-1)s
2
/_
2
small,o/2

and
(n-1)s
2
/_
2
large,o/2
< o < (n-1)s
2
/_
2
small,o/2


Interpretation
Fast 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 o = .05
level of significance. Assume that the time factor is approximately
normally distributed.
FFF Example
H
0
: o = < > o
0
vs. H
A
:o = > < o
0
where

o
0
= 2.3
n = 25 o = .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: (< in H
A
) Reject H
0
in favor of H
A
iff _
2
calc
< _
2
small,o
= 13.8484.
Otherwise, FTR H
0
.
_
2
calc
= (n-1)s
2
/o
2
0
= (24)( 1.8
2
)/ (2.3
2
) = 77.76/5.29 = 14.70
Reject H
0
in favor of H
A
. X FTR H
0
.
77.76/39.3641 < o
2
< 77.76/12.4011 or 1.975 < o
2
< 6.27 so that
1.405 days < o < 2.50 days
Evidence is inconclusive. Work should continue on this.
Two Sample Tests
and
Confidence Intervals
H
0
:
1

2
=
d

H
A
:
1

2
= < >
d


n
1
= _____ n
2
= _____ = 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 n
1
+n
2
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.
Tests and Intervals for Two Means
C.I. for
1

2


X
1
X
2
Z
X
1
-X
2


or

X
1
X
2
tS
X
1
-X
2
Decisions Same as any other Z or T test.

Implications Context Specific
(a) Z = [(X
1
X
2
)
d
]

(1/n
1
+ 1/n
2
)

Z = [(X
1
X
2
)
d
]

(
2
1
/n
1
+
2
2
/n
2
)

(b) t = [(X
1
X
2
)
d
] (assume equal variances)

S
p
(1/n
1
+ 1/n
2
) where df = n
1
+n
2
2
and S
p
2
= (n
1
-1)S
1
2
+ (n
2
-1)S
2
2

(c ) t = [(X
1
X
2
)
d
] (do not assume equal variances)

(S
1
2
/n
1
+ S
2
2
/n
2
) where df = [(s
1
2
/n
1
) + (s
2
2
/n
2
)]
2


(s
1
2
/n
1
)
2
+ (s
2
2
/n
2
)
2

n
1
1 n
2
1

Equality of Variances: The F-Test

H
0
: o
1
= o
2
vs. H
A
: o
1
= < > o
2


n
1
= _____ n
2
= _____ o = _____

Test of equality of variances F-test

___ > in H
A
: reject H
0
in favor of H
A
iff F
calc
> F
o,big
. Otherwise, FTR H
0
.

___ < in H
A
: reject H
0
in favor of H
A
iff F
calc
< F
o,small
. Otherwise, FTR H
0
.

___ = in H
A
: reject H
0
in favor of H
A
iff F
calc
< F
o/2,small
or if F
calc
> F
o/2,big
.
Otherwise, FTR H
0
.
F
calc
= S
1
2
/S
2
2

Make a decision.

F
calc
/ F
n
1
-1,n
2
-1,o/2 large
o
1
2
/o
2
2
F
calc
/F
n
1
-1,n
2
-1,o/2 small

C.I. for
1
/
2
is obtained by taking square
roots of the endpoints of the above C.I. for

1
2
/
2
2


Conclusions / Implications Context Specific.

Tests & Intervals for Two Proportions
H
0
: p
1
p
2
= p
d

H
A
: p
1
p
2
= < > p
d


n
1
= _____ n
2
= _____ = 0

Comparison of Proportions from Two Processes
n
1
p
1
, n
2
p
2
, n
1
(1-p
1
) and n
2
(1-p
2
) all 5
Z-test

Critical Values and Decision Rules are the same
as for
any Z-test.
Z = [(p
1
p
2
)] IF p
d
= 0

p(1-p)(1/n
1
+ 1/n
2
) where p = (X
1
+X
2
)/(n
1
+ n
2
)


^ ^
Z = [(p
1
p
2
) p
d
] IF p
d
= 0

^ ^ ^ ^
(p
1
(1--p
1
)/n
1
+ p
2
(1-p
2
)/n
2


^ ^ ^ ^ ^ ^
C.I. for p
1
-p
2
is (p
1
p
2
) Z
o/2
(p
1
(1--p
1
)/n
1
+ p
2
(1-p
2
)/n
2


^
^
HYPOTHESIS TESTING &
DEPARTMENT OF STATISTICS
DR. RICK EDGEMAN, PROFESSOR & CHAIR SIX SIGMA BLACK BELT
REDGEMAN@UIDAHO.EDU OFFICE: +1-208-885-4410
CONFIDENCE INTERVALS
of

Vous aimerez peut-être aussi