Anda di halaman 1dari 26

# Testing of Hypothesis

## Hypothesis testing can be used to determine

whether a statement about the value of a
population parameter should or should not be
rejected.
The null hypothesis, denoted by H
0
, is a
parameter.
The alternative hypothesis, denoted by H
a
, is the
opposite of what is stated in the null hypothesis.
Hypothesis testing is similar to a criminal trial.
The hypotheses are:
H
0
: The defendant is innocent
H
a
: The defendant is guilty
The equality part of the hypotheses always
appears in the null hypothesis.
In general, a hypothesis test about the value of a
population mean must take one of the
following three forms (where
0
is the
hypothesized value of the population mean).
H
0
: >
0
H
0
: <
0
H
0
: =
0
H
a
: <
0
H
a
: >
0
H
a
:
0
=
Null and Alternative Hypotheses
A major west coast city provides one of the
most comprehensive emergency medical
services in the world. Operating in a multiple
hospital system with approximately 20 mobile
medical units, the service goal is to respond to
medical emergencies with a mean time of 12
minutes or less.
The director of medical services wants to
formulate a hypothesis test that could use a
sample of emergency response times to
determine whether or not the service goal of 12
minutes or less is being achieved.
Null and Alternative Hypotheses
Hypotheses Conclusion and Action
H
0
: l2 The emergency service is meeting
the response goal; no follow-up
action is necessary.
H
a
: > l2 The emergency service is not
meeting the response goal;
appropriate follow-up action is
necessary.
Where: = mean response time for the population
of medical emergency requests.
Since hypothesis tests are based on sample
data, we must allow for the possibility of errors.
A Type I error is rejecting H
0
when it is true.
A Type II error is accepting H
0
when it is false.
The person conducting the hypothesis test
specifies the maximum allowable probability of
making a Type I error, denoted by E and called
the level of significance.
Generally, we cannot control for the probability
of making a Type II error, denoted by F.
Statistician avoids the risk of making a Type II
error by using do not reject H
0
and not accept
H
0
.
Type I and Type II Errors
Population Condition
H
0
True H
a
True
Conclusion ( l2 ) ( > l2 )
Accept H
0
Correct Type II
(Conclude l2) Conclusion Error
Reject H
0
Type I Correct
(Conclude > l2) error Conclusion
The The pp- -value value is the probability of obtaining a is the probability of obtaining a
sample result that is at least as unlikely as what sample result that is at least as unlikely as what
is observed. is observed.
The The pp- -value can be used to make the decision value can be used to make the decision
in a hypothesis test by noting that: in a hypothesis test by noting that:
if the if the pp- -value is less than the level of significance value is less than the level of significance
, the value of the test statistic is in the rejection , the value of the test statistic is in the rejection
region. region.
if the if the pp- -value is greater than or equal to value is greater than or equal to , the , the
value of the test statistic is not in the rejection value of the test statistic is not in the rejection
region. region.
Reject Reject H H0 if the 0 if the pp- -value < value < ..
The Steps of Hypothesis Testing The Steps of Hypothesis Testing
Determine the appropriate hypotheses. Determine the appropriate hypotheses.
Select the test statistic for deciding whether or not to Select the test statistic for deciding whether or not to
reject the null hypothesis. reject the null hypothesis.
Specify the level of significance Specify the level of significance for the test. for the test.
Use Use to develop the rule for rejecting to develop the rule for rejecting H H0. 0.
Collect the sample data and compute the value of the Collect the sample data and compute the value of the
test statistic. test statistic.
a) Compare the test statistic to the critical value (s) in a) Compare the test statistic to the critical value (s) in
the rejection rule, or the rejection rule, or
b) Compute the b) Compute the pp- -value based on the test statistic value based on the test statistic
and compare it and compare it to determine whether or not to reject to determine whether or not to reject
H H0. 0.
One One- -Tailed Tests about a Population Mean: Large Tailed Tests about a Population Mean: Large- -
Sample Case ( Sample Case (nn >> 30) 30)
E E

