ST130 - CHP 11
ST130 - CHP 11
Objectives
After completing this chapter, you should be able to:
1. Test the difference between two sample means using, the z-test.
2. Test the difference between two means for independent samples, using the t-test.
11.1 Introduction
The basic concepts of hypothesis testing were explained in Chapter 8. With the z and t tests, a sample
mean or proportion can be compared to a specific population mean or proportion.
There are, however, many instances when the researchers wish to compare two sample means, using
experiments and control groups. For example, the average lifetimes of two different brands of bus tires
might be compared to see whether there is any difference in the tread wear. Two different brands of
fertilizer might be tested to see whether one is better than the other for growing plants.
In comparing of the means, the same basic steps for hypothesis testing are used and z and t-tests are
also used. When comparing two means by using t-test, the researcher must decide whether the samples
are independent or dependent.
To test the difference between two means we have to know whether the two samples drawn from the
populations are dependent or independent, large or small and the population standard deviations
known or unknown.
11.2.2 Hypothesis
If we wish to decide whether the means of the populations from where two independent samples were
selected are really different or same, then the null hypothesis is H 0 : 1 2 (i.e. the means are not
different) and the alternative hypothesis could be any one of the following:
Test Statistic
The value of test statistic if 1 and 2 are known:
z
X 1 X 2 1 2
.
12 22
n1 n2
If 1 and 2 are known but the sample sizes are small (population normally distributed) the value of test
statistic will be same.
12 22 12 22
X 1 X 2 Z /2 n1
n2
1 2 X 1 X 2 Z /2
n1
n2
.
A survey found that the average hotel room rate in FJ is $88.42 and the average room rate in NZ is
$80.61. Assume that the data were obtained from two samples of 50 hotels each and that the population
standard deviations were $5.62 and $4.83 respectively. At = 0.05, can it be concluded that there is no
significant difference in the rates?
SOLUTION
We need to test here, 1 2 (claim), which should be stated in null hypothesis.
−1.96 1.96
z
X 1 X 2 1 2
8842 8061 0 745
2
2
5622 4832
1
2
50 50
n1 n2
SOLUTION
A. The P-value is approximately equal to 0. Since the P-value is less than 0.05, we reject null hypothesis.
B. Since α = 0.05, we have to construct 95% confidence level of 1 2 . Substituting into the formula
one gets:
8842 8061 1.96 5622 4832 8842 8061 1.96 5622 4832
1 2
50 50 50 50
5.76 1 2 9.86.
Since the confidence interval does not contain zero, one would reject the null hypothesis.
EXAMPLE 11−3
The data shown are the rental fees (in dollars) for two random samples of apartment in a large city. At
𝛼 = 0.10, can it be concluded that the average rental fees for apartments in the east are greater than
the average rental fee in the west? Assume 1 119 and 2 103 .
East West
495 390 540 445 420 525 400 310 375 750
410 550 499 500 550 390 795 554 450 370
389 350 450 530 350 385 395 425 500 550
375 690 325 350 799 380 400 450 365 425
475 295 350 485 625 375 360 425 400 475
275 450 440 425 675 400 475 430 410 450
625 390 485 550 650 425 450 620 500 400
685 385 450 550 425 295 350 300 360 400
SOLUTION
Critical
Acceptance
region
region
1.28
z
X 1 X 2 1 2
477.43 437.35 0 1.61
12 22 1192 1032
40 40
n1 n2
Test Statistic
The value of test statistic is:
t
X 1 X 2 1 2
s12 s22
n1 n2
s12 s22 s 2 s2
X 1 X 2 t /2 1 2 X1 X 2 t /2 1 2 .
n1 n2 n1 n2
EXAMPLE 11−4
The average size of a farm in Ba is 191 acres. The average size of a farm in Nadi is 199 acres. Assume
the data were obtained from two samples with standard deviations of 32 and 12 acres, respectively and
sample sizes 8 and 10, respectively. Can it be concluded at = 0.05 that the average size of the farm
in the two districts in Fiji is different? Assume the populations are normally distributed.
SOLUTION
Critical Critical
region Acceptance region
region
−2.365 2.365
t
X 1 X 2 1 2
191 199 0
0.67.
s12 s22 322 122
8 10
n1 n2
EXAMPLE 11−5
The mean age of a sample of 25 people who were playing soccer is 48.7 years, and standard deviation
is 6.8 years. The mean age of a sample of 35 people who were playing rugby is 55.3 years with a standard
deviation is 3.2 years. Can it be concluded at = 0.05 that the mean age of those playing soccer is less
than those playing rugby. Assume the populations are normally distributed.
SOLUTION
Critical Acceptance
region region
−1.711
t
X 1 X 2 1 2
48.7 55.3 0
4.509.
s12 s22 6.82 3.22
25 35
n1 n2
EXERCISES
1. A researcher claims that the average yearly earnings of male college graduates (with at least a
bachelor’s degree) is different from the average yearly earnings of female college graduates with the
same qualifications. Based on the results below, can it be concluded that there is difference in mean
earnings between male and female college graduates? Use the 0.01 level of significance.
Male Female
Sample mean $59,235 $52,487
Population standard deviation $8,945 $10,125
Sample size 40 35
2. A researcher wishes to see if there is a difference in the cholesterol levels of two groups of men. A
random sample of 30 men between the ages of 25 and 40 is selected and tested; the average
cholesterol level was 223 with standard deviation of 6.1. A second sample of 25 men between ages
of 41 and 56 is selected and tested; the average cholesterol level for this group was 229 with standard
deviation of 5.8. Assume the populations are normally distributed and the population standard
deviations are unequal. At 0.01, is there a difference in the cholesterol levels between the two
groups? Use traditional method.
3. The mean height of 20 male athletes in Fiji was 68.2 inches, while 20 male non- athletes in Fiji had
a mean height of 67.5 inches and that the population standard deviations were 2.5 inches and 2.8
inches, respectively. Assume the populations are normally distributed. Test the hypothesis that
athletes are taller than non- athletes at 5% level of significance, using:
A. P-value method.
B. Verify the solution in Part A using confidence interval method.
4. A sample of 35 chemists from Lautoka city shows an average salary of $39,420 with a standard
deviation of $1659, while a sample of 40 chemists from Suva city has an average salary of $30,215
with a standard deviation of $4116. Is there a significant difference between the two cities chemists’
salaries at 0.02?
5. A researcher claims that the mean of the salaries of primary school teachers is greater than the mean
of the salaries of secondary school teachers in Fiji. The mean of the salaries of a sample of 26 primary
school teachers is $48,256, and the sample standard deviation is $3,912.40. The mean of the salaries
of a sample of 24 secondary school teachers is $45,633, and the sample standard deviation is
$5,533. Assume the populations are normally distributed and the population standard deviations are
unequal. At = 0.05 can it be concluded that the mean of the salaries of the primary school teachers
is greater than the mean of the salaries of the secondary school teachers?