You are on page 1of 19

CHAPTER III

HYPOTHESIS TESTING

Introduction

In Chapter II Estimation, we used the information obtained in a simple random sample to


construct a confidence interval estimate of the unknown value of a population parameter. In
this chapter, hypothesis testing, we start with an assumed value of a population parameter:
then we shall use sample evidence to decide wither the assumed value is unreasonable and
should be rejected or whether it should be accepted.

The assumptions we make about the values of population parameters are called hypotheses.
Sample evidence is used to test the reasonableness of hypotheses; hence, the statistical
inferences made in this chapter are referred to as hypothesis testing. A procedure based on
sample evidence and probability theory to determine whether the hypothesis is a reasonable
statement is called hypothesis testing.

In hypotheses testing we begin by making a tentative assumption about a population


parameter. This tentative assumption is called the null hypothesis, and is denoted by Ho - it is
the assumption we wish to test. We then define another hypothesis, called the alternative
hypothesis, which is the opposite of what is stated in the null hypothesis. This alternative
hypothesis specifies all possible values of the population parameter that are not specified in the
null hypothesis, and in denoted by Ha. The hypothesis testing procedure involves using data
from a sample to test the two competing statements indicated by Ho and Ha. Ho and Ha are
mutually exclusive and collectively exhaustive.

In the process of hypothesis testing, the null hypothesis is initially assumed to be true. The
data are gathered and examined to determine whether the evidence is strong enough away
from the null hypothesis to reject it when the researcher in testing an industry standard or a
widely accepted values, the standard or accepted value is assumed to be true in the null
hypothesis. Null means nothing is new, or there in no new value or standard. The burden is
then placed on the researcher to demonstrate through gathered data that the null hypothesis is
false.

Ha, Hi = research hypothesis a statement that in accepted if the sample data provide enough
evidence that the Ho is false.

The situation encountered in hypothesis testing is similar to the one encountered in a criminal
trial. In a criminal trial the assumption is that the defendant is innocent. Thus, the null
hypothesis is one of innocence.

1
The opposite of the null hypothesis is the alternative hypothesis that the defendant is guilty.
Thus, the hypothesis far a criminal trial would be written

Ho: The defendant is innocent


Ha: The defendant is guilty

To test these competing statements, or hypotheses, a trial is held. The testimony and evidence
obtained during the trial provide the sample information. If the sample information is not
inconsistent with the assumption of innocence, the null hypothesis that the defendant is
innocent can not be rejected. However, if the sample information is inconsistent with the
assumption of innocence, the null hypothesis will be rejected. In this case, action will be taken
based upon the alternative hypothesis that the defendant is guilty.

Example

1. The manager of a hotel has stated that the mean guest bill for a weekend is Birr 400 or
less. A member of the hotel’s accounting staff has noticed that the total charges for guest bills
have been increasing in recent months. The accountant will use a sample of weekend guest bills
to test the manager’s claim.

Required: State the null and alternative hypotheses

Solution:
Ho: μ  Birr 400
Ha:   Birr 400

2. Production workers at XY Company have been trained in their jobs by using two
different training programs. The company training director would like to know whether there
is a difference in mean productivity for workers trained in the two programs.
Required: Develop the null and alternative hypotheses.
Solution
Ho: 1 = 2 or 1 - 2 = 0
Ha: 1  2 1 - 2  0

3. The manager at a drugstore claims that the company’s employees are honest. However,
there have been many shortages from the cash register lately.

Required: Specify the null and alternative hypothesis

Solution:

2
Ho: Employees are honest
Ha: Employees are dishonest

“In many situations, the choice of Ho and Ha is not obvious; in such cases, judgment on the
part of the user is needed to select the proper farm of Ho and Ha. However, the equality part
of the expression (either =, or ) always appears in the null hypothesis.

Type I and Type II Errors


There are four possible outcomes of any hypothesis test, two of which are correct and two of
which are incorrect. The incorrect ones are called type I and Type II errors.

