You are on page 1of 16

Hypothesis Testing

1 Introduction
Very often we are called upon to make decision about the population where there are only
two actions, say 0
H
and a
H
. The problem is to construct a decision rule on the basis of
the sample observations to reject 0
H
or not. For example, questions arise in practical
fields like
1. oes the super market in urban area have more variety of product than rural
!roceries"
#. oes a certain brand of medicine reduce a certain disease"
$. o people favor a certain political party"
%. &s there any relationship between the promotion activity of a product and its sale"
'nswers of these questions are in the form of Yes and No and construct our actions
0
H
and a
H
.
To answer the questions, one needs some evidence on the basis of which one can make a
comment. These evidences are obtained by collectin! a sample data and the decision
re!ardin! the re(ection )or not re(ection* of an action could be based on these evidences.
' hypothesis may be defined simply as a statement about one or more populations.
Statistical hypotheses are hypotheses that are stated in such a way that they may be
evaluated by appropriate statistical techniques.
2 Types Of Statistical Hypotheses
There are two statistical hypotheses involved in hypotheses testin!+ the null hypothesis
and the alternative hypothesis.
The null hypothesis is the hypothesis to be tested. &t is desi!nated by the symbol 0
H
.
The null hypothesis is sometimes referred to as a hypothesis of no difference, since it is a
1
statement of a!reement with )or no difference from* conditions presumed to be true in the
population of interest. &n !eneral, the null hypothesis is set up for the express purpose of
bein! discredited. ,onsequently, the complement of the conclusion that the researcher is
seekin! to reach becomes the statement of the null hypothesis. The alternative
hypothesis is a statement of what we will believe is true if our sample data cause us to
re(ect the null hypothesis. The alternative hypothesis is desi!nated by the symbol
1
H .
&n the testin! process, the null hypothesis either is rejected or is not rejected. &f the null
hypothesis is not rejected, we will say that the data on which the test is based do not
provide sufficient evidence to make the statement of the alternative hypothesis. &f the
testin! procedure leads to rejection, we will say that the data at hand are not compatible
with the null hypothesis, but are supportive of some other hypothesis.
Example
-uppose that we want to answer the question+ ,an you conclude that a certain population
mean is not .0" The null hypothesis is
.0 +
0
= H
and the alternative hypothesis is
.0 +
a
H
Example
-uppose we want to show that the students in one school have a different avera!e &./.
than those of another. Then we mi!ht formulate the null hypothesis that there is no
difference, namely,
# 0
+ = H
The alternative hypothesis is #
+
a
H
.
Example
-uppose we want to show that there is a different variability in the quality of one product
than there is in the quality of another. Then we mi!ht formulate the null hypothesis as
# 1 0
+ = H
and the alternative hypothesis
# 1
+
a
H
.
3 Types of Errors in Hypothesis tests
#
The decision to accept or re(ect the null hypothesis is made on the basis of observed
sample may not always be true in respect of the population. There could be two types of
errors in a hypothesis testin! procedure. They are named as Type & and Type && error. The
four possible situations that arise in any test procedure are !iven in table 1..1+
ecision
made
0
H
is
True False
o not re(ect 0
H ,orrect
decision
Type && error
0e(ect
0
H Type & error ,orrect
decision
Table 15.1 Four possible situations in test procedure
Type I error
The error of re(ectin!
0
H
when it is true is called Type & error. The probability of
committin! Type & error is denoted by

, i.e.

=
1r 2re(ectin! null hypothesis 0
H
when it is true3.
Type II error
The error of not re(ectin! null hypothesis 0
H
when it is false is called Type && error. The
probability of committin! Type && error is denoted by

.

=
1r 2not re(ectin! null hypothesis 0
H
when it is false3.
'nd, 14
1r =
2re(ectin! null hypothesis 0
H
when it is false3 is called the power
of the test.
Distribution of test statistic and rejection region
Test Statistic: ' test statistic is some statistic that may be computed from the data
of the sample. The test statistic serves as a decision maker, since the decision to
re(ect or not to re(ect the null hypothesis depends on the ma!nitude of the test
statistic.
The value of the test statistic is calculated under the null hypothesis )
0
H
* usin! the
sample information, and if the calculated value of the test statistic is an unlikely value of
the distribution of the test statistic, we can say that there is not much evidence in support
of the 0
H
. The ran!e of the pre4assi!ned values of the test statistic for which the 0
H
would be re(ected is known as the rejection region or critical region. The distributions of
the known test statistics described in sections $.1$.# and $.1$.% are meanin!fully utili5ed
in makin! a decision rule for test of hypothesis.
$
T!o"tailed and one"tailed Tests
.1 Two-tailed test
' two4tailed test of a hypothesis will re(ect 0
H
if the sample statistic is si!nificantly
hi!her or lower than the hypothesi5ed population parameter. Thus, in a two4tailed test,
there are two re(ection re!ions. This is illustrated in the followin! fi!ure 1..1+
#ig 15.1: 0e(ection re!ion for a two tailed test
' two4tailed test is appropriate when 0
H
is 0
=
and a
H
is 0

.
Example
' manufacturer of li!ht bulbs wants to produce bulbs with a mean life of
1000
0
= =
hours. &f the lifetime is shorter, he will loss customers to his competition. &f the lifetime is
lon!er, he will have a very hi!h production cost because the filaments will be excessively
thick. &n order to see if his production process is workin! properly, he takes a sample of
the output to test the hypothesis
1000 +
0
= H
. -ince he does not want to deviate
si!nificantly from 1000 hours in either direction, the appropriate alternative hypothesis is
1000 +
a
H
, and he uses a two4ailed test.
.2 Left-Tailed Test
' test for which the re(ection re!ion is usually at the left tail or lower tail of the
distribution is called left-tailed or lower tailed test.
%
Example
' wholesaler buys li!ht bulbs in lar!e lots from a manufacturer and does not want to
accept a lot of bulbs unless their mean life is at least 1000 hours. 's each shipment
arrives, the wholesaler tests a sample to decide whether it should accept the shipment.
The company will re(ect the shipment only if it feels that the mean life is below 1000
hours. &f it feels that the bulbs are better than expected )with a mean life above 1000
hours*, it certainly will not re(ect the shipment, because the lon!er life comes at no extra
cost. &t re(ects 60 only if the mean life of the sampled bulbs is si!nificantly below 1000
hours. -o the wholesaler7s hypotheses are
1000 +
0
= H
hours and
1000 + <
a
H
hours.
This situation is illustrated in the followin! fi!ure1..#+
#igure15.2: 0e(ection re!ion for a left tailed test
.3 ight-Tailed Test
' test for which the re(ection re!ion is at the ri!ht tail or upper tail of the distribution is
called right-tailed test or upper tailed test. 'n upper4tailed test is used when the
hypotheses are 0 0
+ = H
and 0
+ >
a
H
.
Example
' sales mana!er has asked his salesperson to observe a limit on travelin! expenses. The
mana!er hopes to keep expenses to an avera!e of 8100 per salesperson per day. 9ne
month after the limit was imposed, a sample of submitted daily expenses is taken to see if
the limit is bein! observed. The null hypothesis is
100 +
0
= H
, but the mana!er is
.
concerned only with hi!h expenses. Thus the appropriate alternative hypothesis is
100 + >
a
H
, and an upper tailed test is used.

#igure15.3: 0e(ection re!ion for a ri!ht tailed test
5 $ecision %ule
The probabilistic decision rule for the test of hypothesis are made mainly usin! two
approaches, one based on a pre4assi!ned probability of mar!in of error and the other on
calculated probability of error correspondin! to the sample statistic. ' third option of
makin! a decision by observin! the confidence interval can also sometimes adopted.
5.1 Significance Level
The decision as to whether the null hypothesis is re(ected or not re(ected or in other words
the demarcation of the re(ection re!ion is made on the basis of a pre4assi!ned probability
of re(ectin! a true null hypothesis. This value desi!nated by

is known as the
si!nificance level. ' level of si!nificance

is the probability of re(ectin! a true null


hypothesis.
-ince to re(ect a true null hypothesis would constitute an error, it seems only reasonable
that we should make the probability of re(ectin! a true null hypothesis small, and in fact,
that is what is done. :e select a small value of

in order to make the probability of


re(ectin! a true null hypothesis small. The most frequently encountered values of

are
0.01, 0.0. and 0.10.
5.2 !robability value "or
p
-value#
;
The smallest si!nificance level at which the null hypothesis can be re(ected is called the
probability value$ or p-value$ or significance value, of the test. &f
p
4value is 0.0;%, then
we can infer that the null hypothesis can be re(ected at all levels of si!nificance hi!her
than ;.%<. Thus the decision rule is made.
The decision as to whether the null hypothesis can be re(ected or not re(ected is made
from a comparison of the level of si!nificance and p4value. :e can state the followin!
decision rules+
0e(ect 0
H
if
value 4 p >
= p4value
'ccept 0
H
if
value 4 p <
.
For a sample value 0
Z
of a
* 1 , 0 ) > N Z
,
[ ]
0
Z Z P value p =
for ri!ht tailed test,
[ ]
0
Z Z P value p =
for left tailed test
[ ] [ ]
0 0
Z Z P Z Z P value p + =
for two tailed test.
5.3 Testing 0
H
%y &eans Of a 'onfidence (nterval
:hen testin! a null hypothesis by means of a confidence interval, we re(ect 0
H
at the

level of si!nificance if the hypothesi5ed parameter is not contained within the


*< 1 ) 100
confidence interval. &f the hypothesi5ed parameter is contained within the
interval, 60 cannot be re(ected at the level of si!nificance.
& The steps in'ol'ed in a test procedures
?ow since we have set4up all the required definitions for a complete test of hypothesis
procedure, we would present the step by step description of a complete test of hypothesis
procedure) The steps are as follows+
Step* +ssumptions,situation
-ince the samplin! distribution of the test statistics depend on the different situations of
the normal population and also on the sample si5e, the first step of a test of hypothesis
procedure is to identify the situation under which the test is to be performed.
Step - Setting up the hypotheses
@
The next step of the test procedure is to decide on the null and alternative hypotheses.
The appropriate choice of the hypotheses )whether one or two tailed* is important
because the decision made by the test will be dependent on this.
Step . The significance level
ecide on the si!nificance level,

, which will help determinin! the critical re!ion.


Step / The test statistic
Asin! samplin! distribution of test statistic from -ection $.1%, decide on the test
statistic to be used dependin! on the step 1 and then compute the value of the chosen
test statistic. Bet the calculated value be denoted by
cal
T
.
Step 0 The Decision ma1ing
The decision makin! step can be addressed in either of two approaches+
+pproach * The critical region approach2
Asin! the distribution of the test statistic chosen in step % and the si!nificance level
chosen in step $, the ran!e)s* of values of the test statistic for which
0
H
is to be
re(ected is found )i.e. the re(ection re!ion is to be identified*
&f cal
T
falls within the ran!e, 0
H
C otherwise do not re(ect 0
H
.
+pproach - The
p
-value approach2
Asin! the distribution of the test statistic chosen in step % the
p
4value is obtained.
The computer soft4wares usually provide the
p
4value for each of the test procedures
performed. ?oe the decision rule stands as
&f
p
, 0
H
is re(ectedC otherwise 0
H
is not re(ected.
Step 3 (nterpretation
&n this step we interpret the results of the hypothesis test in the lan!ua!e of the
research ob(ectives.
( Some commonly used Test procedures:
&n the followin! sections some commonly known test of hypothesis procedure are
discussed+
(.1 The one-sample 4-test for a population mean
D
Step * +ssumptions
1. ?ormal population )any sample si5e* or lar!e sample )any distribution*
#. 1opulation standard deviation

is known.
Step - The null hypothesis is 0 0
+ = H
and the alternative hypothesis is
* )
+
0
tailed Two
H
a


or
* )
+
0
tailed Left
H
a

<
or
* )
+
0
tailed Right
H
a

>
Step . ecide on the si!nificance level,

Step / ,ompute the value of the test statistic


n
x

=
and denote the calculated value by 0

.
Step 0 The Decision ma1ing
+pproach * The critical region approach2
&dentify the re(ection re!ion usin! standard normal table as+
0e(ect
0
H
if
)Two4tailed* )Beft4tailed* )0i!ht4tailed*
#
0
#
0
o!


0


0
9therwise 0
H
is not re(ected.
+pproach - The
p
-value approach2
From standard normal Table, the
p
4value is obtained. ?ow the decision rule stands
as
&f
p
,
0
H
is re(ectedC otherwise
0
H
is not re(ected.
E
Step 3 &nterpret the results of the hypothesis test.
The hypothesis test is exact for normal populations and is approximately correct for lar!e
samples from non4normal populations.
Example
The 0.0. Fowker ,ompany of ?ew Gork collects information on the retail prices of
books and publishes its findin!s in 1ublishers :eekly. &n 1EE@, the mean retail price of
all history books was 8%$..0. This year the mean retail price for %0 randomly selected
history books is found as 8%;.E$. 'ssume that the standard deviation of prices for this
year7s history books is 8@.;1.
a* 't the 1< si!nificance level, do the data provide sufficient evidence to conclude
that this year7s mean retail price of all history books has increased from the 1EE@
mean of 8%$..0"
Solution )a*
Bet

and

denote this year7s mean retail price and standard deviation of prices
respectively of all history books. The null and alternative hypothesis for the problem is
.0 . %$ 8 +
.0 . %$ 8 +
1
0
>
=

H
H
The significance level is 1< i.e.
01 . 0 =
-ince the population variance is known and a lar!e sample is considered, we can use the
-statistic as an appropriate test statistic. The 4statistic is !iven by
n
x

=
6ere,
%0 ;1 . @ , .0 . %$ , E$ . %;
0
= = = = n and x
. Thus the sample value of the
test statistic can be calculated as
D. . #
%0
;1 . @
.0 . %$ E$ . %;
0
=

=
's the hypothesis test is ri!ht4tailed and
01 . 0 =
, the critical value is
$$ . #
01 . 0
=

and the critical region is
>
#.$$. The followin! Fi!ure 1..% shows thee critical re!ion+
10

#igure15.: ,ritical value
$$ . #
01 . 0
=
9n the basis of the above calculation the conclusion can be made as follows+
The critical region approach2
-ince the computed value exceeds the critical value )#.$$*, we re(ect the null
hypothesis.
The
p
-value approach2
Fecause the hypothesis test is a ri!ht tailed 4 test, the
p
value is the probability of
observin! a value of of #.D. or !reater if the null hypothesis is true. That probability
equals the area under the standard normal curve to the ri!ht of #.D. and the area is
00## . 0 %E@D . 0 . . 0 * D. . # ) = = > P

#igure:
p
4 value for
D. . #
0
=
-ince the
p
value is less than
01 . 0 =
, the calculated is si!nificant )
01 . 0 < p
*
and the null hypothesis is re(ected at 1< si!nificance level.
Finally, interpretin! the re(ection of the null hypothesis, we can conclude that at the 1<
si!nificance level, this year7s mean retail price of all history books has increased from the
1EE@ mean of 8%$..0.
Example
11
The wei!hts of a sample of %0 capsules are to be used to examine whether there is
sufficient empirical evidence that the capsules of this type have a mean wei!ht less then
10 !. The sample !ave a mean wei!ht of E.@@ ! with a standard deviation 0..0 !.
a* 1erform an appropriate statistical test to provide evidence in support of the claim
at 1 percent level of si!nificance.
Solution
Bet

denote the mean wei!ht of the capsules produced. The null and alternative
hypothesis for the problem is
g H
g H
10 +
10 +
1
0
<
=

The significance level is 1< i.e.


01 . 0 =
-ince the population variance is unknown but a lar!e sample is considered, we can use
the -statistic as an appropriate test statistic. The 4statistic is !iven by
n
s
x

0

=
6ere,
%0 and .0 . 0 , 10 , @@ . E
0
= = = = n s x
.
Thus the sample value of the test statistic can be calculated as
E1 . #
%0
.0 . 0
10 @@ . E
0
=

=
's the hypothesis test is left4tailed and
01 . 0 =
, the critical value is
$$ . #
01 . 0
=

and the critical region is
>
4#.$$. The followin! Fi!ure 1..; shows the critical re!ion+
#igure: ,ritical value
$$ . #
01 . 0
=
1#
9n the basis of the above calculation the conclusion can be made as follows+
The critical region approach2
The observed value of the test statistic is less than the critical value. The data
therefore provide evidence to re(ect the null hypothesis in support of the alternative.
The
p
-value approach2
Fecause the hypothesis test is a left4tailed 4 test, the
p
value is the probability of
observin! a value of of 4#.E1 or less if the null hypothesis is true. That probability
equals the area under the standard normal curve to the left of 4#.$$ and the area is
001E . 0 %ED1 . 0 . . 0 * E1 . # ) = = < P

#igure15.(:
p
4 value for
E1 . #
0
=
-ince the
p
value is less than
01 . 0 =
, the calculated is si!nificant )
01 . 0 < p
*
and the null hypothesis is re(ected at 1< si!nificance level.
The one-sample t-test for a population mean
Step* +ssumptions
1. ?ormal population
#. 1opulation standard deviation

is unknown
Step - The null hypothesis is
+
0
H

H
,
0

and the alternative hypothesis is


6a+

I 0

or
+
a
H

J 0

or
+
a
H

= 0

)Two4tailed* )Beft4tailed* )0i!ht4tailed*


Step . ecide on the si!nificance level,

.
Step / ,ompute the value of the test statistic
n s
x
t
K
0

=
.
and denote the value by 0
t
.
1$
Step 0 The Decision ma1ing
+pproach * The critical region approach2
6ere de!rees of freedom for the
t
4distribution is
1 n
. &dentify the re(ection re!ion
usin! t 4Table as
0e(ect 0
H
if
)Two4tailed* )Beft4tailed* )0i!ht4tailed*
#
0
#
0
t t o! t t

t t
0

t t
0
9therwise 0
H
is not re(ected.
+pproach - The
p
-value approach2
From t 4Table, the
p
4value is obtained. ?ow the decision rule stands as
&f
p
, 0
H
is re(ectedC otherwise 0
H
is not re(ected.
Step 3 &nterpret the results of the hypothesis test.
?ote+ ?ote that for lar!e sample the t 4 distribution approaches to normal distribution
and the critical value for the t 4statistic used in this test is approximated by normal
distribution. &n that way, usin! t 4test for lar!e sample is the same as usin! 4 test.
Example
The avera!e waitin! time in a bank counter to cash a cheque for all customers has been
.0 minutes. ' new service4providin! procedure usin! modern computer facilities is bein!
tried. &f a random sample of 1# customers had an avera!e waitin! time for services is %#
minutes with a standard deviation of 11.E minutes under the new system, test the
hypothesis that the population mean is now less than .0, usin! a si!nificance level of 1<
assumin! the waitin! time to be normally distributed. 'lso construct a E. percent
confidence interval for the mean waitin! time.
Solution
1%
Bet

denote the avera!e waitin! time for all the customers. The null and alternative
hypothesis for the problem is
utes H
utes H
min .0 +
min .0 +
1
0
<
=

The significance level is 1< i.e.


01 . 0 =
-ince the population variance is unknown and a small sample is considered, and also the
population is assumed to be normal, we can use the t -statistic as an appropriate test
statistic. The t 4statistic is !iven by
n
s
x
t
0

=
6ere,
1# E . 11 , .0 , %#
0
= = = = n and s x
. Thus the sample value of the test
statistic can be calculated as
$$ . #
1#
E . 11
.0 %#
0
=

= t
with )n41* H 11 df.
's the hypothesis test is left4tailed and
01 . 0 =
, the critical value is
@1D . #
01 . 0 , 11
= t
and the critical region is
@1D . # < t
. The followin! Fi!ure 1..D
shows the critical re!ion+
#igure15.,: ,ritical value
@1D . #
01 . 0 , 11
= t
9n the basis of the above calculation the conclusion can be made as follows+
The critical region approach2
1.
-ince the computed t value is less than the critical value i.e.4#.$$J4#.@1D, we accept the
null hypothesis and conclude that at the 1< si!nificance level, the true mean is not likely
to be less than .0 minutes.
The
p
-value approach2
Fecause the hypothesis test is a left4tailed t 4 test, the
p
value is the area under the t
curve with df. H11 that lies to the left of 4#.@1D, we have
0.01EE value = p
.
-ince the
p
value is !reater than
01 . 0 =
, the calculated t is not si!nificant )
01 . 0 > p
* and the null hypothesis can not be re(ected at 1< si!nificance level.
#igure:
p
4 value for
$$ . #
0
= t
, Summary
For one sample studies, the different test statistics applicable for different hypotheses
under different assumptionsKsituations can be summari5ed in Table as a !uideline for
choice of appropriate test procedure.
Table ifferent one sample situations and appropriate test statistic
?ull 6ypothesis 'ssumptions Test statistic
0
+
0
= H 1opulation variance known
?ormal population or lar!e sample
n
x

=
0
+
0
= H 1opulation variance unknown
Bar!e sample
n
s
x

0

=
0
+
0
= H 1opulation variance unknown
-mall sample
?ormal population
n
s
x
t
0

=
1;

You might also like