Testing of Hypothesis 189

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 12

Testing of Hypothesis…189

Chapter 5
Testing of Hypothesis
5.1 Introduction
5.2 Types of Hypothesis
5.3 Risks or Error in Hypothesis
Testing Methodology
5.4 The Level of Significance
5.5 Test Statistic
5.6 Critical Region
5.7 Tails of a Test: One-Tailed
Test and Two-Tailed Tests
5.8 Procedure in Testing of
Hypothesis
5.9 Test of Significance for Large
Samples
5.10 Test of Significance of
Sampling of Attributes
5.11 The t-distribution
5.12 The F-distribution
5.13 Chi Square Test
190 …Statistical Methods
5.1 Introduction
While inferring statistically about a population parameter on the basis of a
random sample drawn from the population, we face two different types of
problems. In the first situation, the population under discussion is
completely unknown to us and we would like to guess about the
population parameter(s) from our knowledge about the sample
observations. In the second situation, some information about the
population is already available and we would like to verify how far that
information is valid on the basis of the random sample drawn from that
population. First aspect is known as estimation and the second aspect is
known as tests of significance.
Thus, estimation theory and testing of hypothesis are integral parts of
statistical inference. In estimation theory, we learned how to estimate the
values of population parameters. In this chapter, we will introduce how to
test the values of population parameters.
A hypothesis is a tentative assertion or idea or assumption about the
parameters of a population.
Once hypothesis is formed, we must test it to decide the validity of the
hypothesis whether it has to be accepted or rejected. The only information
which helps us to take decision is contained in the sample. Based on
sample information at hand, we make a decision about the population
parameter.
The testing of hypothesis is a statistical procedure that involves the
formulating hypotheses and testing of validity of these hypotheses on the
basis of sample information.
5.2 Types of hypothesis
There are two types of hypothesis.
1. Null hypothesis
2. Alternative hypothesis
5.2.1 Null hypothesis
It is a hypothesis of no difference. It refers to a specified value of the
population parameter. It represents the default possibility that we will
accept unless we have convincing evidence to the contrary. The null
hypothesis is denoted by H  . Suppose that the population has a specified
mean value say μ  the null hypothesis is set up as
H  : μ = μ  , i.e., the population has a specified mean value μ0 .
Consider an example, a manufacturer of dairy milk claims that, on an
average, its packet contains 1000 ml of milk. In reality, this claim may or
may not be true. However, we will initially assume that the manufacturer’s
Testing of Hypothesis… 191
claim is true. To test the claim of the manufacturer, the null hypothesis will
be set up as
H  : μ =  ml., i.e., the claim of the manufacturer’s is true.
The manufacture’s claim will be true if all the packets, on an average,
contain 1000 ml. of milk.
5.2.2 Alternative hypothesis
It is the complementary statement of null hypothesis and represents the
conclusion supported if the null hypothesis is rejected. The alternative
hypothesis is denoted by H . Suppose that the population has a specified
mean value say μ0 , the alternative hypothesis may be
H : μ ≠ μ  , i.e., the population has not a specified mean value  0 .
H : μ  μ  , i.e., the population mean is greater than the specified
value μ .
H : μ  μ  , i.e., the population mean is less than the specified mean
value  0 .
Suppose a consumer protection group wishes to test the claim of the
manufacturer. In order to test the claim of the manufacturer for the above
example, the alternative hypothesis will be set up as
H : μ   ml., i.e., the manufacture’s claim is false.
The manufacture’s claim is false if its milk packets contain, on an average,
less than 1000 ml. of milk.
Note:
(i) In the above example, we don’t set up alternative hypothesis as
H : μ   ml. because if all the packets contain more than 1000
ml. of milk we considered the manufacturer’s claim is also valid.
Here, we formulate alternative hypothesis from the consumer’s side.
Consumer’s side in that sense if each packet of milk contains more
than 1000 ml. of milk, then it is advantage for the consumer because
consumer gets more quantity of milk at the same cost. We only wish
to test; in reality each packet of milk contains less than 1000 ml.
Hence, in this example, we will reject the claims of the manufactures
if each packet will contain less than 1000 ml. of milk.
(ii) Suppose, if the manufactures wishes to test owns claim, then
manufacturer set up alternative hypothesis for his owns sake as
H : μ   ml. Here, he wishes to determine if each packets of
milk contains in reality significantly less than 1000 ml or more than
1000 ml. The manufacturer always wishes to fill the amount of milk
in each packets either exactly or approximately 1000 ml. If he fills
192 …Statistical Methods
more than 1000 ml than it will be disadvantage for the
manufacturers because at the same cost he has to sell more amount
of milk whereas if each packet of milk contains less than 1000 ml. of
milk he may loose the consumer from the markets.
Set up the null and alternative hypothesis for the following examples:
1. To test if the per capita income of Nepalese people is (i) different from
$240, (ii) less than $240, (iii) more than $240.
Null hypothesis H 0 :  = $240 , i.e., the average per capita income of
Nepalese people is $ 240.
Alternative hypothesis
i. H : μ ≠ $ , i.e., the average per capita income of Nepalese people
is different from $240.
ii. H : μ  $ i.e., the average per capita income of Nepalese people
is less than $240.
iii. H : μ  $ i.e., the average per capita income of Nepalese people
is more than $240.
2. Suppose a potato chip manufacturer is concerned that the bagging
equipment may not be functioning properly when filling 10 oz bags. To test
the concern of the manufacturer, we set up hypotheses as
Null hypothesis H 0 : μ = 10 oz , i.e., the bagging equipment is functioning
properly.
Alternative hypothesis H1 : μ ≠ 10 oz , i.e., the bagging equipment is not
functioning properly.
The bagging equipment is working properly if it puts, on average, 10 oz in
each bag. If it puts significantly more than or less than 10 oz in each bag,
the equipment is considered as defective. That is, the bagging equipment is
not functioning properly.
3. Suppose we are purchasing 3.5 inches disks. The company claims that
only 4% of the disks it manufacturers are defective. To test the
manufacturer’s claim, we set up hypotheses as
Null hypothesis H0 : P = 0.04 , i.e., the claim of the company is true.
Alternative hypothesis H 1 : P  0.04 i.e., the claim of the company is false.
4. Suppose a company has implemented a new advertising program in
the hopes of increasing sales from last year’s annual average of Rs. 10
millions. Test the new advertising program was successful. Here we set up
hypotheses as
Null hypothesis H0 : μ = Rs.10 millions, i.e., the new advertising program
was not successful.
Testing of Hypothesis… 193
Alternative hypothesis H 1 :   Rs.10 millions, i.e., the new advertising
program was successful.
The advertising program is successful if the sales in the current year should
be greater than the last year sales. If it is less or equal to last year sales, the
new advertising program is not successful.
5. If we think about the judicial system in terms of a hypothesis test, how
would we set up the null and the alternative hypotheses?
Null hypothesis H 0 : the person is innocent.
Alternative hypothesis H1 : the person is not innocent.
5.3 Risks or errors in hypothesis testing methodology
Since we will be deciding between the null and the alternative hypotheses
using only sample information, there is always a chance that we may be
wrong. That is, we may choose to believe the null hypothesis when, in fact,
it is not true. Alternatively, we may choose to believe the alternative
hypothesis when, in fact, it is not true. There are two ways that we could
be wrong when we perform a hypothesis test, which is presented in the
following table 5.1.
Table 5.1 Two Types of errors
Actual Situation
Statistical Decision
H 0 is True H 0 is False
Reject H 0 Type I error Correct Decision
Accept H 0 Correct Decision Type II error
Thus, there are two types of errors in decision-making process.
1. Type I error
2. Type II error
5.3.1 Type I error
The error committed in rejecting true null hypothesis is known as Type I
error. A Type I error is made when we reject the null hypothesis and the
null hypothesis is actually true. The probability of making Type I error is
denoted by  . That is,