Type I Error
In hypothesis testing sample evidence is used to test the null hypothesis Ho. Occasionally the
sample data gathered in research process lead to a decision to reject a null hypothesis when
actually it is true. A type I error is committed when a true null hypothesis is rejected. In short,
rejecting a true Ho is called Type I error. The possibility of committing a Type I error is
represented by Alpha (), or the level of significance. Alpha is some times referred to as the
amount of risk taken in an experiment. Alpha represents the proportion of the area of the curve
occupied by the rejection region. The most commonly used values of  are 0.001, 0.01, 0.05 and
0.10. The larger the area of the rejection region, the greater is the risk of committing Type I
error.

Type II Error
A Type II error is committed by failing to reject a false null hypothesis. That is to say that,
accepting a null hypothesis when it is false is called a Type II error. The probability of
committing a Type II error is represented by beta ().

Alpha () is determined before the experiment, however, Beta () is computed using alpha, the
hypothesized parameter, and various theoretical alternatives to the null hypothesis.

(Null Hypothesis)
State of Nature
Decision Ho True Ho False
Accept Ho Correct Decision Type II Error
Reject Ho Type I Error Correct Decision

There is a trade off between alpha and beta (Type I and Type II errors). The probability of
making one type of error can be reduced only if we are willing to increase the probability of

3
making the other type of error. However, this does not mean that 1; rather it means that
the smaller  is the larger will be , and the larger  in the smaller  will be.

One – Tailed Vs Two – Tailed Tests


These are three possible null hypotheses along with their corresponding alternative hypotheses.

(1) Ho:  (2) Ho:  (3) Ho: 


Ha:  Ha:  Ha: 

  

Leads to two – tailed test leads to a right – tailed test Leads to a left tests

Two – Tailed test


