You are on page 1of 9

UNIT 7 – HYPOTHESIS TESTING

7.1 Basic concepts


7.2 Steps in Hypothesis testing
7.3 Type I and type II errors (concepts)
7.4 One tailed \IS two tailed hypothesis tests
7.5 Hypothesis testing of: Population mean, proportion

7.1 Basic concepts


Hypothesis testing provides information whether or not a given claim (or
statement) about a population parameter is true. It shows how hypothesis tests
can be conducted about a population mean and a population proportion. We
begin by providing examples that illustrate the approach to develop null and
alternative hypotheses.
In hypothesis testing we begin by making a tentative assumption about a
population parameter. This tentative assumption is called the null hypothesis
(denoted by H0). We then define another hypothesis, called the alternative
hypothesis, which is the opposite of what is stated in the null hypothesis. The
alternative hypothesis is denoted by H1. The hypothesis-testing procedure
involves using data from a sample to test the two competing statements.
We perform a test of hypothesis only when we are making a decision about a
population parameter based on the value of a sample statistic.
If we are taking the whole population, we do not need to make a test of
hypothesis.
Hypothesis testing is similar to a criminal trial. In a criminal trial the null
hypothesis assumes that the defendant is innocent. The opposite of the null
hypothesis is the alternative hypothesis which expresses that the defendant is
guilty. Hence, the hypotheses for a criminal trial would be written:

H0: The defendant is innocent (not guilty)


H1: The defendant is guilty
To test these competing statements, a trial is held. The testimony and evidence
obtained during the trial provide sample information.
A null hypothesis is a claim (or statement) about a population parameter that
is usually assumed to be true from the very beginning until it is declared false.
It is denoted by H0.

1
An alternative hypothesis is a claim about a population parameter that will
be true if the null hypothesis is false.
Consider a person who has been suspected for committing a crime and is being
tried in a court. Based on the available evidence, the judge or jury will make
one of two possible decisions:
1. The person is innocent
2. The person is guilty
Null hypothesis: Ho: The person is innocent
Alternative hypothesis: H1: The person is guilty
Example The soft-drink company’s claim that its cans contain 12 ounces of
soda. In reality, this claim may or may not be true. However, we will initially
assume that the company’s claim is true. That is, the company is not guilty of
cheating and lying. To test the claim of the soft-drink company, the null
hypothesis will be: the company’s claim will be true if µ = 12 ounces. Let µ be
the mean amount of soda in all cans. Thus, it will be written as, Ho: µ = 12
ounces.
The null hypothesis can also be written as µ > 12 ounces because the claim of
the company will still be true if the cans contain more than 12 ounces of soda.
The alternative hypothesis will be when the company’s claim is false and its
soft-drink cans contain less than 12 ounces of soda (that is, µ < 12 ounces). It
is written as H1: µ < 12 ounces.

7.2 Steps in Hypothesis testing


Hypothesis testing procedure contains the following five steps that will be
described next with the help of examples.

1. State the null and alternative hypotheses


2. Select the distribution to use
3. Determine the rejection and non-rejection regions
4. Calculate the value of the test statistic
5. Make a decision

7.3 Type I and type II errors (concepts)

Ideally the hypothesis testing procedure should lead to the acceptance of Ho


when Ho is true and the rejection of Ho when it is true. Unfortunately, this is
not always possible. Since hypothesis tests are based on sample information,
we must allow for the possible errors.
As we all know, court’s verdict is not always correct. If a person is declared
guilty at the end of a trial, there are two possibilities.

2
 The person has not committed the crime but is declared guilty (may be
because of false evidence).
 The person has committed the crime and is rightfully declared guilty.

In the first case, the court has made an error by punishing an innocent person.
In statistics, this kind of error is called a Type I or an  (alpha) error. In the
second case, the court decided to punish because the person is guilty.

Table 7.1: Type I and Type II errors


Actual situation of the person
Not Guilty Guilty
The person is not Correct Type II or B
Court’s guilty decision error
decision The person is guilty Type I or  Correct
error decision

A Type I error will occur when the null hypothesis is actually true but we
wrongfully reject it.

If the court declared that the person is not guilty at the end of the trial, such a
verdict does not indicate that the person has indeed not committed the crime.
Court decision may be resulted from two possible causes.
 The person has not committed the crime and is declared not guilty.
 The person has committed the crime but is declared not guilty because
of lack of enough evidence to prove the guilt.

In the first case, the court’s decision is correct. But in the second case the court
has committed an error by setting a guilty person free. In statistics, this type of
error is called a Type II or a β (beta) error.
A Type II error occurs when a false null hypothesis is not rejected.

Table 7.2: Type I and Type II errors presented alternatively