α = P Reject H when H i s true 
Since producers have to bear this kind of risk, the Type I error is also called
Producer’s risk.
5.3.2 Type II error
The error committed in accepting false null hypothesis is known as Type II
error. A Type II error is made when we fail to reject the null hypothesis and
194 …Statistical Methods
the null hypothesis is false. The probability of making Type II error is
denoted by  .That is,

β = P Accept H when H i s false 
Since consumers have to bear this kind of risk, the Type II error is also
called consumer’s risk.
To get the idea of types of errors in testing of hypothesis let us consider an
example. In any manufacturing process, a manufacturer will lose money if
the bottles contain either more or less than the amount claimed on the
level. Therefore, manufacturers pay close attention to the amount of their
product that is dispensed by the bottle-filling machines. Suppose we are
working for a soda company and each of the soda bottles is supposed to
contain 32 oz of soda. We wish to set up a hypothesis to decide if the
bottle-filling machines are working properly. The hypotheses are,
H  : μ =  oz , i.e., the machine is working properly.
H : μ ≠  oz , i.e., the machine is not working properly.
Remember that a Type I error is made if we believe H1 but H 0 is true. In
this case, we believe that the true mean is not equal to 32 oz and therefore
the bottles are not being filled properly. Nevertheless, in reality the
machine is working properly.
A Type II error is made if we believe H 0 is true but H 1 is true. In this case,
we believe that the soda machine is properly filling the bottles when, in
fact, it is either overfilling or under filling. So, we do not adjust a machine
that in reality needs to be adjusted.
The two types of errors that occur in tests of hypothesis depend on each
other. We cannot lower the values of  and  simultaneously for a test of
hypothesis for a fixed sample size. Lowering the value of  will raise the
value of  and lowering the value of  will raise the value of  . However,
we can decrease both  and  simultaneously by increasing the sample
size. However, there is always a limit to one’s resources, and this will affect
the decision as to how large a sample can be taken. Thus, for given samples
size we must consider the trade-offs between the two possible types of
errors. Since Type I error is directly control, we try to minimize  keeping
 as a fixed in advance.