A two – tailed test of a hypothesis will reject the null hypothesis if the sample statistic is
significantly higher than or lower than a hypothesized population parameter. Thus, in a two –
tailed test there are two rejection regions. A two tailed is appropriate when the null hypothesis
is equal to some specified value (e.g. Ho:   ) and the alternative hypothesis is different from
(not equal to) some specified value (e.g. Ha:  . The dividing point between the region
where the null hypothesis is rejected and accepted is called critical value.

One Tailed test


A one tailed test is one in which the alternative hypothesis is directional; unlike a two – tailed
test which does not specify direction.
One – tailed test can be:

 A right – tailed / upper – tailed test.


 A left – tailed / lower – tailed test.

Aright – tailed test will reject the null hypothesis if the sample statistic is
significantly higher than the hypothesized population parameter.

A left – tailed test will reject the null hypothesis if the sample statistic is
significantly lower than the hypothesized population parameter.

STEPS IN HYPOTHESIS TESTING


A summary of the steps that can be applied to any hypothesis test are:

4
1. Determine the null and alternative hypotheses.
E.g. Ho:   
Ha:   

2. Select the test statistic that will be used to decide whether or not to reject the null
hypothesis
E.g. Z – distribution, t – distribution, F- dist, x2 – distribution

3. Select the level of significance to determine the critical values and develop the rejection
rule that indicates the values of the test statistic that will lead to the rejection of Ho.
E.g.  = 0.05 Z025 = 1.96  Reject Ho if /Sample Z/  1.96

4. Collect the sample data, and compute the value the test statistic. A test statistic is a
random variable whose value is used to determine whether we reject the null hypothesis.
E.g. Sample Z=2.0

5. Compare the value of the test statistic to the critical value(s) and make the decision
(either reject Ho or accept HO /do not reject).

5
HYPOTHESIS TEST ABOUT A POPULATION MEAN: Population - Normal, Standard
Deviation - Known

In hypothesis testing if the population in normal and standard deviation is known, we use Z-

Value to test the hypothesis; regardless of the sample size, n. It is also applicable when n  3

regardless of the pop distribution.

Example:

1. Matador-Addis Tyre Share Company claims that its tires have a mean life of 35,000
miles. A random sample of 36 of these tires is tested if the sample mean in 33,000 miles.
Assume that the population standard deviation is 3000 miles and the lives of tires are
approximately normally distributed. Test the share company’s claim using a 5% level of
significance.

Solution
1. Ho:  = 35,000 miles 2. Z – distribution, two tailed test
Ha:  ≠ 35,000 miles
3.  = 0.05 4. = 33,000 miles
/2 = 0.025  = 3,000 miles
Z0.025 = ± 1.96 n = 16 tires
Reject Ho if /Sample Z/ > 1.96 Sample Z =?

5. Reject Ho because /-4.00/ > 1.96

Alternative Methods of Testing Hypotheses

Two other methods of testing hypotheses are the critical value method and the probability (p-
value) method. All three methods of testing lead to the same conclusion with regard to rejection
or failure to reject the null hypothesis. Each of these other two methods is explained below.

Critical Value Method


One alternative method of testing hypotheses is the critical value method. In the preceding
example, the null hypothesis was rejected, because the computed Z value did fall in the
rejection region. What mean life of tyres would it take to cause the calculated z value to fall
into the rejection region? The critical value method determines the critical mean value required
for z to be in the rejection region and uses it to test the hypothesis.

6
Similar to that of the first method, the critical value method uses the formula or

depending on the knowledge of the population standard deviation. However,

instead of a calculated z, a critical value, , is determined.


The critical value of is inserted into the formula, along with μ and σ. Thus,

Substituting values from the preceding example gives

Or

=35,000 ± 980. Therefore, =34,020 or 35,980.

With the critical value method, most of the computational work is done ahead of time. In this
case, before the sample means are computed, it is known that a sample mean value of less than
34,020 miles but greater 35,980 than miles must be attained in order to reject the population
mean. Because the sample mean for this problem is 33,000 miles, we reject the null hypothesis.
This method is particularly attractive in industrial settings where standards can be set ahead of
time and then quality control technicians can gather data and compare actual measurements of
products to specifications.

The probability (p-value) Method

A third way to make decisions in hypothesis testing problems is by using the probability (p-
value) method. In this method, in stead of comparing the computed statistic (z value) with a
table value to determine whether the value falls into the rejection region, we determine a
probability for the computed value and compare that probability to the level of significance
(alpha).

For example, in the mean life of Matador-Addis Tyre case, the computed value of z was -4.00.
The Z table lists the probability of a value this large or larger (this small or smaller) occurring
by chance as 0.00379 (0.5 - 0.49621). As this probability is smaller than α/2, the null hypothesis
is rejected.

7
In order to reject the null hypothesis with the probability method, the probability of the computed
value must be less than α for a one tailed test or less than α/2 for a two tailed test.

2. A Teachers’ union is on strike for higher wages. The union claims that the mean salary
for teachers is at most Birr 8,400 per year. The legislator does not want to reject the union’s
claim, however, unless the evidence is very strong against if. Assume that salaries follow a
normal distribution and the population standard deviation is known to be Birr 3000. A random
sample of 64 teachers is obtained, and the sample mean is Birr, 9,400. Test if the state legislator
accepts the unions’ claim or not at 1% significance level.

Solution:
1. Ho:  ≤ Birr 8,400 2. Z – Distribution, Right – tailed test
Ha:   Birr 8,400
3.  = 0.01
Z = Z0.01 = 2.33
Reject Ho if sample Z  + 2.33
4. n = 64
= Birr 9,400
 = Birr 3,000
Sample Z =?

5. Reject Ho because + 2.67  2.33

8
HYPOTHESIS TESTING about: Population Normal,  Unknown, N Small

As explained in chapter 4, Interval Estimation, use of the t-distribution is appropriate when  is


unknown, the sample size is small (n30), and population is normally distributed. When we
use the t-distribution, it replaces Z as test statistic.

Example:
1. A contractor assumes that construction workers are idle for 75 minutes or less per day.
A random sample of 25 construction workers was taken and the mean idle time was found to
be 84 minutes per day with a sample standard deviation of 20 minutes. Assume that the
population is approximately normally distributed, use a 5% level of significance to test the
contractor’s assumption.
Solution
1. Ho:  ≤ 75 minutes
Ha:   75 minutes
2. t – distribution, Right – tailed test
3.  = 0.05
n = 25
 = n – 1 = 25 – 1 = 24
t, = t0.05,24 = 1.711
 Reject Ho if sample t  1.711
4. n = 25
= 84 minutes
S = 20 minutes
Sample t =?

5. Reject Ho; because + 2.25  1.711. Workers are idle for more than 75 minutes per day.

2. A director of a secretarial school claims that its graduates can type at least 50 words per
minute on average. Suppose you want to hire some of these graduates if the director’s claim is
true; and you test the typing speed of 18 of the graduates and obtain a mean of 40 wards per
minute with a sample variance of 720. Assuming the typing speed for the graduates of the
secretarial school is normally distributed, test the director’s claim and decide whether to hire
the graduates or not, using a 5% level of significance.
Solution
1. Ho:   50 words

9
Ha:  50 words
2. t – distribution, Left – tailed test
3.  = 0.05
n = 18
=n–1
= 18 – 1 = 17
t, = t0.05, 17 = 1.74
 Reject Ho if sample t  -1.74
4. = 40 words
n = 18
s2 = 720
Sample t =?

5. Do not reject Ho because –1.58 > -1.74

HYPOTHESIS TESTING ABOUT A POPULATION PROPORTION (P)

A proportion is a value between 0 and 1 that expresses the part of the whole that possesses a
given characteristic.

The formula (methods) for proportions based on the central limit theorem make possible the
testing of hypotheses about the population proportion in a manner similar to that of the
formula used to test sample means. Similar to that of hypothesis testing about a population
mean, hypothesis testing about a population proportion has three terms.

1. Ho: P = y 2. Ho: P  y 3. Ho: P  y


Ha: P  y Ha: Py Ha: P y

The first form is a two – tailed test, where as the second and third forms are one – tailed tests.
The specific form used depends up on the application of interest.

Hypothesis testing about a population proportion is based on the difference between the
sample proportion and the hypothesized value P.

The central Limit Theorem applied to the sample proportions states that values are normally

distributed, with a mean of P and a standard deviation of , when np and nq are

10
greater than or equal to 5. If np and nq are greater than or equal to 5, a Z - test is used to test
hypothesis about P.

Example:

1. A magazine claims that 25% of its readers are college students. A random sample of 200
readers is taken. It is found that 42 of these readers are college students. Use a 10% level of
significance and test the magazine’s claim.
Solution
1. Ho: P = 0.25
Ha: P  0.25
2. Z – distribution; two tailed test
3.  = 0.1 /2 = 0.05
Z/2 = Z0.05 = 1.64
Reject Ho if /sample Z/  1.64
4. n = 200
x = 42
= 0.21
Sample Z =?

5. Do not reject Ho because / -1.31/ < 1.64

2. An Economist states that more than 35% of Addis’s labor force in unemployed. You
don’t know if the economist’s estimate is too high or too low. Thus, you want to test the
economist’s claim using a 5% level of significance. You obtain a random sample of 400 people
in the labor force, of whom 128 are unemployed. Would you reject the economist’s claim?
Solution
1. Ho: P ≤ 0.35
Ha: P > 0.35
2. Z – distribution , right-tailed test
3.  = 0.05
Z 0.05 = 1.64
Reject Ho if sample Z > 1.64
4. n = 400
x = 128
= 0.32

11
Sample Z =?

5. Do not reject Ho because / -1.31/ < 1.64

HYPOTHESIS TESTING INVOLVING TWO POPULATIONS

Hypothesis Testing About the Difference between Two Means


According to the central limit theorem, the difference in two sample means in normally
distributed for large sample sizes (n 1, n2  30) and if the parent populations are normally
distributed regardless of the sample size the difference in two sample means is normally
distributed.

Large sample case


As is true is hypothesis testing about a population mean or population proportion, hypothesis
testing about the difference between two means has three forms. That is, the null hypothesis
can take three forms along with the corresponding alternative hypothesis.

1. Ho: 1-2 =0 2. Ho: 1-2  0 3. Ho: 1-2  0


Ha: 1-2 0 Ha: 1-2  0 Ha: 1-2  0
The first form leads to a two-tailed test, while the later two lead to a one-tailed test.

Based on the central limit theorem, the mean of the sampling distribution sample means in the
difference between two population means; i.e., = 1-2; and the standard error is

For large sample sizes the sampling distribution of the difference between two sample means is
normally distributed with a Z – test statistic.

And whenever n1 and n2  30, we can use and as estimates of and to compute Z if
and are unknown, and Z will be computed as

12
In most of the hypothesis tests about two means, the hypothesized difference is zero.
Example:

1. Is there any difference between the average salary of a legal secretary and a medical
secretary? In an effort to answer that question a researcher takes a random sample of 33 legal
secretaries across a region, resulting in a sample average annual salary of Birr 20,000 with a
standard deviation of Birr 1,550. The researcher then takes a random sample of 35 medical
secretaries a class the region, which yields an average annual salary of Birr 18,500 with a
standard deviation of Birr 2,100. Use =0.01 to test this question
Solution
1. Ho: 1-2 = 0
Ha: 1-2  0
2. Z – distribution , two tailed test
3.  = 0.01, /2 = 0.005
Z/ = Z0.005 = 2.57
 Reject Ho if /sample Z/  2.57
4. Legal Secretary Medical Secretary
= Birr 20,000 = Birr 18,500
n1 = 33 n2 = 35
S1 = Birr 1,550 S2 = Birr 2,100
Sample Z =?

5. Reject Ho; because /sample Z/ = 3.36  2.57. There is a difference in the average annual
salary of legal and medical secretary.

2. A firm is studying the delivery times for two raw material suppliers. The firm in
basically satisfied with supplier A and is prepared to stay with this supplier provided that the
mean delivery time is the same or less than that of supplier B. However if a firm finds that the
mean delivery time from supplier B is less than that of supplier A, it will begin making raw
material purchases from supplier B.
a. What are the null and alternative hypotheses for this situation?
b. Assume that independent samples show the following delivery time x is for the two
suppliers.

13
Supplier A Supplier B
n1 = 50 n2 = 30
= 14 days = 12.5 days
S1 = 3 days S2 = 2 days

Using  = 0.05, what is your conclusion for the hypotheses from part (a)? What action do you
recommend in terms of supplier selection?
Solution
1. Ho: 1-2  0
Ha: 1-2  0
2. Z – distribution , Right - tailed test
3.  = 0.05
Z = Z0.05 = 1.64
Reject Ho if sample Z  1.64

4. Supplier A Supplier B
n1 = 50 n2 = 30
= 14 days = 12.5 days
S1 = 3 days S2 = 2 days
Sample Z =?

5. Reject Ho; because 2.68  1.64

This shows that the mean delivery time for supplier A is greater than supplier B. So the firm
should shift to supplier B.

Small Sample Case

In testing of hypothesis for the difference between two means, given that the sample sizes taken
are small (n1, n2  30), we can use either Z or t – distribution as a test statistic assuming that the
parent populations are normally distributed.

1. Population normal, and 1 and 2 known – Z distribution is used


2. Population normal, and 1 , and 2 unknown - t distribution is used

14
t – Distribution: used when population normal 1, and 2 unknown, and n1, and/or n2  30. The
unknown population standard deviations are approximated by sample standard deviations as:

; where df = n1 + n2 - 2

This approximation is based on the assumption that the two population standard deviations are
equal.

Once is known t is computed as:

Or

; Where

If 1 and 2 are not equal, the sample standard error of the difference between two means and
the degrees of freedom are calculated as:

Example:
1. A marketing research firm wishes to know if the mean number of his of TV viewing per
week is the same for teenage boys and teenage girls using a 5% level of significance. The
unknown population variances are assumed to be equal. The following data were obtained is
an attempt to test the equality of 1 and 2.
Teenage Boys Teenage Girls
n1 = 20 n2 = 12
= 24.5 hrs = 28.7 hrs
2 2
S 1 = 64 hrs S 2 = 71 hrs
Test the above hypothesis.

Solution
1. Ho: 1  2 or 1-2 = 0
Ha: 1  2 or 1-2  0

15
2. t – distribution , Two - tailed test
3.  = 0.05 v = n 1 + n2 - 2
/2 = 0.025 = 12 + 20 –2 = 30
t/2, V = t0.25, 30 = 2.042
Reject Ho if /sample t/  2.042

4. Teenage Boys Teenage Girls


n1 = 20 n2 = 12
= 24.5 hrs = 28.7 hrs
2 2
S 1 = 64 hrs S 2 = 71 hrs
Sample t =?

5. Do not Reject Ho; There is no significant difference

2. A time-and-motion study is conducted to test whether the mean length of time required
to perform a certain task is lesser for employees on the day shift than for employees on the
night shift. The data are as follows.
Day shift Night Shift
n1 = 10 n2 = 8
= 20 hrs = 29 hrs
2 2
S1 = 64 hrs S2 = 50 hrs

Use a 1% level of significance to test the hypothesis. Assume the populations are
approximately normal, the population variances are equal, and the samples are independent.

Solution
1. Ho: 1 - 2  0
Ha: 1 - 2  0
2. t – distribution , Left - tailed test
3.  = 0.01 v = 10 +8-2 = 16
4. t, v = t0.01,16 = 2.583
Reject Ho if sample t  - 2.583
Sample t =?

16
5. Do not reject Ho because –2.49 -2.58

The mean length of time required to perform a certain task for day-shift employees is greater
than or equal to for night shift employees.

Hypothesis testing about the Difference between two population proportions (P1-P2)

Frequently we are interested in testing the hypothesis that the proportions of individuals who
possess a certain characteristic in population 1 is the same as that in population 2. E.g. The
proportion of defectives in lot A and Lot B

To test hypothesis about the difference between two population proportions, we obtain
independent random sample of n1 items from the first population and n2 items from the

second; and calculate and . Once we obtain and , we use a test based on

the standard normal distribution.

In testing hypothesis about the difference in two population proportions, particular values of
the population proportions are not usually known or assumed; unlike hypothesis testing about
population proportion. Rather, the hypotheses are about the difference in the two population
proportions, (P1-P2). Hypothesis testing about the difference between two population
proportions has three forms:

1. Ho: P1-P2 = 0 2. Ho: P1-P2  0 3. Ho: P1-P2  0


Ha: P1-P2  0 Ha: P1-P2  0 Ha: P1-P2  0

The first form leads to a two-tailed test while the later two lead to a one-tailed test.

The central Limit Theorem applied to the difference between two population proportions states
that values are normally distributed, with a mean of P1-P2 a standard deviation of

, and .

However, since the standard error is unknown, it has to be estimated from the sample data.
While we may be tempted to use and as we did with the interval estimation procedure,
in hypothesis testing we often adjust it to a slightly different form.

17
For the special case where the hypotheses involve no difference between the population
proportions (i.e. either Ho: P1-P2 = 0 Ho: P1-P2  0, or Ho: P1-P2  0) is modified to reflect the fact
that when we assume Ho to be true at the equality, we are assuming P1 = P2.

When this occurs, we combine or pool the two sample proportions to provide one estimate.

This pooled estimator, denoted by , is as , and the standard deviation

is estimated by , which is calculated as =

= and Z is calculated as . And when P1 =P2, Z becomes

Example:
1. In a sample of 400 products produced by machine I, 200 were defective, and in a sample
of 400 products produced by machine II, 170 were defective. Using  = 0.05, test the hypothesis
that the rate of defect is the same for both machine 1 and machine 2.
Solution
1. Ho: P1-P2 = 0
Ha: P1-P2  0
2. Z – distribution, two – tailed test
3.  = 0.05,
/2 = 0.025
Z/2 = Z0.025 = 1.96
Reject Ho if /Sample Z/  1.96
4. Machine I Machine II
n1 = 400 n2 = 400
x1 = 200 x2 = 170

Sample =

5. Reject Ho

18
2. To test the effectiveness of the approach and layout of two direct mail brochures, a
marketing manager of SELAM Inc mailed out 150 copies of each brochure and recorded the
number of responses penetrated by each. There were 30 responses generated by the first
brochure and 15 generated by the second. Can the marketing manager conclude that the first
brochure is more effective? Use = 0.05.
Solution
1. Ho: P1-P2  0
Ha: P1-P2  0
2. Z – distribution, Right – tailed test
3.  = 0.05,
Z = Z0.05 = 1.64
Reject Ho if Sample Z  1.64
4. Brochure I Brochure II
n1 = 150 n2= 150
x1 = 30 x2 = 15

Sample =

5. Reject Ho. YES, the marketing manager can conclude that the first brochure is more effective
than the second.

19

You might also like