Actual situation (population
condition)
Ho is true(H1 is Ho is false (H1 is
False) true)
Decision Accept Ho Correct decision Type II or β error
(conclusion) Reject Ho Type I or  error Correct decision

3
7.4 One tailed \IS two tailed hypothesis tests
The first is that in a statistical test of hypothesis, the separation of the total
region into rejection and non-rejection regions is not arbitrary. Instead, it
depends on the value assigned to  (Type I error).

In statistics, the rejection region for hypothesis-testing problem can be on both


sides or on the left or on the right side of the nonrejection region.

A. Two tailed hypothesis test

A two-tailed test has rejection regions in both tails. A test with two rejection
regions in the distribution curve is called a two-tailed test.

Whether a test is two-tailed or one-tailed is determined by the sign in the


alternative hypothesis. If the alternative hypothesis has a ≠ sign, it is a two-
tailed test. A two-tailed hypothesis test has two critical values that separate the
two rejection regions from the non-rejection region. We will rejection Ho if the
value of x obtained from the sample falls in either of the two rejection regions.
We will accept Ho if the value of x lies in the nonrejection region. The area of
each of the two rejection regions is  /2 and the total area of both rejection
regions is  (the significance level) as shown in Fig. 7.1 . By rejecting Ho, we are
saying that the difference between the value of µ stated in Ho and the value of x
obtained from the sample is too large to have occurred because of the sampling
error alone. By not rejecting Ho, we are saying that the difference between the
value of µ stated in Ho and the value of x obtained from the sample is small
and it may have occurred because of the sampling error alone.

B. A left-tailed hypothesis test

A left-tailed test has the rejection region in the left tail of the distribution curve.
Reconsider the example of the mean amount of soda in all soft-drink cans
produced by a company. The soft-drink cans company claims that its can
production on average, contain 12 ounces of soda. However, if these cans
contain less than the claimed amount of soda, then the company can be
accused of cheating. Suppose a consumer agency wants to test whether the
mean amount of soda per can is less than 12 ounces. Note that the key phrase
this time is less than, which indicates a left-tailed test. Let µ be the mean
amount of soda in all cans.

Ho: µ > 12 ounces (The mean amount of soda in all cans is not less
than 12 ounces)
H1: µ < 12 ounces (The mean amount of soda in all cans is less
than 12 ounces)

4
When the alternative hypothesis has a less than (<) sign, the test is always left-
tailed as shown in figure 7.1 (b), and the area of this rejection region is equal to
 (the significance level). It has only one critical value.

C. A right-tailed hypothesis test

A right tailed test has the rejection region in the right tail of the distribution
curve. To illustrate this case, assume that the mean income of all households
is $120. Suppose we want to test if the current mean income of all households
is higher than $120. The key phrase in this case is higher than, which
indicates a right-tailed test. Let µ be the current mean income of all
households. The null and alternative hypotheses for this test as

Ho: µ < $120 (The current mean income of all households is not
higher than $120)
H1: µ > $120 (The current mean income of all households is higher
than $120)

When the alternative hypothesis has a greater than (>) sign, the test is always
right-tailed as shown in Figure 7.1(c), the area of this rejection region is equal
to  , the significance level. Like a left-tailed test, a right-tailed test has only one
critical value.

Rejection Rejection Rejection


Region(  /2) Region ( ) Region(  )
C1 µ C2 x C µ x µ C x
(a) A two tailed test (b) A left tailed test (c) A right tailed test
Fig 7.1: Tails of a test

Table 7.3 summarizes the discussions made about the relationship between
the signs in Ho and H1 and the tails of a test.
Table 7.3: The relations between Ho, H1, rejection region and the tails of a test
Two-tailed Left-tailed Right-tailed
test test test
Sign in the null hypothesis Ho = = or > = or <
Sign in the alternative  < >
hypothesis H1
Rejection region In both tails In the left tail In the right
tail

5
7.5 Hypothesis testing of: Population mean, proportion large samples
Remember that from the central limit theorem, the sampling distribution of x
is approximately normal for large samples (n > 30). Consequently, whether or
not σ is known, the normal distribution is used to test hypotheses about the
population mean when a sample size is large.

Example 1: The Tele Co. provides telephone service in an area. According to


the company’s records, the average length of all calls placed was 12.5 minutes.
The company’s management wanted to check if the mean length of the current
calls is different from 12.5 minutes. A sample of 150 such calls placed through
this Co. produced a mean length of 13 minutes with a standard deviation of 2.6
minutes. Using the 5% significance level, can you conclude that the mean
length of all current calls is different from 12.5 minutes? That is, test whether
or not the mean length of all current long distance calls is different from 12.5
minutes.

