You are on page 1of 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
tentative assumption about a population
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
Q Q Q Q
Q Q Q Q
Z Z i e ect Z Z i e ect
ule e ection
) ( .
E(t) - t
Z tatistic Test
: :
: : ypotheses
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
) ( .
(t) - t
Z Statistic Test
) or ( : H
: H Hypotheses
2 / 0
0 0 0 1
0 0
E
µ µ µ µ µ µ
µ µ
>
=
> · =
=
t 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ª
Tests about a Population Mean:
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
n

o
0
/
t
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
Q
/
x
z
Q
!
/
x
z
n
Q
W

!
/
x
t
s n
Q
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 t o o e i erennc
means t o o e i erennc
roportion ample
n
ean ample
) (statistic .E tatistic
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. (
) x ( - 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
µ
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: Maxwell¶s 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. Maxwell¶s has randomly selected 34
weeks from past year and found average sales
of 912.1 pounds.
a) State appropriate hypothesis for testing
whether hoe 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. (p)
(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 company¶s 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 employee¶s. 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):
. re ect e other ise . re ect not do e
then t i.e t o value ) (tabulated critical the
than less is t i.e t o value calculated the i
variance population o estimator unbiased an is
1
) x - (X
here
) x .E(
) x E( - x
t
by given is statistic test the under
tailed) - t o ( i.e mean sample the and
mean population bet een di erence t signi ican is There :
i.e mean sample the and
mean population bet een di erence t signi ican no is There :
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
Q
Q Q
Q Q
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)

‡ The equality part of the hypotheses always appears in the null hypothesis. ‡ In general, a hypothesis test about the value of a population mean Q must take one of the following three forms (where Q0 is the hypothesized value of the population mean). H0 : Q > Q0 Ha : Q < Q0 H0 : Q < Q0 Ha : Q > Q0 H0 : Q = Q0 Ha : Q { Q0

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. Operating in a multiple hospital system with approximately 20 mobile medical units. .‡ Null and Alternative Hypotheses A major west coast city provides one of the most comprehensive emergency medical services in the world.

‡ Null and Alternative Hypotheses Hypotheses Conclusion and Action H0: Q  The emergency service is meeting the response goal. The emergency service is not Ha:Q" meeting the response goal. Where: Q = mean response time for the population of medical emergency requests. no follow-up action is necessary. appropriate follow-up action is necessary. .

denoted by F.‡ Since hypothesis tests are based on sample data. ‡ Generally. denoted by E and called the level of significance. ‡ A Type I error is rejecting H0 when it is true. ‡ Statistician avoids the risk of making a Type II error by using ³do not reject H0´ and not ³accept H0´. ‡ A Type II error is accepting H0 when it is false. we cannot control for the probability of making a Type II error. we must allow for the possibility of errors. ‡ The person conducting the hypothesis test specifies the maximum allowable probability of making a Type I error. .

‡ Type I and Type II Errors Population Condition H0 True Ha True (Q  ) (Q" ) Correct Conclusion Type II Error Correct Conclusion Conclusion Accept H0 (Conclude Q  Reject H0 Type I (Conclude Q" error .

. ‡ The p-value can be used to make the decision in a hypothesis test by noting that: ± if the p-value is less than the level of significance . the value of the test statistic is in the rejection region. ‡ Reject H0 if the p-value < .‡ The p-value is the probability of obtaining a sample result that is at least as unlikely as what is observed. the value of the test statistic is not in the rejection region. ± if the p-value is greater than or equal to .

Specify the level of significance for the test. . Collect the sample data and compute the value of the test statistic.‡ ‡ ‡ ‡ ‡ ‡ ‡ The Steps of Hypothesis Testing Determine the appropriate hypotheses. Select the test statistic for deciding whether or not to reject the null hypothesis. or b) Compute the p-value based on the test statistic and compare it to determine whether or not to reject H0. a) Compare the test statistic to the critical value (s) in the rejection rule. Use to develop the rule for rejecting H0.