5.4 The Level of significance
The probability of committing a Type I error is referred to as the level of
significance of the statistical test. It is denoted by  .The probability of
making a correct decision is ( - α) .The most commonly used level of
significance in practice is 5% and 1%. If we are using level of significance as
Testing of Hypothesis… 195
5%, we shall mean that probability of committing Type I error is 0.05. It also
means that we are 95% confident that a correct decision has been made.
The confident coefficient The confidence coefficient, denoted by  - α , is
the complement of probability of Type I error. More precisely, it is the
probability that the null hypothesis H 0 is not rejected when in fact it is true
and should not be rejected. The confidence level of a hypothesis test is
( − α) %.
5.5 Test Statistic
A test statistic is a value which is calculated from the sample data. The
value of test statistic is used to decide whether the null hypothesis should
be accepted or rejected in our hypothesis test.
The value of test statistic is calculated by using the following formula
Sample statistic− Population parameter
Test statistic=
standard error of sample statistic
The choice of a test statistic is guided by the sample size and the value of
the population standard deviation ( ) as shown in table 5.2.
Table 5.2 Choice of probability distribution
Population standard deviation ( )
Sample Size
Known Unknown
n  30 Z-test Z test
n  30 Z- test t-test

5.6 Critical Region


The sampling distribution of the test statistic is divided into two regions, a
region of rejection (or critical region), and a region of acceptance. If the
test statistic falls into the region of acceptance, the null hypothesis
accepted. If the value of test statistic lies in the rejection region, the null
hypothesis is rejected. The value that divides the region of rejection and
the region of acceptance is called critical value. The critical value is
obtained from the standard table.

Rejection Region Rejection Region


Acceptance Region