Given: Let µ be the mean length of all current calls placed through this
company.
n = 150, x = 13 minutes, and s = 2.6 minutes

The significance level  = 05 (that is, the probability of rejecting the null
hypothesis when it actually is true). This is the probability of making a
Type I error.

Step1: State the null and alternative hypotheses:


Ho: µ = 12.5 (The mean length of all current calls is 12.44 minutes)
H1: µ  12.5 (The mean length of all current calls is different from 12.5
minutes)

Step2: Select the distribution to use:


Because the sample size is large (n > 30), the sampling distribution of x is
(approximately) normal.

Step3: Determine the rejection and non rejection region:


The ≠ sign in the alternative hypothesis indicates that the test is two-tailed
with two rejection regions, one in each tail of the normal distribution curve of x .
Because the total area of both rejection regions is .05 (the significance level),
the area of the rejection region in each tail =  /2 = .05/2 = .025.

6
Next we find the z values for the two critical points using the area of the
rejection region. To find the z values for these critical points, we first find the
area between the mean and one of the critical points.That is, .5 - .025 = .4750.
Next we look for .4750 in the standard normal distribution table. The value of z
for .4750 is 1.96. Hence, the z values of the two critical points are -1.96 and
1.96.

Step 4: Calculate the value of the test statistic: If the value of the sample
mean x falls in either of the two rejection regions, we reject Ho. Otherwise, we
do not reject Ho. The value of x obtained from the sample is called the observed
value of x . To locate the position of x = 13 on the sampling distribution curve
of x , we first calculate the z value for x = 13. This is called the value of the test
statistic. Then, we compare the value of the test statistic with the two critical
values of z, -1.96 and 1.96. If the value of the test statistic is between 1.96 and
-1.96, do not reject Ho. If the value of the test statistic is either greater than
1.96 or less than -1.96, we reject Ho.

The value of x from the sample is 13. As σ is not known, we calculate the z
value using Sx as follows.

sx = σ/ n = 2.65/ 150 =.22


x   13  12.5
z= = = 2.27
sx .22
The value of µ in the calculation of the z value is substituted from the null
hypothesis. The value of z = 2.27 calculated for x is called the computed value
of the statistic z. This is the value of z that corresponds to the value of x
observed from the sample. It is also called the observed value of z.

Step5: Make a decision: In the final step we make a decision based on the
location of the value of the test statistic. z = 2.27 is greater than the critical
value of z = 1.96, and it falls in the rejection region in the right tail. Hence, we
reject Ho and conclude that based on the sample information, it appears that
the mean length of all such calls is not equal to 12.50 minutes.

Example 2: The mean family size before this year was 3. A researcher wanted
to check if the current mean family size is less than 3. A sample of 900 families
taken this year by this researcher produced a mean family size of 4 with a
standard deviation of 1. Using the .025 significance level, can we conclude that
the mean family size has declined?

7
Given: Let µ be the current mean size of all families and x be the mean family
size for the sample.
n = 900, x =4 and s = 1
The mean family size before this year was = 3
The significance level  = .025

Step1: State the null and alternative hypotheses:


Ho: µ = 3 (The mean family size has not declined)
H1: µ < 3 (The mean family size has declined)

Step2: Select the distribution to use: n>30, the sampling distribution of x is


(approximately) normal.

Step3: Determine the rejection and nonrejection regions: The < sign in the
alternative hypothesis indicates that the test is left-tailed with the rejection
region in the left tail of the sampling distribution curve of x . The critical value
of z, obtained from the normal table for .5 - .025 = .4750 is -1.96.

Step 4: Calculate the value of the test statistic: The value of the test statistic z
for x = 4 is calculated as follows.
sx = σ/ n = 1/ 900 =.03
x 43
z= = = 33.33
sx .03

Step 5: Make a decision: The value of the test statistic z = 33.33 are greater
than the critical value of z = -1.96 and it falls in the nonrejection region. As a
result, we fail to reject Ho. Consequently, we can state that based on the
sample information, it appears that the mean family size has not declined.

In studies published in various journals, authors usually use the terms


significantly different and not significantly different when deriving conclusions
based on hypothesis tests. These terms are short versions of the terms
statistically significantly different and statistically not significantly different.
The statement significantly different means that the difference between the
observed value of the sample mean x and the hypothesized value of the
population mean µ is so large that it probably did not occur because of the
sampling error alone. As a result the null hypothesis is rejected.

8
On the other hand, the statement not significantly different means that the
difference between the observed value of the sample mean x and the
hypothesized value of the population mean µ is so small that it may have
occurred just because of chance. As a result the null hypothesis is not rejected.
In the above example, we can conclude that the observed value (the current
mean family size) of x = 4 is not significantly different from the hypothesized
value of µ = 3.

You might also like