OneOne-Tailed Tests about a Population Mean: LargeLargeSample Case (n > 30) (n ypotheses 0 1 : Q ! Q0 : Q " Q0 t .E (t ) 0 1 : Q ! Q0 Q0 :Q Test tatistic e ection ule e ect 0 i Z " ZE e ect 0 i Z  ZE .E(t) Z! S .

05 Sampling distribution of mean (assuming H0 is true and Q = 12) Do Not Reject H0 Reject H0 E! x 12 (Critical value) .‡ One-Tailed Test about a Population Mean: Large n Let E = P (Type I Error) = .

Two -Tailed Tests about a Population Mean: LargeLargeSample Case (n > 30) (n Hypotheses H 0 : Q ! Q0 H1 : Q { Q 0 ( Q Q 0 or Q " Q 0 ) Test Statistic Rejection Rule t . (t ) Reject H 0 if Z " ZE / 2 .(t) Z! S .

Sampling distribution of (assuming H0 is true and Q = 100) Reject H0 E! Do Not Reject H0 Reject H0 E! z -1.96 .96 0 1.

‡ Rejection Rule Two-Tailed One-Tailed H0: Q Q H0: Q"Q H0: Q!Q Reject H0 if t > tE Reject H0 if t < -tE Reject H0 if |t| > tE .1 degrees of freedom.Tests about a Population Mean: Small-Sample Case (n < 30) W Unknown ‡ Test Statistic W Known t  0 W/ n t!  0 s/ n This test statistic has a t distribution with n .

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

E (statistic) W n pq n Wx Wy  n1 n2 2 2 ample roportion i erennce o t o means i erennce o t o proportion p1q1 p2 q2  n1 n2 .Standard error of sampling distribution of statistic: tatistic ample ean .

One Sample tests .

1)Z. . other wise we reject H 0 .Q0 ! .test for single mean: H 0 : There is no significant difference between population mean and the sample mean i. (x) n x .(x) x Q 0 Z! ! W S.e Q ! Q0 H a : There is significant difference between population mean and the sample mean i.e Q { Q 0 ( two .tailed) under H 0 the test statistic is given by x . W is unknown S n if the calculated value of Z is less than the critical (tabulated) value of Z the we do not reject H 0 .

Critical values of Z Critical values Level of Significance ( ) 1% Two-tailed test Right-tailed test Left-tailed test 2.28 .645 1.58 2.96 1.33 5% 1.33 -2.645 -1.28 -1.646 10% 1.

Joel Freelander has taken a random sample of 121 trades by his clients and determined that paid an average commission of $151. and the standard deviation is $52.At 0.Ex: The average commission charged by full-service brokerage firms on a sale of common stock is $144. can Joel conclude that his clients are higher than the industry average? .10 significance level.

7 pounds and the standard deviation was 72. . Maxwell¶s has randomly selected 34 weeks from past year and found average sales of 912.1 pounds. a) State appropriate hypothesis for testing whether hoe chocolate sales have decreased. test these hypothesis.Ex: Maxwell¶s Hot Chocolate is concerned about the effect of the recent year coffee advertising campaign on hot chocolate sales. b) At the 1%. The average weekly hot sales two years ago was 984. 2% significance.6 pounds.

2) Z.(p) ! S. Other wise we reject H 0 .of successes H 0 : There is no significant difference between sample proportion and population proportion i.of successes p: Sample proportion no. (p) p . .e P { P0 under H 0 the test statistic is given by Z! p .test for single proportion: X : No.e P ! P0 H a : There is no significant difference between sample proportion and population proportion i.P0 P0Q 0 n if the calculated of Z is less than the critical value of Z then we do not reject H 0 .

Ex: A ketchup manufacturer is in the process of deciding whether to produce a new extra-spicy brand. At a 1% significance level. A much more extensive study made 2 years ago showed that 5% of the households would purchase the brand then. should the company conclude that there is an increased interest in the extra-spicy flavor? . The company¶s 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.

At a significance level of 0. A complete census of loans 5 years ago showed that 41% of the borrowers that the proportion of loans made to women. 350 were sampled to determine what proportion was made to women.Ex: From a total of 10. can you conclude that the proportion of loans made to women has changed significantly in the past 5 years? . This sample showed that 39% of the loans were made to women employee¶s.02.200 loans made by a state employee's credit union in the most recent 5-year period.

other ise e re ect here 2 § (X . 0 is unknown): : There is no signi icant di erence bet een population mean and the sample mean i. . f then 0 0 .e Q ! Q 0 : There is signi icant di erence bet een population mean and the sample mean i.3) t-test for single mean (n<30.E % l .e t tab.( n 1) d .E(x) x  Q 0 ! t! S .e Q { Q 0 ( t o .o.e t cal is less than e do not re ect .tailed) the test statistic is given by x . s .x) ! 2 is an unbiased estimator o population variance W 2 the critical (tabulated) value o t i.E(x) n a under 0 n 1 i the calculated value o t i.

Ex: From 1980 until 1985. In a sample of 30 randomly chosen NYSE stocks.77. the mean P/E ratio in 1986 was 11.35 and the standard deviation was 9. 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? .73. the mean price/earnings (P/E) ratio of the approximately 1800 stocks listed on the New York Stock Exchange was 14.

is there any reason to doubt the validity of the claimed 10-pounds value? (t cal.4 pounds. At a 1% level.1% = 2.Ex: A television documentary on overeating claimed that Americans are about 10 pounds overweight on average. To test this claim. and the sample standard deviation was 2.898) .7 pounds. 18 randomly selected individuals were examined. their average excess weight was found to be 12.