Critical Value
Figure 5.1 Rejection region and Acceptance regions.
196 …Statistical Methods
5.7 Tails of a Test: One-Tailed Test and Two-Tailed Tests
In testing of hypothesis problem, either the rejection region can be on both
sides or it can be on the left side or right side of the distribution curve. A
test with two rejection regions is called a two-tailed test; a test with one
rejection region is called a one-tailed test. The one-tailed test is called a
left-tailed test if the rejection region is in the left tail of the distribution
curve, and it is called a right-tailed test if the rejection region is in the right
tail of the distribution curve.
Definition A two-tailed test has two rejection regions in both tails; a left-
tailed test has the rejection region in the left tail, and a right –tailed test
has the rejection region in the right tail of the distribution curve.
5.7.1 A Two Tailed Test
Let us consider an example, according to the Central Bureau of Statistics,
the average per capita income of people of Nepal was $240 in 2001. We
wish to test whether or not the average per capita has changed since 2001.
The key word here is changed. The average per capita income has changed
if it has either increased or decreased during the period since 2001. This is
an example of two-tailed test. Here we set up null and alternative
hypotheses as
Null hypothesis H  : μ = $ , i.e., the average per capita income is $240 or
the average per capita income has not changed.
Alternative Hypothesis H : μ  $ , i.e., the average per capita income is
not $240 or the average per capita income has changed.
Consider another example; the manager of a XYZ bank reported that the
mean transaction per day was worth of Rs. 100 millions. We want to test
the mean transaction is in fact Rs. 100 millions or significantly different
from Rs. 100 millions. The key word here is significantly different. The
mean transaction is significantly different from Rs. 100 millions, if the mean
transaction is either more or less than Rs. 100 millions. This is also an
example of two-tailed test. Here we set null and alternative hypotheses as
Null hypothesis H 0 :  = Rs.100 millions , i.e., the mean transaction per
day is Rs. 100 millions or the mean transaction per day is not significantly
different from Rs. 100 millions.
Alternative Hypothesis H 1 :   Rs.100 millions i.e., the mean transaction
per day is Rs. 100 millions or the mean transaction per day is significantly
different from Rs. 100 millions.
Thus, a two-tailed test of the population mean has the following null and
alternative hypotheses:
Null hypothesis H  : μ = μ (A specified number)
Testing of Hypothesis… 197
Alternative hypothesis H : μ  μ  (A specified number)

 2  2
1 −

Figure 5.2 A two–tailed test.


Remarks: How to detect two-tailed test
i. Problem statement has the keywords changed, different from, no
longer than, same, equal, exactly, unbiased etc.
ii. A two-tailed test is used if the population parameter has shifted
away from a specified number in either direction, increased, or
decreased.
iii. If the alternative hypothesis has a not equal to () sign, as in
above example, it is a two tailed test.

5.7.2 A Left-Tailed Test


Reconsider an example of the average per capita income of people of
Nepal. Now, we wish to test whether the average per capita income is less
than $240. The key word here is less than, which indicates left-tailed test.
Here we set null and alternative hypotheses as
Null hypothesis H 0 :  = $240 , i.e., i.e., the average per capita income is
$240.
Alternative Hypothesis H 1 :   $240 , i.e., the average per capita income is
less than $240.
Again, reconsider the example of mean transaction per day of XYZ bank has
Rs. 100 millions. Now we wish to test whether the mean transaction per
day is less than Rs. 100 millions. The key word here is less than, which
indicates left-tailed test. In a left tailed test, the rejection region is in the
left tail of the distribution curve as shown in figure 5.3 and the area of the
rejection region is equal to the level of significance ( ) . Here we set null
and alternative hypotheses as
Null hypothesis H 0 :  = Rs.100 millions , i.e., the mean transaction per
day is Rs. 100 millions, or, the mean transaction per day is not significantly
different from Rs. 100 millions.
Alternative Hypothesis H 1 :   Rs.100 millions i.e., the mean transaction
per day is less than Rs. 100 millions.
Thus, a left-tailed test of the population mean has the following null and
alternative hypotheses:
Null hypothesis H  : μ = μ (A specified number)
Alternative hypothesis H : μ  μ (A specified number)
198 …Statistical Methods


1 −

Figure 5.3 A left tailed test.


