Unit 9 Concepts of Testing of Hypothesis: Structure
Unit 9 Concepts of Testing of Hypothesis: Structure
HYPOTHESIS
Structure
9.1 Introduction
Objectives
9.2 Hypothesis
Simple and Composite Hypotheses
Null and Alternative Hypotheses
9.3 Critical Region
9.4 Type-I and Type-II Errors
9.5 Level of Significance
9.6 One-Tailed and Two-Tailed Tests
9.7 General Procedure of Testing a Hypothesis
9.8 Concept of p-Value
9.9 Relation between Confidence Interval and Testing of Hypothesis
9.10 Summary
9.11 Solutions /Answers
9.1 INTRODUCTION
In previous block of this course, we have discussed one part of statistical
inference, that is, estimation and we have learnt how we estimate the unknown
population parameter(s) by using point estimation and interval estimation. In
this block, we will focus on the second part of statistical inference which is
known as testing of hypothesis.
In our day-to-day life, we see different commercials advertisements in
television, newspapers, magazines, etc. such as
(i) The refrigerator of certain brand saves up to 20% electric bill,
(ii) The motorcycle of certain brand gives 60 km/liter mileage,
(iii) A detergent of certain brand produces the cleanest wash,
(iv) Ninety nine out of hundred dentists recommend brand A toothpaste for
their patients to save the teeth against cavity, etc.
Now, the question may arise in our mind “can such types of claims be verified
statistically?” Fortunately, in many cases the answer is “yes”.
The technique of testing such type of claims or statements or assumptions is
known as testing of hypothesis. The truth or falsity of a claim or statement is
never known unless we examine the entire population. But practically it is not
possible in mostly situations so we take a random sample from the population
under study and use the information contained in this sample to take the
decision whether a claim is true or false.
This unit is divided into 11 sections. Section 9.1 is introductory in nature. In
Section 9.2, we defined the hypothesis. The concept and role of critical region
in testing of hypothesis is described in Section 9.3. In Section 9.4, we explored
the types of errors in testing of hypothesis whereas level of significance is
explored in Section 9.5. In Section 9.6, we explored the types of tests in testing
5
Testing of Hypothesis of hypothesis. The general procedure of testing a hypothesis is discussed in
Section 9.7. In Section 9.8, the concept of p-value in decision making about the
null hypothesis is discussed whereas the relation between confidence interval
and testing of hypothesis is discussed in Section 9.9. Unit ends by providing
summary of what we have discussed in this unit in Section 9.10 and solution of
exercises in Section 9.11.
Objectives
After reading this unit, you should be able to:
define a hypothesis;
formulate the null and alternative hypotheses;
explain what we mean by type-I and type-II errors;
explore the concept of critical region and level of significance;
define one-tailed and two-tailed tests;
describe the general procedure of testing a hypothesis;
concept of p-value; and
test a hypothesis by using confidence interval.
Before coming to the procedure of testing of hypothesis, we will discuss the
basis terms used in this procedure one by one in subsequent sections.
9.2 HYPOTHESIS
As we have discussed in previous section that in our day-to-day life, we see
different commercials advertisements in television, newspapers, magazines,
etc. and if someone may be interested to test such type of claims or statement
then we come across the problem of testing of hypothesis. For example,
(i) a customer of motorcycle wants to test whether the claim of motorcycle
of certain brand gives the average mileage 60 km/liter is true or false,
(ii) the businessman of banana wants to test whether the average weight of a
banana of Kerala is more than 200 gm,
(iii) a doctor wants to test whether new medicine is really more effective for
controlling blood pressure than old medicine,
(iv) an economist wants to test whether the variability in incomes differ in
two populations,
(v) a psychologist wants to test whether the proportion of literates between
two groups of people is same, etc.
In all the cases discussed above, the decision maker is interested in making
inference about the population parameter(s). However, he/she is not interested
in estimating the value of parameter(s) but he/she is interested in testing a
claim or statement or assumption about the value of population parameter(s).
Such claim or statement is postulated in terms of hypothesis.
In statistics, a hypothesis is a statement or a claim or an assumption about the
value of a population parameter (e.g., mean, median, variance, proportion,
etc.).
Similarly, in case of two or more populations a hypothesis is comparative
statement or a claim or an assumption about the values of population
parameters. (e.g., means of two populations are equal, variance of one
population is greater than other, etc.). The plural of hypothesis is hypotheses.
6
In hypothesis testing problems first of all we should being identifying the claim Concepts of Testing of
or statement or assumption or hypothesis to be tested and write it in the words. Hypothesis
Once the claim has been identified then we write it in symbolical form if
possible. As in the above examples,
(i) Customer of motorcycle may write the claim or postulate the hypothesis
“the motorcycle of certain brand gives the average mileage 60 km/liter.”
Here, we are concerning the average mileage of the motorcycle so let µ
represents the average mileage then our hypothesis becomes µ = 60 km /
liter.
(ii) Similarly, the businessman of banana may write the statement or
postulate the hypothesis “the average weight of a banana of Kerala is
greater than 200 gm.” So our hypothesis becomes µ > 200 gm.
(iii) Doctor may write the claim or postulate the hypothesis “ the new
medicine is really more effective for controlling blood pressure than old
medicine.” Here, we are concerning the average effect of the medicines
so let µ1 and µ2 represent the average effect of new and old medicines
respectively on controlling blood pressure then our hypothesis becomes
µ1 > µ2.
(iv) Economist may write the statement or postulate the hypothesis “ the
variability in incomes differ in two populations.” Here, we are concerning
the variability in income so let 12 and 22 represent the variability in
incomes in two populations respectively then our hypothesis becomes
12 22 .
(v) Psychologist may write the statement or postulate the hypothesis “the
proportion of literates between two groups of people is same.” Here, we
are concerning the proportion of literates so let P1 and P2 represent the
proportions of literates of two groups of people respectively then our
hypothesis becomes P1 = P2 or P1 –P2 = 0.
The hypothesis is classified according to its nature and usage as we will discuss
in subsequent subsections.
9.2.1 Simple and Composite Hypotheses
In general sense, if a hypothesis specifies only one value or exact value of the
population parameter then it is known as simple hypothesis. And if a
A hypothesis which
hypothesis specifies not just one value but a range of values that the population completely specifies
parameter may assume is called a composite hypothesis. parameter(s) of a
As in the above examples, the hypothesis postulated in (i) µ = 60 km/liter is theoretical population
(probability distribution)
simple hypothesis because it gives a single value of parameter (µ = 60) is called a simple
whereas the hypothesis postulated in (ii) µ > 200 gm is composite hypothesis hypothesis otherwise
because it does not specify the exact average value of weight of a banana. It called composite
may be 260, 350, 400 gm or any other. hypothesis.
Similarly, (iii) µ1 > µ2 or µ1 −µ2 > 0 and (iv) 12 22 or 12 22 0 are not
simple hypotheses because they specify more than one value as µ1 −µ2 = 4,
µ1 −µ2 = 7, 12 22 2, 12 22 5 , etc. and (v) P1 = P2 or P1 –P2 = 0 is simple
hypothesis because it gives a single value of parameter as P1 –P2 = 0.
9.2.2 Null and Alternative Hypotheses
As we have discussed in last page that in hypothesis testing problems first of
all we identify the claim or statement to be tested and write it in symbolical
7
Testing of Hypothesis form. After that we write the complement or opposite of the claim or statement
in symbolical form. In our example of motorcycle, the claim is µ = 60 km/liter
then its complement is µ ≠ 60 km/liter. In (ii) the claim is µ > 200 gm then its
complement is µ ≤ 200 gm. If the claim is µ < 200 gm then its complement is
µ ≥ 200 gm. The claim and its complement are formed in such a way that they
cover all possibility of the value of population parameter.
Once the claim and its compliment have been established then we decide of
We state the null and these two which is the null hypothesis and which is the alternative hypothesis.
alternative The thump rule is that the statement containing equality is the null hypothesis.
hypotheses in such a
way that they cover
That is, the hypothesis which contains symbols or or is taken as null
all possibility of the hypothesis and the hypothesis which does not contain equality i.e. contains
value of population or or is taken as alternative hypothesis. The null hypothesis is denoted
parameter.
by H0 and alternative hypothesis is denoted by H1 or HA.
In our example of motorcycle, the claim is µ = 60 km/liter and its complement
is µ ≠ 60 km/liter. Since claim µ = 60 km/liter contains equality sign so we take
it as a null hypothesis and complement µ ≠ 60 km/liter as an alternative
hypothesis, that is,
H0 : µ = 60 km/liter and H1: µ ≠ 60 km/liter
In our second example of banana, the claim is µ > 200 gm and its complement
is µ ≤ 200 gm. Since complement µ ≤ 200 gm contains equality sign so we take
complement as a null hypothesis and claim µ > 200 gm as an alternative
hypothesis, that is,
H0 : µ ≤ 200 gm and H1: µ > 200 gm
Formally these hypotheses are defined as
The hypothesis which we wish to test is called as the null hypothesis.
According to Prof. R.A. Fisher,
“A null hypothesis is a hypothesis which is tested for possible rejection under
the assumption that it is true.”
The hypothesis which complements to the null hypothesis is called alternative
hypothesis.
Note 1: Some authors use equality sign in null hypothesis instead of ≥ and ≤
signs.
The alternative hypothesis has two types:
(i) Two-sided (tailed) alternative hypothesis
(ii) One-sided (tailed) alternative hypothesis
If the alternative hypothesis gives the alternate of null hypothesis in both
directions (less than and greater than) of the value of parameter specified in
null hypothesis then it is known as two-sided alternative hypothesis and if it
gives an alternate only in one direction( less than or greater than) only then it is
known as one-sided alternative hypothesis. For example, if our alternative
hypothesis is H1 : θ ≠ 60 then it is a two-sided alternative hypothesis because its
means that the value of parameter θ is greater than or less than 60. Similarly, if
H1 : θ > 60 then it is a right-sided alternative hypothesis because its means that
the value of parameter θ is greater than 60 and if H1: θ < 60 then it is a
left-sided alternative hypothesis because its means that the value of parameter θ
is less than 60.
In testing procedure, we assume that the null hypothesis is true until there is
sufficient evidence to prove that it is false. Generally, the hypothesis is tested
8
with the help of a sample so evidence in testing of hypothesis comes from a Concepts of Testing of
sample. If there is enough sample evidence to suggest that the null hypothesis Hypothesis
is false then we reject the null hypothesis and support the alternative
hypothesis. If the sample fails to provide us sufficient evidence against the null
hypothesis we are not saying that the null hypothesis is true because here, we
take the decision on the basis of a random sample which is a small part of the
population. To say that null hypothesis is true we must study all observations
of the population under study. For example, if someone wants to test that the
person of India has two hands then to prove that this is true we must check all
the persons of India whereas to prove that it is false we require a person he /
she has one hand or no hand. So we can only say that there is not enough
evidence against the null hypothesis.
Note 2: When we assume that null hypothesis is true then we are actually
assuming that the population parameter is equal to the value in the claim. In our
example of motorcycle, we assume that µ = 60 km/liter whether the null
hypothesis is µ = 60 km/liter or µ ≤ 60 km/liter or µ ≥ 60 km/liter.
Now, you can try the following exercises.
E1) A company manufactures car tyres. Company claims that the average life
of its tyres is 50000 miles. To test the claim of the company, formulate
the null and alternative hypotheses.
E2) Write the null and alternative hypotheses in case (iii), (iv) and (v) of our
example given in Section 9.2.
E3) A businessman of orange formulates different hypotheses about the
average weight of the orange which are given below:
(i) H0: = 100 (ii) H1 : >100 (iii) H0 : ≤ 100 (iv) H1: ≠ 100
(v) H1: > 150 (vi) H0: = 130 (vii) H1: 0
Categorize the above cases into simple and composite hypotheses.
After describing the hypothesis and its types our next point in the testing of
hypothesis is critical region which will be described in next section.
range of T10 is 0 T10 1000. Now, we divide the whole space ( 0-1000) into
two regions as no-distinction awarded region (less than 750) and distinction
awarded region (greater than or equal to 750) as shown in Fig. 9.1. Here, 750 is
the critical value which separates the no-distinction and distinction awarded
regions.
Tn
Fig. 9.1: Non-rejection and critical regions for distinction award
On the basis of scores in all the papers of the selected student, we calculate the
10
value of the statistic T10 Xi . And calculated value may fall in distinction
i 1
award region or not, depending upon the observed value of test statistic.
For making a decision to reject or do not reject H0, we use test statistic
10
T10 X
i 1
i (sum of scores of 10 papers). If calculated value of test statistic T10
lies in no-distinction awarded region (critical region), that is, T10 < 750 then we
reject H0 and if calculated value of test statistic T10 lies in distinction awarded
region (non-rejection region), that is, T10 750 then we do not reject H0. It is a
basic structure of the procedure of testing of hypothesis which needs two
regions like:
(i) Region of rejection of null hypothesis H0
(ii) Region of non-rejection of null hypothesis H0
The point of discussion in this test procedure is “how to fix the cut off value
750”? What is the justification for this value? The distinction award region
may be like T10 800 or at T10 850 or at T10 900. So, there must be a
scientific justification for the cut-off value 750. In a statistical test procedure it
is obtained by using the probability distribution of the test statistic.
The region of rejection is called critical region. It has a pre-fixed area generally
denoted by , corresponding to a cut-off value in a probability distribution of
test statistic.
The rejection (critical) region lies in one-tail or two-tails on the probability
curve of sampling distribution of the test statistic its depends upon the
alternative hypothesis. Therefore, three cases arise: Concepts of Testing of
Hypothesis
Case I: If the alternative hypothesis is right-sided such as H1 : θ > θ0 or
H1 : θ1 > θ2 then the entire critical or rejection region of size α lies on
right tail of the probability curve of sampling distribution of the test
statistic as shown in Fig. 9.2.
Critical value is a
value or values that
separate the region of
rejection from the non-
rejection region.
Fig. 9.2
Case II: If the alternative hypothesis is left-sided such as H1: θ < θ0 or
H1 : θ1 < θ2 then the entire critical or rejection region of size α lies on
left tail of the probability curve of sampling distribution of the test
statistic as shown in Fig. 9.3.
Fig. 9.3
Case III: If the alternative hypothesis is two sided such as H1 : θ ≠ θ0 or
H1 : θ1 ≠ θ2 then critical or rejection regions of size α/2 lies on both
tails of the probability curve of sampling distribution of the test
statistic as shown in Fig. 9.4.
Fig. 9.4
Now, you can try the following exercise.
E4) If H0: θ = 60 and H1: θ ≠ 60 then critical region lies in one-tail or two-
tails.
Testing of Hypothesis
9.4 TYPE-I AND TYPE-II ERRORS
In Section 9.3, we have discussed a rule that if the value of test statistic falls in
rejection (critical) region then we reject the null hypothesis and if it falls in the
non-rejection region then we do not reject the null hypothesis. A test statistic is
calculated on the basis of observed sample observations. But a sample is a
small part of the population about which decision is to be taken. A random
sample may or may not be a good representative of the population.
A faulty sample misleads the inference (or conclusion) relating to the null
hypothesis. For example, an engineer infers that a packet of screws is sub-
standard when actually it is not. It is an error caused due to poor or
inappropriate (faulty) sample. Similarly, a packet of screws may infer good
when actually it is sub-standard. So we can commit two kinds of errors while
testing a hypothesis which are summarised in Table 9.1 which is given below:
Table 9.1: Type of Errors
Decision H0 True H1 True
Reject H0 Type-I Error Correct Decision
Do not reject H0 Correct Decision Type-II Error
Let us take a situation where a patient suffering from high fever reaches to a
doctor. And suppose the doctor formulates the null and alternative hypotheses
as
H0 : The patient is a malaria patient
H1 : The patient is not a malaria patient
Then following cases arise:
Case I: Suppose that the hypothesis H0 is really true, that is, patient actually
a malaria patient and after observation, pathological and clinical
examination, the doctor rejects H0, that is, he / she declares him / her
a non-malaria-patient. It is not a correct decision and he / she
commits an error in decision known as type-I error.
Case II: Suppose that the hypothesis H0 is actually false, that is, patient
actually a non-malaria patient and after observation, the doctor
rejects H0, that is, he / she declares him / her a non-malaria-patient. It
is a correct decision.
Case III: Suppose that the hypothesis H0 is really true, that is, patient actually
a malaria patient and after observation, the doctor does not reject H0,
that is, he / she declares him / her a malaria-patient. It is a correct
decision.
Case IV: Suppose that the hypothesis H0 is actually false, that is, patient
actually a non-malaria patient and after observation, the doctor does
not reject H0, that is, he / she declares him / her a malaria-patient. It
is not a correct decision and he / she commits an error in decision
known as type-II error.
Thus, we formally define type-I and type-II errors as below:
Type-I Error:
The decision relating to rejection of null hypothesis H0 when it is true is called
type-I error. The probability of committing the type-I error is called size of test,
denoted by and is given by
= P [Reject H0 when H0 is true] = P [Reject H0 / H0 is true]
12
We reject the null hypothesis if random sample / test statistic falls in rejection Concepts of Testing of
region, therefore, Hypothesis
α = P [ X / H0 ]
where X = (X1, X2,…,Xn) is a random sample and ω is the rejection region and
1- = 1-P[Reject H0 / H0 is true]
= P[Do not reject H0 / H0 is true] = P[Correct decision]
The (1-) is the probability of correct decision and it correlates to the concept
of 100(1-)% confidence interval used in estimation.
Type-II Error:
The decision relating to non-rejection of null hypothesis H0 when it is false
(i.e. H1 is true) is called type-II error. The probability of committing type-II
error is generally denoted by and is given by
= P[Do not reject H0 when H0 is false]
= P[Do not reject H0 when H1 is true]
= P[Do not reject H0 / H1 is true]
= P[ X ω / H1 ] where, is the non-rejection region.
and
1- = 1-P[Do not reject H0 / H1 is true]
= P[Reject H0 / H1 is true] = P[Correct decision]
The (1-) is the probability of correct decision and also known as “power of
the test”. Since it indicates the ability or power of the test to recognize
correctly that the null hypothesis is false, therefore, we wish a test that yields a
large power.
We say that a statistical test is ideal if it minimizes the probability of both types
of errors and maximizes the probability of correct decision. But for fix sample
size, and are so interrelated that the decrement in one results into the
increment in other. So minimization of both probabilities of type-I and type-II
errors simultaneously for fixed sample size is not possible without increasing
sample size. Also both types of errors will be at zero level (i.e. no error in
decision) if size of the sample is equal to the population size. But it involves
huge cost if population size is large. And it is not possible in all situations such
as testing of blood.
Depending on the problem in hand, we have to choose the type of error which
has to minimize. For this, we have to look at a situation, suppose there is a
decision making problem and there is a rule that if we make type-I error, we
lose10 rupees and if we make type-II error we lose 1000 rupees. In this case,
we try to eliminate the type-II error, since it is more expensive.
In another situation, suppose the Delhi police arrests a person whom they
suspect is a murderer. Now, policemen have to test hypothesis:
H0: Arrested person is innocent (not murderer)
H1: Arrested person is a murderer
The type-I error is
= P [Reject H0 when it is true]
That is, suspected person who is actually an innocent will be sent to jail when
H0 rejects, although H0 being a true.
Testing of Hypothesis The type-II error is
= P [Do not reject H0 when H1 is true]
That is, when arrested person truly a murderer but released by the police. Now,
we see that in this case type-I error is more serious than type-II error because a
murderer may be arrested / punished later on but sending jail to an innocent
person is serious.
Consider another situation, suppose we want to test the null hypothesis
H0 : p 0.5 against H1 : p 0.5 on the basis of tossing a coin once, where p is
the probability of getting a head in a single toss (trial). And we reject the null
hypothesis if a head appears and do not reject otherwise. The type-I error, that
is, the probability of Reject H0 when it is true can be calculated easily(as shown
in Example 1) but the computation of type-II error is not possible because there
are infinitely many alternatives for p such as p = 0.6, p = 0.1, etc.
Generally, strong control on α is necessary. It should be kept as low as
possible. In test procedure, we prefix it at very low level like = 0.05 ( 5%) or
0.01 (1%) .
Now, it is time to do some examples relating to α and .
Example 1: It is desired to test a hypothesis H 0 :p p0 1/ 2 against the
alternative hypothesis H1 :p p1 1/ 4 on the basis of tossing a coin once,
where p is the probability of “getting a head” in a single toss (trial) and
agreeing to reject H0 if a head appears and accept H0 otherwise. Find the value
of and .
Solution: In such type of problems, first of all we search for critical region.
Here, we have critical region = {head}
Therefore, the probability of type-I error can be obtained as
= P[Reject H0 when H0 is true]
P[X / H 0 ]= P[Head appears / H 0 ]
1 H0 is trueso we take value
P Head appears 1
p
2 2 of parameter pgiven in H 0
Also,
= P[Do not reject H0 when H1 is true]
P X / H1 P [Tail appears / H1 ]
Obtain type-I and type-II errors when critical region is X 0.4. Also obtain
power function of the test.
14
Solution: Here, we have critical (rejection) and non-rejection regions as Concepts of Testing of
Hypothesis
X : X 0.4 and X : X 0.4
We have to test the null hypothesis
H 0 : θ 1 against H1 : θ 2
The size of type-I error is given by
P X / H 0 P X 0.4 / 1
f x, dx
P X a f x, dx
… (1)
0.4 1 a
1
Now, by using f x , ; 0 x , we get from equation (1)
1 1
1
dx dx x 0.4 1 0.4 0.6
0.4 1 0.4
Similarly, the size of type-II error is given by
P X / H1 P X 0.4 / 2
0.4 1 0.4
1 1 0.4 1
dx dx x 0 0.4 0 0.2
0 2 0 2 2 2
16
Let us do one example based on type of tests. Concepts of Testing of
Hypothesis
Example 3: A company has replaced its original technology of producing
electric bulbs by CFL technology. The company manager wants to compare the
average life of bulbs manufactured by original technology and new technology
CFL. Write appropriate null and alternate hypotheses. Also say about one tailed
and two tailed tests.
Solution: Suppose the average lives of original and CFL technology bulbs are
denoted by 1 and 2 respectively.
If company manager is interested just to know whether any significant
difference exists in average-life time of two types of bulbs then null and
alternative hypotheses will be:
H0 : µ1 = µ2 [average lives of two types of bulbs are same]
H1 : µ1 µ2 [average lives of two types of bulbs are different]
Since alternative hypothesis is two-tailed therefore corresponding test will be
two-tailed.
If company manager is interested just to know whether average life of CFL is
greater than original technology bulbs then our null and alternative hypotheses
will be
H0 : µ1 ≥ µ2
17
Testing of Hypothesis assumed value θ0 of parameter θ. So we can take the null and
alternative hypotheses as
H 0 : 0 and H1 : 0 for two-tailed test
H 0 : 0 and H1 : 0
or for one-tailed test
H 0 : 0 and H1 : 0
In case of comparing same parameter of two populations of interest,
say, 1 and 2, then our null and alternative hypotheses would be
H0 : 1 2 and H1 : 1 2 for two-tailed test
H 0 : 1 2 and H1 : 1 2
or for one-tailed test
H 0 : 1 2 and H1 : 1 2
Step II: After setting the null and alternative hypotheses, we establish a
criteria for rejection or non-rejection of null hypothesis, that is,
decide the level of significance (), at which we want to test our
hypothesis. Generally, it is taken as 5% or 1% (α = 0.05 or 0.01).
Step III: The third step is to choose an appropriate test statistic under H0 for
testing the null hypothesis as given below:
Statistic Value of the parameter under H 0
Test statistic
Standard error of statistic
After that, specify the sampling distribution of the test statistic
preferably in the standard form like Z (standard normal), 2, t, F or
any other well-known in literature.
Step IV: Calculate the value of the test statistic described in Step III on the
basis of observed sample observations.
Step V: Obtain the critical (or cut-off) value(s) in the sampling distribution
of the test statistic and construct rejection (critical) region of size .
Generally, critical values for various levels of significance are
putted in the form of a table for various standard sampling
distributions of test statistic such as Z-table, 2-table, t-table, etc.
Step VI: After that, compare the calculated value of test statistic obtained
from Step IV, with the critical value(s) obtained in Step V and
locates the position of the calculated test statistic, that is, it lies in
rejection region or non-rejection region.
Step VII: In testing of hypothesis ultimately we have to reach at a conclusion.
It is done as explained below:
(i) If calculated value of test statistic lies in rejection region at
level of significance then we reject null hypothesis. It means
that the sample data provide us sufficient evidence against the
null hypothesis and there is a significant difference between
hypothesized value and observed value of the parameter.
(ii) If calculated value of test statistic lies in non-rejection region at
level of significance then we do not reject null hypothesis. Its
means that the sample data fails to provide us sufficient
evidence against the null hypothesis and the difference between
hypothesized value and observed value of the parameter due to
fluctuation of sample.
18
Note 3: Nowadays the decision about the null hypothesis is taken with the help Concepts of Testing of
of p-value. The concept of p-value is very important, because computer Hypothesis
packages and statistical software such as SPSS, SAS, STATA, MINITAB,
EXCEL, etc. all provide p-value. So, Section 9.8 is devoted to explain the
concept of p-value.
Now, with the help of an example we explain the above procedure.
Example 4: Suppose, it is found that average weight of a potato was 50 gm
and standard deviation was 5.1 gm nearly 5 years ago. We want to test that due
to advancement in agricultural technology, the average weight of a potato has
been increased. To test this, a random sample of 50 potatoes is taken and
calculate the sample mean (X) as 52gm. Describe the procedure to carry out
this test.
Solution: Here, we are given that
Specified value of population mean = 0 = 50 gm,
Population standard deviation = σ = 5.1 gm,
Sample size = n = 50,
Sample mean = X = 52 gm
To carry out the above test, we have to follow up the following steps:
Step I: First of all, we setup null and alternative hypotheses. Here, we want
to test that the average weight of potato is increased. So our claim is
“average weight of potato has increased” i.e. µ > 50 and its
complement is µ ≤ 50. Since complement contains equality sign so
we can take the complement as the null hypothesis and claim as the
alternative hypothesis, that is,
H0 : µ ≤ 50 gm and H1: µ > 50 gm [Here, θ = µ]
Since the alternative hypothesis is right-tailed, so our test is right-
tailed.
Step II: After setting the null and alternative hypotheses, we fix level of
significance α. Suppose, α = 0.01 (= 1 % level).
Step III: Define a test statistic to test the null hypothesis as
Statistic Value of the parameter under H 0
Test staistic
Standard error of statistic
X 50
T
σ/ n
Since sample size is large (n = 50 > 30) so by central limit theorem
the sampling distribution of test statistic approximately follows
standard normal distribution (as explained in Unit 1 of this course),
i.e. T ~ N(0,1)
Step IV: Calculate the value of test statistic on the basis of sample
observations as
52 50 2
T 2.78
5.1/ 50 0.72
Step V: Now, we find the critical value. The critical value or cut-off value for
standard normal distribution is given in Table I (Z-table) in the
Appendix at the end of Block 1 of this course. So from this table, the
critical value for right-tailed test at = 0.01 is zα = 2.33.
19
Testing of Hypothesis Step IV: Now, to take the decision about the null hypothesis, we compare the
calculated value of test statistic with the critical value.
Since calculated value of test statistic (= 2.78) is greater than critical
value (= 2.33), that means calculated value of test statistic lies in
rejection region at 1% level of significance as shown in Fig. 9.5. So
we reject null hypothesis and support the alternative hypothesis. Since
alternative hypothesis is our claim, so we support the claim.
Thus, we conclude that sample does not provide us sufficient
evidence against the claim so we may assume that the average weight
of potato has increased.
Fig. 9.5 Now, you can try the following exercise.
E9) What is the first step in testing of hypothesis?
Procedure of taking the decision about the null hypothesis on the basis of
p-value:
To take the decision about the null hypothesis based on p-value, the p-value is
compared with level of significance (α) and if p-value is equal or less than
then we reject the null hypothesis and if the p-value is greater than we do not
reject the null hypothesis.
The p-value for various tests can be obtained with the help of the tables given
in the Appendix of the Block 1 of this course. But unless we are dealing with
the standard normal distribution, the exact p-value is not obtained with the
tables as mentioned above. But if we test our hypothesis with the help of
computer packages or softwares such as SPSS, SAS, MINITAB, STATA,
EXCEL, etc. then these types of computer packages or softwares present the p-
value as part of the output for each hypothesis testing procedure. Therefore, in
this block we will also describe the procedure to take the decision about the
null hypothesis on the basis of critical value as well as p-value concepts.
9.10 SUMMARY
In this unit, we have covered the following points:
1. Statistical hypothesis, null hypothesis, alternative hypothesis, simple &
composite hypotheses.
2. Type-I and Type-II errors.
3. Critical region.
4. One-tailed and two-tailed tests.
5. General procedure of testing a hypothesis.
6. Level of significance.
7. Concept of p-value.
8. Relation between confidence interval and testing of hypothesis.
H1 : 12 22
23
Testing of Hypothesis (v) Here, psychologist wants to test whether the proportion of literates
between two groups of people is same so
Claim: P1 = P2 and complement: P1 ≠ P2
Since claim contains equality sign so we take claim as the null
hypothesis and complement as the alternative hypothesis i.e.
H0 : P1 = P2
H1 : P1 ≠ P2
E3) Here, (i) and (vi) represent the simple hypotheses because these
hypotheses tell us the exact values of parameter average weight of
orange as = 100 and = 130.
The rest (ii), (iii), (iv), (v) and (vii) represent the composite hypotheses
because these hypotheses do not tell us the exact values of parameter .
E4) Since alternative hypothesis H1 : θ ≠ 60 is two tailed so critical region
lies in two-tails.
E5) Let A and B denote the number of white balls and black balls in the urn
respectively. Further, let X be the number of white balls drawn among
the two balls from the urn then we can take the null and alternative
hypotheses as
H0 : A = 4 & B = 2 and H1: A = 2 & B = 4
The critical region is given by
w X : X 2 X : X 0,1
Thus,
= P [Reject H0 when H0 is true]
P X w / H0 PX 0 / H0 PX 1/ H0
4
C0 2 C0 4
C1 2 C1 1 1 4 2 1 8
6
6
C2 C2 15 15 15 15
9 3
α
15 5
Similarly,
= P [Do not reject H0 when H1 is true]
2
C 2 4 C0 1 1 1
P X w / H1 PX 2 / H1 6
C2 15 15
E6) Since level of significance is the probability of type-I error so in this
case level of significance is 0.05 or 5%.
E7) Here, the alternative hypothesis is two-tailed therefore, the test will be
two-tailed test.
E8) Whether the test of testing a hypothesis is one-tailed or two-tailed
depends on the alternative hypothesis. So correct option is (ii).
E9) First step in testing of hypothesis is to setup null and alternative
hypotheses.
24