Z Z if H Reject Z Z if H Reject
Rule Rejection
) ( .
E(t) - t
Z Statistic Test
: H : H
: H : H Hypotheses
0 0
0 1 0 1
0 0 0 0
>
=
>
= =
t E S
One-Tailed Test about a Population Mean:
Large n
Let E = P (Type I Error) = .05
Sampling distribution
of mean (assuming H
0
is
true and = 12)
E = 0
12 12
Reject H
0
Do Not Reject H
0
Do Not Reject H
0
x
(Critical value)
Two Two - -Tailed Tests about a Population Mean: Large Tailed Tests about a Population Mean: Large- -
Sample Case ( Sample Case (nn >> 30) 30)
Z Z if H Reject
Rule Rejection
) ( .
E(t) - t
Z Statistic Test
) or ( : H
: H Hypotheses
2 / 0
0 0 0 1
0 0
E

>
=
> =
=
t E S
E /2= 02 E /2= 02
Sampling distribution
of (assuming H
0
is
true and = 100)
Sampling distribution
of (assuming H
0
is
true and = 100)
00 1.96 1.96
Reject H
0
Reject H
0
Do Not Reject H
0
Do Not Reject H
0
zz
Reject H
0
Reject H
0
-1.96 -1.96
E /2= 02 E /2= 02
Small-Sample Case (n < 30)
Test Statistic W Known W Unknown
This test statistic has a t distribution with n - 1 degrees of
freedom.
Rejection Rule
One-Tailed Two-Tailed
H
0
:
0
Reject H
0
if t > t
E
H
0
: >
0
Reject H
0
if t < -t
E
H
0
: =
0
Reject H
0
if |t| > t
E/2
t
x
n
=

W
0
/
t
x
s n
=

0
/
Summary of Test Statistics to be Used in a Summary of Test Statistics to be Used in a
Hypothesis Test about a Population Mean Hypothesis Test about a Population Mean
n n >> 30 ? 30 ?
known ? known ?
Popul Popul. .
approx. approx.
normal normal
??
known ? known ?
Use Use s s to to
Estimate Estimate
Use Use s s to to
estimate estimate
Increase Increase n n
to to >> 30 30
/
x
z
n

=
/
x
z
s n

=
/
x
z
n

=
/
x
t
s n

=
Yes Yes
Yes Yes
Yes Yes
Yes Yes
No No
No No
No No
No No
Standard error of sampling distribution of statistic:
2
2 2
1
1 1
2
2
1
2
p
proportion two of e Differennc
means two of e Differennc
Proportion Sample
n
Mean Sample
) (statistic S.E Statistic
n
q p
n
q
n n
n pq
y
x

W
W
W
One Sample tests
. H reject we other wise . H reject not do we the Z of value ) (tabulated critical the
than less is Z of value calculated the if
unknown is ,
n
S
- x

) x S.E(
) x E( - x
Z
by given is statistic test the H under
tailed) - two ( i.e mean sample the and
mean population between difference t significan is There : H
i.e mean sample the and
mean population between difference t significan no is There : H
0 0
0
0
0
0
a
0
0
W

= =
=
=
n
x
1)Z- test for single mean:
Critical values of Z
Critical values Level of Significance ()
1% 5% 10%
Two-tailed test 2.58 1.96 1.645
Right-tailed test 2.33 1.645 1.28
Left-tailed test -2.33 -1.646 -1.28
Ex: The average commission charged by
full-service brokerage firms on a sale of
common stock is \$144, and the standard
deviation is \$52. Joel Freelander has
taken a random sample of 121 trades by
his clients and determined that paid an
average commission of \$151.At 0.10
significance level, can Joel conclude that
his clients are higher than the industry
average?
Ex: Maxwells Hot Chocolate is concerned about
the effect of the recent year coffee advertising
campaign on hot chocolate sales. The average
weekly hot sales two years ago was 984.7
pounds and the standard deviation was 72.6
pounds. Maxwells has randomly selected 34
weeks from past year and found average sales
of 912.1 pounds.
a) State appropriate hypothesis for testing
whether hot chocolate sales have decreased.
b) At the 1%, 2% significance, test these
hypothesis.
2) Z- test for single proportion:
X : No.of successes
p: Sample proportion no.of successes
. H reject we Other wise
. H reject not do then we Z of value critical than the less is Z of calculated the if
n
Q P
P - p
S.E(p)
E(p) - p
Z
by given is statistic test the H under
P P i.e proportion population
and proportion sample between difference t significan no is There : H
P P i.e proportion population
and proportion sample between difference t significan no is There : H
0
0
0 0
0
0
0
a
0
0
= =
=
=
Ex: A ketchup manufacturer is in the process of
deciding whether to produce a new extra-spicy
brand. The companys marketing research
department used a national telephone survey of
6000 households and found that the extra-spicy
ketchup would be purchased by 355 of them. A
much more extensive study made 2 years ago
showed that 5% of the households would
purchase the brand then. At a 1% significance
level, should the company conclude that there is
an increased interest in the extra-spicy flavor?
Ex: From a total of 10,200 loans made by a
state employee's credit union in the most
recent 5-year period, 350 were sampled to
determine what proportion was made to
women. This sample showed that 39% of the
loans were made to women employees. A
complete census of loans 5 years ago
showed that 41% of the borrowers that the
proportion of loans made to women. At a
significance level of 0.02, can you conclude
that the proportion of loans made to women
has changed significantly in the past 5 years?
3) t-test for single mean (n<30, is unknown):
. H reject we other wise . H reject not do we
then t i.e t of value ) (tabulated critical the
than less is t i.e t of value calculated the if
variance population of estimator unbiased an is
1
) x - (X
S where
) x S.E(
) x E( - x
t
by given is statistic test the H under
tailed) - two ( i.e mean sample the and
mean population between difference t significan is There : H
i.e mean sample the and
mean population between difference t significan no is There : H
0 0
. ) 1 ( , . . % tab,
cal
2
2
2
0
0
0
a
0
0
f d n s o l
n
n
S
x

= =
=
=

E
W

Ex: From 1980 until 1985, the mean
price/earnings (P/E) ratio of the
approximately 1800 stocks listed on the
New York Stock Exchange was 14.35 and
the standard deviation was 9.73. In a
sample of 30 randomly chosen NYSE
stocks, the mean P/E ratio in 1986 was
11.77. Does this sample present sufficient
evidence to conclude that in 1986 the
mean P/E ratio for NYSE stocks had
changed from its earlier value at 5% level?
Ex: A television documentary on overeating
claimed that Americans are about 10
pounds overweight on average. To test
this claim, 18 randomly selected
individuals were examined; their average
excess weight was found to be 12.4
pounds, and the sample standard
deviation was 2.7 pounds. At a 1% level, is
there any reason to doubt the validity of
the claimed 10-pounds value?
(t cal,1% = 2.898)