Remarks: How to detect left-tailed test
i. Problem statement has the keywords less than, decreased,
reduced, at least, inferior, minority, below, smaller, shorter etc.
ii. A left-tailed test is used if the population parameter has shifted to
a number less than a specified number.
iii. If the alternative hypothesis has a less than (<) sign, in this case,
the test is always left-tailed.
5.7.3 A Right Tailed test
Reconsider an example of the average per capita income of people of
Nepal. Now, we wish to test whether the average per capita income is
more than $240. The key word here is more than, which indicates right-
tailed test. Here we set null and alternative hypotheses as
Null hypothesis H 0 :  = $240 , i.e., i.e., the average per capita income is
$240.
Alternative Hypothesis H 1 :   $240 , i.e., the average per capita income
is more than $240.
Again, reconsider the example of mean transaction per day of XYZ bank has
Rs. 100 millions. Now we wish to test whether the mean transaction per
day is more than Rs. 100 millions. The key word here is more than, which
indicates right-tailed test. In a right tailed test, the rejection region is in the
right tail of the distribution curve as shown in figure 5.4 and the area of the
rejection region is equal to the level of significance ( ) . Here we set null
and alternative hypotheses as
Null hypothesis H 0 :  = Rs.100 millions , i.e., the mean transaction per
day is Rs. 100 millions, or, the mean transaction per day is not significantly
different from Rs. 100 millions.
Alternative Hypothesis H 1 :   Rs.100 millions i.e., the mean transaction
per day is more than Rs. 100 millions.
Thus, a right-tailed test of the population mean has the following null and
alternative hypotheses:
Null hypothesis H  : μ = μ (A specified number)
Alternative hypothesis H : μ  μ  (A specified number)


1 −

Figure 5.4 A right tailed test


Testing of Hypothesis… 199
Remarks: How to detect right-tailed test
i. Problem statement has the keywords greater than, increased,
more than, at most, above, superior, enhance, improvement,
gained, etc.
ii. A right-tailed test is used if the population parameter has shifted
to a number more than a specified number.
iii. If the alternative hypothesis has a greater than (>) sign, in this
case, the test is always right-tailed.
In general, we look for the comparative words stated in the question in
order to detect the tailed of the test statistic. The most commonly used
words in the problem statement are significantly different, unbiased, only,
changed, same, no longer than, less than, more than, equal to, inferior,
superior, above, below, at least, at most, minority, majority, taller, smaller,
shorter, effective, improvement, enhance, decrease, increase, better etc.

5.8 Procedure in testing of hypothesis


The following are the steps involved in hypothesis testing problems.
1. Setting up hypotheses
Null hypothesis It is a hypothesis of no difference between sample statistic
and population parameter. It is denoted by H 0 .
Alternative Hypothesis It is the opposite of the null hypothesis. It is denoted
by H1 .
2. Level of significance ( ) : The level of significance ( ) is fixed in
advance. Usually level of significance is taken as 5 %.
3. Computation of test statistic: Under the null hypothesis the test
statistic is computed as
Sample Statistic − Population Parameter
TestStatistic =
Standard error of sample statistic
4. Critical Value: The critical or tabulated value the test statistic is
obtained from the table according to pre determined level of significance
and tails of a test.
5. Decision: The last step in the testing of hypothesis is to make a
decision about the null hypothesis, i.e., whether to accept it or to reject it.
The decision is made by comparing the calculated value of test statistic
with the critical value of the test statistic and decides as under:
i. If the calculated value of the test statistic is greater than the
tabulated value, then reject the null hypothesis.
ii. If the calculated value of the test statistic is less than or equal to
the tabulated value, then accept the null hypothesis.
200 …Statistical Methods

Flow Chart for Testing of Hypothesis


Start

Setting up Null and


Alternative Hypotheses

Select an appropriate
level of significance

Calculate appropriate
Test Statistic (T)

Obtain critical value (C)


from the table

Compare calculated value


and critical value

Yes No
Is T  C ?

Accept H0 Reject H0

You might also like