Tải bản đầy đủ (.pdf) (58 trang)

Quantitative Methods for Business chapter 17 potx

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (1016.25 KB, 58 trang )

CHAPTER
High performance –
statistical inference
for comparing
population means and
bivariate data
17
Chapter objectives
This chapter will help you to:
■ test hypotheses on the difference between two population
means using independent samples and draw appropriate
conclusions
■ carry out tests of hypotheses about the difference between two
population means using paired data and draw appropriate
conclusions
■ test differences between population means using analysis of
variance analysis (ANOVA) and draw appropriate conclusions
540 Quantitative methods for business Chapter 17
■ conduct hypothesis tests about population correlation coeffi-
cients and draw appropriate conclusions
■ produce interval estimates using simple linear regression
models
■ perform contingency analysis and interpret the results
■ use the technology; test differences between sample means,
apply correlation and regression inference, and contingency
analysis in EXCEL, MINITAB and SPSS
■ become acquainted with the business use of contingency
analysis
In the previous chapter we looked at statistical inference in relation to
univariate data, estimating and testing single population parameters
like the mean using single sample results. In this chapter we will con-


sider statistical inference methods that enable us to compare means of
two or more populations, to test population correlation coefficients, to
make predictions from simple linear regression models and to test for
association in qualitative data.
17.1 Testing hypotheses about two
population means
In section 16.3 of the previous chapter we looked at tests of the popu-
lation mean based on a single sample mean. In this section we will con-
sider tests designed to assess the difference between two population
means. In businesses these tests are used to investigate whether, for
instance, the introduction of a new logo improves sales.
To use these tests you need to have a sample from each of the two
populations. For the tests to be valid the samples must be random, but
they can be independent or dependent.
Independent samples are selected from each population separately.
Suppose a domestic gas supplier wanted to assess the impact of a new
charging system on customers’ bills. The company could take a ran-
dom sample of customers and record the size of their bills under the
existing charging system then, after the new system is introduced, take
another random sample of customers and record the size of their bills.
These samples would be independent.
Dependent samples consist of matched or paired values. If the gas
supplier took a random sample of customers and recorded the size of
their bills both before and after the introduction of the new charging
system they would be using a paired or dependent sample.
The choice of independent or dependent samples depends on the
context of the test. Unless there is a good reason for using paired data
it is better to use independent samples. We will begin by looking at tests
for use with independent samples and deal with paired samples later in
this section.

As with single sample tests, the size of the samples is important because
it determines the nature of the sampling distribution. In this section we
will assume that the population standard deviations are not known.
17.1.1 Large independent samples
The null hypothesis we use in comparing population means is based
on the difference between the means of the two populations, ␮
1
Ϫ ␮
2
.
The possible combinations of null and alternative hypotheses are shown
in Table 17.1.
The hypotheses listed in Table 17.1 all assume that the focus of the
test is that there is no difference between the population means. This
is very common but the same formats can be used to test whether the
difference between two population means is a non-zero constant, e.g.
H
0
: ␮
1
Ϫ ␮
2
ϭ 6.
If both samples contain 30 or more items the difference between
their means, x

1
Ϫ x

2

, belongs to the sampling distribution of X

1
Ϫ X

2
.
This sampling distribution is normally distributed with a mean of

1
Ϫ ␮
2
, and a standard error of:
where ␴
1
and ␴
2
are the standard deviations of the first and second
populations, and n
1
and n
2
are the sizes of the samples from the first
and second populations.


1
2
1
2

2
2
nn
ϩ
Chapter 17 Statistical inference: population means and bivariate data 541
Table 17.1
Types of hypotheses for comparing population means
Null hypothesis Alternative hypothesis Type of test
H
0
: ␮
1
Ϫ ␮
2
ϭ 0H
1
: ␮
1
Ϫ ␮
2
϶ 0 Two-sided
H
0
: ␮
1
Ϫ ␮
2
р 0H
1
: ␮

1
Ϫ ␮
2
Ͼ 0 One-sided
H
0
: ␮
1
Ϫ ␮
2
у 0H
1
: ␮
1
Ϫ ␮
2
Ͻ 0 One-sided
We will assume that the population standard deviations are not known,
in which case the estimated standard error of the sampling distribution is:
The test statistic is:
If the null hypothesis suggests that the difference between the popu-
lation means is zero, we can simplify this to:
Once we have calculated the test statistic we need to compare it to
the appropriate critical value from the Standard Normal Distribution.
z
xx
nn
( )
s
s

12
ϭ
Ϫ
ϩ
1
2
1
2
2
2
z
xx
nn
( ) ( )
s
s
12 12
ϭ
ϪϪϪ
ϩ
␮␮
1
2
1
2
2
2
s
s
1

2
1
2
2
2
nn
ϩ
542 Quantitative methods for business Chapter 17
Example 17.1
A national breakdown recovery service has depots at Oxford and Portsmouth. The mean
and standard deviation of the times that it took for the staff at the Oxford depot to assist
each of a random sample of 47 motorists were 51 minutes and 7 minutes respectively.
The mean and standard deviation of the response times recorded by the staff at the
Portsmouth depot in assisting a random sample of 39 customers were 49 minutes and
5 minutes respectively. Test the hypothesis that there is no difference between the mean
response times of the two depots. Use a 5% level of significance.
H
0
: ␮
1
Ϫ ␮
2
ϭ 0H
1
: ␮
1
Ϫ ␮
2
϶ 0
This is a two-tail test using a 5% level of confidence so the critical values are Ϯz

0.025
.
Unless the test statistic is below Ϫ1.96 or above ϩ1.96 the null hypothesis cannot be
rejected. The test statistic, 1.541, is within Ϯ1.96 so we cannot reject H
0
. The population
mean response times of the two breakdown services could be equal.
Test statistic,
51 4
2/1.298 1.541
z ϭ
Ϫ
ϩ
ϭϭ
9
7
47
5
39
22
Notice that in Example 17.1 we have not said anything about the dis-
tributions of response times. The Central Limit Theorem allows us to
use the same two-sample z test whatever the shape of the populations
from which the samples were drawn as long as the size of both samples
is 30 or more.
At this point you may find it useful to try Review Questions 17.1 to
17.3 at the end of the chapter.
17.1.2 Small independent samples
If the size of the samples you want to use to compare population means
is small, less than 30, you can only follow the procedure outlined in the

previous section if both populations are normal and both population
standard deviations known. In the absence of the latter it is possible to
test the difference between two population means using small inde-
pendent samples but only under certain circumstances.
If both populations are normal and their standard deviations can be
assumed to be the same, that is ␴
1
ϭ ␴
2
, we can conduct a two-sample
t test. We use the sample standard deviations to produce a pooled esti-
mate of the standard error of the sampling distribution of X

1
Ϫ X

2
, s
p
.
The test statistic is
We then compare the test statistic to the appropriate critical value from
the t distribution. The number of degrees of freedom for this test is
n
1
ϩ n
2
Ϫ 2, one degree of freedom is lost for each of the sample means.
t
xx

s
nn
( )
*
12
p
ϭ
Ϫ
ϩ
11
12
s
ns ns
nn
p
11
2
22
2
2
() ()
2
ϭ
ϪϩϪ
ϩϪ
11
1
Chapter 17 Statistical inference: population means and bivariate data 543
Example 17.2
A cereal manufacturer claims to use no more oats, the cheapest ingredient, in produc-

ing packets of ‘own-brand’ muesli for a supermarket chain than they use to produce
their own premium brand. The mean and standard deviation of the oat content by
weight of a random sample of 14 ‘own-brand’ packets are 34.9% and 1.4% respectively.
The mean and standard deviation of the oat content of a random sample of 17 premium
At this point you may find it useful to try Review Questions 17.4 to
17.6 at the end of the chapter.
17.1.3 Paired samples
If you want to test the difference between population means using
dependent or paired samples the nature of the data enables you to test
the mean of the differences between all the paired values in the popu-
lation, ␮
d
. This approach contrasts with the methods described in the
earlier parts of this section where we have tested the difference between
population means, ␮
1
Ϫ ␮
2
.
The procedure involved in testing hypotheses using paired samples
is very similar to the one-sample hypothesis testing we discussed in section
16.3 of Chapter 16. We have to assume that the differences between
the paired values are normally distributed with a mean of ␮
d
, and a
standard deviation of ␴
d
. The sampling distribution of sample mean
544 Quantitative methods for business Chapter 17
brand packets are 33.4% and 1.1% respectively. Test the hypothesis that the mean

oat content of the premium brand is no greater than the mean oat content of the
‘own-brand’ muesli using a 1% level of significance.
We will define ␮
1
as the population mean of the ‘own-brand’ and ␮
2
as the population
mean of the premium product.
H
0
: ␮
1
Ϫ ␮
2
р 0H
1
: ␮
1
Ϫ ␮
2
Ͼ 0
First we need the pooled estimate of the standard error:
Now we can calculate the test statistic:
This is a one-tail test so the null hypothesis will only be rejected if the test statistic
exceeds the critical value. From Table 6 on page 623 in Appendix 1, t
0.01,29
is 2.462. Since
the test statistic is greater than the critical value we can reject the null hypothesis at the
1% level. The difference between the sample means is very significant.
t

34.9 33.4
1.243 *
1
14
1
17
3.344
ϭ
Ϫ
ϩ
ϭ
s
p
22
(14 )1.4 (17 )1.1
17 2
1.243
ϭ
ϪϩϪ
ϩϪ
ϭ
11
14
differences will also be normally distributed with a mean of ␮
d
and a
standard error of ␴
d
/√n, where n is the number of differences in the
sample. Since we assume that ␴

d
is unknown we have to use the estimated
standard error s
d
/√n, where s
d
is the standard deviation of the sample
differences.
Typically samples of paired data tend to be small so the benchmark
distribution for the test is the t distribution. The test is therefore called
the paired t test. Table 17.2 lists the three possible combinations of
hypotheses.
The test statistic is:
where x

d
is the mean of the sample differences.
We then compare the test statistic to the appropriate critical value
from the t distribution with n Ϫ 1 degrees of freedom.
t
x
sn
dd
d
0
ϭ
Ϫ ␮

Chapter 17 Statistical inference: population means and bivariate data 545
Table 17.2

Types of hypotheses for the mean of the population of differences
Null hypothesis Alternative hypothesis Type of test
H
0
: ␮
d
ϭ ␮
d0
H
1
: ␮
d
϶ ␮
d0
(not equal) Two-sided
H
0
: ␮
d
р ␮
d0
H
1
: ␮
d
Ͼ ␮
d0
(greater than) One-sided
H
0

: ␮
d
у ␮
d0
H
1
: ␮
d
Ͻ ␮
d0
(less than) One-sided
In this table ␮
d0
represents the value of the population mean that is to be tested.
Example 17.3
A Business School claims that, on average, people who take their MBA programme will
enhance their annual salary by at least £8000. Each of a random sample of 12 graduates
of the programme were asked for their annual salary prior to beginning the programme
and their current annual salary. Use the sample data to test whether the mean difference
in annual earnings is £8000 or more using a 10% level of significance.
H
0
: ␮
d
у 8.00 H
1
: ␮
d
Ͻ 8.00
To conduct the test we first need to find the mean and standard deviation of the salary

differences in the sample.
Graduate 1 2 3 4 5 6 7 8 9 10 11 12
Prior salary (£000) 22 29 29 23 33 20 26 21 25 27 27 29
Current salary (£000) 31 38 40 29 41 25 29 26 31 37 41 36
Salary difference (£000) 9 9 11 6 8 5 3 5 6 10 14 7
546 Quantitative methods for business Chapter 17
The mean and standard deviation of the sample differences are 7.75 and 3.05, to
2 decimal places. The test statistic is:
From Table 6 on page 623, t
0.10,11
is 1.363. The alternative hypothesis is that the population
mean salary difference is less than £8000 so the critical value is Ϫ1.363. A sample mean
that produces a test statistic this low or lower would lead us to reject the null hypothesis.
In this case, although the sample mean is less than £8000, the test statistic, Ϫ0.28, is not
less than the critical value and the null hypothesis cannot be rejected. The population
mean of the salary differences could well be £8000.
t
7.75 8.00
12
0.25
0.88
0.284ϭ
Ϫ
ϭ
Ϫ
ϭϪ
305. √
At this point you may find it useful to try Review Questions 17.7 to
17.9 at the end of the chapter.
17.2 Testing hypotheses about more than

two population means – one-way ANOVA
In some investigations it is important to establish whether two random
samples come from a single population or from two populations with
different means. The techniques we looked at in the previous section
enable us to do just that. But what if we have three or more random
samples and we need to establish whether they come from populations
with different means?
You might think that the obvious answer is to run t tests using each
pair of random samples to establish whether the first sample came
from the same population as the second, the first sample came from
the same population as the third and the second sample came from the
same population as the third and so on. In doing this you would be
testing the hypotheses:
H
0
: ␮
1
ϭ ␮
2
H
0
: ␮
1
ϭ ␮
3
H
0
: ␮
2
ϭ ␮

3
etc.
Although feasible, this is not the best way to approach the investiga-
tion. For one thing the more random samples that are involved the
greater the chance that you miss out one or more possible pairings. For
another, each test you conduct carries a risk of making a type 1 error,
wrongly rejecting a null hypothesis because you happen to have a sample
result from an extreme end of its sampling distribution. The chance of
this occurring is the level of significance you use in conducting the test.
The problem when you conduct a series of related tests is that the
probability of making a type 1 error increases; if you use a 5% level of
significance then the probability of not making a type 1 error in a
sequence of three tests is, using the multiplication rule of probability,
0.95 * 0.95 * 0.95 or 0.857. This means the effective level of signifi-
cance is 14.3%, considerably greater than you might have assumed.
To establish whether more than two samples come from populations
with different means we use an alternative approach, analysis of variance,
usually abbreviated to ANOVA (analysis of variance). At first sight it
seems rather odd to be using a technique based on variance, a measure
of spread, to assess hypotheses about means, which are measures of loca-
tion. The reason for doing this is that it enables us to focus on the spread
of the sample means, after all the greater the differences between the
sample means the greater the chance that they come from populations
with different means. However, we have to be careful to put these dif-
ferences into context because, after all, we can get different samples
from the same population. Using ANOVA involves looking at the bal-
ance between the variance of the sample means and the variance in the
sample data overall. Example 17.4 illustrates why this is important.
Chapter 17 Statistical inference: population means and bivariate data 547
Example 17.4

The Kranilisha Bank operates cash dispensing machines in Gloucester, Huddersfield
and Ipswich. The amounts of cash dispensed (in £000s) at a random sample of machines
during a specific period were:
These are independent samples and so the fact that one sample (Huddersfield) con-
tains fewer values does not matter. The sample data are shown in the form of boxplots
in Figure 17.1.
The distributions in Figure 17.1 suggest that there are differences between the
amounts of cash dispensed at the machines, with those in Ipswich having the largest
turnover and those in Huddersfield having the smallest. The sample means, which are
represented by the dots, bear out this impression: 34 for Gloucester, 25 for Huddersfield
and 41 for Ipswich.
Gloucester 25 30 32 39 44
Huddersfield 17 25 27 31
Ipswich 29 34 44 47 51
In Example 17.4 the sample means are diverse enough and the dis-
tributions shown in Figure 17.1 distinct enough to indicate differences
between the locations, but is it enough to merely compare the sample
means?
548 Quantitative methods for business Chapter 17
Figure 17.1
Cash dispensed at machines in Gloucester, Huddersfield and Ipswich
IpswichHuddersfieldGloucester
50
40
30
20
Place
Cash dispensed (£000)
Example 17.5
IpswichHuddersfieldGloucester

65
55
45
35
25
15
Place
Cash dispensed (£000)
Figure 17.2
Revised amounts of cash dispensed at machines in Gloucester, Huddersfield and Ipswich
In Figure 17.2 the considerable overlaps between the data from the
three locations suggest that despite the contrasts in the means it is
more likely that the three samples come from the same population.
Concentrating on the means alone in this case would have led us to the
wrong conclusion.
So how we can test whether the three samples all come from the same
population, in other words that there is no difference between the pop-
ulation mean amounts of cash dispensed per period in the three
towns? For convenience we will use ␮
G
, ␮
H
and ␮
I
to represent the popu-
lation means for Gloucester, Huddersfield and Ipswich respectively.
The hypothesis we need to test is:
H
0
: ␮

G
ϭ ␮
H
ϭ ␮
I
The alternative hypothesis is that there is a difference between at least
two of the population means for the three towns.
If the null hypothesis is true and the three samples all come from a
single population the best estimate of the mean of that population is
the mean of the values in all three samples, the overall mean. Since we
already know the three sample means we can work this out by taking the
mean of the sample means, being careful to weight each mean by
the number of observations in the sample. In the first instance we will
use the original data from Example 17.4:
The test statistic we will use is based on comparing the variation
between the sample means with the variation within the samples. One
of the measures of variation or spread that we looked at in Chapter 6
x
(5 * 34) (4 * 25) (5 * 41) 475
33.929ϭ
ϩϩ
ϭϭ
14 14
Chapter 17 Statistical inference: population means and bivariate data 549
Many of the figures for the cash dispensing machines in Example 17.4 were recorded
incorrectly, although the means are correct. The amended figures are:
These revised figures are depicted in Figure 17.2.
Gloucester 14 21 32 49 54
Huddersfield 15 18 27 40
Ipswich 19 29 44 49 64

was the sample variance, the square of the sample standard deviation:
The basis of the variance is the sum of the squared deviations
between each observation and the sample mean. This amount, which
is usually abbreviated to the sum of squares, is used to measure variation
in analysis of variance. The sum of squares for the Gloucester sample,
which we will denote as SS
G
, is:
We can work out the equivalent figures for the Huddersfield and
Ipswich samples:
The sum of these three sums of squares is the sum of the squares
within the samples, SSW:
SSW ϭ SS
G
ϩ SS
H
ϩ SS
I
ϭ 226 ϩ 104 ϩ 338 ϭ 668
The measure we need for the variation between the sample means is
the sum of the squared deviations between the sample means and the
mean of all the observations in the three samples. This is the sum of
the squares between the samples, SSB. In calculating it we have to weight
each squared deviation by the sample size:
If we add the sum of squares within the samples, SSW, to the sum of
squares between the samples, SSB, the result is the total sum of squares
in the data, denoted by SST. The total sum of squares is also the sum of
SSB n x x n x x n x x ( )*( ) ( )*( ) ( )*( )
5*(34 33.929) 4 *(25 33.929) 5*(41 33.929)
568.929

GG
2
HH
2
III
2
222
ϭϪϩϪϩϪ
ϭϪ ϩϪ ϩϪ
ϭ
SS x x
i
n
IiI
2
1
22
222
( ) (29 41) (34 41)

(
44 41
)(
47 41
)(
51 41
)
338
ϭ ϪϭϪ ϩϪ
ϩϪ ϩϪϩϪ ϭ

ϭ

SS x x
i
i
n
HH
2
1
22
22
( ) (17 25) (25 25)
(27 25) (31 25) 104
ϭ Ϫ ϭϪ ϩϪ
ϩϪ ϩϪ ϭ
ϭ

SS
n
GiG
2
i1
22
222
(x x ) (25 34) (30 34)
(32 34) (39 34) (44 34)
81 16 4 25 100 226
ϭ Ϫ ϭϪ ϩϪ
ϩϪ ϩϪ ϩϪ
ϭϩϩϩϩ ϭ

ϭ

s
xx
n
i
i
n
2
2
1
1
ϭ
Ϫ
ϭ
()


550 Quantitative methods for business Chapter 17
the squared deviations between each observation in the set of three
samples and the mean of the combined data:
When you calculate a sample variance you have to divide the sum of
squared deviations by the sample size less one, n Ϫ 1. This is the number
of degrees of freedom left in the data; we lose one degree of freedom
because we use the mean in working out the deviations from it. Before
we can use the sums of squares we have determined above to test the
hypothesis of no difference between the population means we need to
incorporate the degrees of freedom associated with each sum of squares
by working out the mean sum of squares. This makes the variation within
the samples directly comparable to the variation between samples.

The mean sum of squares within the samples, MSW, is the sum of
squares within the samples divided by the number of observations in
all three samples, in this case 14, less the number of samples we have, 3.
You may like to think of subtracting three as reflecting our using the
three sample means in working out the sum of squares within the sam-
ples. If we use k to represent the number of samples we have:
The mean sum of squares between the samples, MSB, is the sum
of squares between the samples divided by the number of samples, k
minus one. We lose one degree of freedom because we have used the
overall mean to find the sum of squares between the samples.
The test statistic used to decide the validity of the null hypothesis is
the ratio of the mean sum of squares between samples to the mean sum
MSB
SSB
k 1
568.929
3 1
284.465ϭ
Ϫ
ϭ
Ϫ
ϭ
MSW
SSW
nk
668
14 3
60.727ϭ
Ϫ
ϭ

Ϫ
ϭ
SST (25 33.929) (30 33.929) (32 33.929)
(39 33.929) (44 33.929)
(17 33.929) (25 33.929) (27 33.929)
(31 33.929)
(29 33.929) (34 33.929) (44 33.929)
(47 33.929) (51 33.929)
79.719 15.434 3.719 25.719 101.434
286.577 79.719 48.005
222
22
222
2
222
22
ϭϪ ϩϪ ϩϪ
ϩϪ ϩϪ
ϩϪ ϩϪ ϩϪ
ϩϪ
ϩϪ ϩϪ ϩϪ
ϩϪ ϩϪ
ϩϩϩϩ
ϩϩϩϩ
=
8.5778.577
24.291 0.005 101.434 170.862 291.434
1236.929
668 568.929 1236.929
ϩϩϩϩϩ

ϭ
ϭ ϩϭϩ ϭSSW SSB
Chapter 17 Statistical inference: population means and bivariate data 551
of squares within the sample. Because the benchmark distribution we
shall use to assess it is the F distribution after its inventor, R. A. Fisher,
the test statistic is represented by the letter F :
Before comparing this to the F distribution it is worth pausing to con-
sider the meaning of the test statistic. If the three samples came from a
single population, in other words the null hypothesis is true, both the
MSB above the line, the numerator, and the MSW below the line, the
denominator, would both be unbiased estimators of the variance of that
population. If this were the case, the test statistic would be close to one.
If on the other hand the samples do come from populations with dif-
ferent means, in other words the null hypothesis is not true, we would
expect the MSB, the numerator, to be much larger than the denom-
inator. Under these circumstances the test statistic would be greater
than one.
In order to gauge how large the test statistic would have to be to lead
us to reject the null hypothesis we have to look at it in the context of
the F distribution. This distribution portrays the variety of test statistics
we would get if we compared all conceivable sets of samples from a sin-
gle population and worked out the ratio of MSB to MSW. Since neither
the MSB nor the MSW can be negative, as they are derived from squared
deviations, the F distribution consists of entirely positive values.
The version of the F distribution you use depends on the numbers of
degrees of freedom you use to work out the MSB and the MSW, respect-
ively the nominator and denominator of the test statistic. The F distri-
bution with 2 degrees of freedom in the numerator and 11 degrees of
freedom in the denominator, which is the appropriate version for the
bank data from Example 17.4, is shown in Figure 17.3.

We can assess the value of the test statistic for the data from Example
17.4 by comparing it with a benchmark figure or critical value from the
distribution shown in Figure 17.3. The critical value you use depends
on the level of significance you require. Typically this is 5% or 0.05.
The shaded area in Figure 17.3 is the 5% of the distribution beyond 3.98.
If the null hypothesis really were true we would only expect to have test
statistics greater than 3.98 in 5% of cases. In the case of Example 17.4
the test statistic is rather higher, 4.684, so the null hypothesis should be
rejected at the 5% level. At least two of the means are different.
In general, reject the null hypothesis if the test statistic is greater than
F
kϪ1, nϪk, ␣
, where k is the number of samples, n is the number of values in
the samples overall and ␣ is the level of significance. Note that this is a
F
MSB
MSW

284.465
4.684ϭϭ ϭ
60 727.
552 Quantitative methods for business Chapter 17
one-tail test; it is only possible to reject the hypothesis if the test statistic is
larger than the critical value you use. Values of the test statistic from the
left-hand side of the distribution are consistent with the null hypothesis.
Table 7 on page 624 in Appendix 1 contains details of the F distribu-
tion. You may like to check it to locate F
2, 11, 0.01
which is the value of F
with 2 numerator degrees of freedom and 11 denominator degrees of

freedom that cuts off a right-hand tail area of 1%, 7.21. This value is
greater than the test statistic for the data from Example 17.4 so we can-
not reject the null hypothesis at the 1% level of significance.
Chapter 17 Statistical inference: population means and bivariate data 553
Figure 17.3
The F distribution
with 2 (numerator)
and 11 (denominator)
degrees of freedom
6543210
F
Example 17.6
Use the revised bank data from Example 17.5 to test whether there are differences between
the population means of the amounts of cash dispensed in Gloucester, Huddersfield
and Ipswich.
The overall mean and the three sample means are exactly the same as those derived
from the data in Example 17.4 so the mean sum of squares between the samples is
unchanged, 284.465.
We need to calculate the sum of squares within the samples for the amended data:
SS x x
i
i
n
HH
1
2222
(15 25.0) (18 25.0) (27 25.0) (40 25.0) 378ϭ Ϫ ϭϪ ϩϪ ϩϪ ϩϪ ϭ
ϭ
()
2


SS x x
i
i
n
GG
1
22222
(14 34) (21 34) (32 34) (49 34) (54 34)
1198
ϭ Ϫ ϭϪ ϩϪ ϩϪ ϩϪ ϩϪ
ϭ
ϭ
()
2

554 Quantitative methods for business Chapter 17
In this case the test statistic is much lower than the critical value for a 5% level of sig-
nificance, 3.98, and the null hypothesis should not be rejected; it is a reasonable
assumption that these three samples come from a single population, confirming the
impression from Figure 17.2.
The test statistic,
284.465
1.115F ϭϭ
255 091.
SSW SS SS SS
MSW
1198 378 1230 2806
2806
11

255.091
GHI
ϭϩϩϭ ϩϩ ϭ
ϭϭ
SS x x
i
i
n
II
1
22222
(19 41) (29 41) (44 41) (49 41) (64 41)
1230
ϭ ϪϭϪ ϩϪ ϩϪ ϩϪ ϩϪ
ϭ
ϭ
()
2

There are several assumptions that apply when we use analysis of
variance to test differences between population means. To begin with
the populations from which the samples are drawn should be normal
and the populations should have the same variance. Furthermore, the
samples must be random and independent.
In this section we have used one-way analysis of variance; one-way
because we have only considered one factor, geographical location, in
our investigation. There may be other factors that may be pertinent to
our analysis, such as the type of location of the cash dispensers in
Example 17.4, i.e. town centre, supermarket, or garage. ANOVA is a
flexible technique that can be used to take more than one factor into

account. For more on its capabilities and applications see Roberts and
Russo (1999).
At this point you may find it useful to try Review Questions 17.10 to
17.12 at the end of the chapter.
17.3 Testing hypotheses and producing
interval estimates for quantitative
bivariate data
In this section we will look at statistical inference techniques that enable
you to estimate and test relationships between variables in populations
based on sample data. The sample data we use to do this is called
bivariate data because it consists of observed values of two variables.
This sort of data is usually collected in order to establish whether there
is a relationship between the two variables, and if so, what sort of
relationship it is.
Many organizations use this type of analysis to study consumer behav-
iour, patterns of costs and revenues, and other aspects of their opera-
tions. Sometimes the results of such analysis have far-reaching
consequences. For example, if you look at a tobacco product you will
see a health warning prominently displayed. It is there because some
years ago researchers used these types of statistical methods to establish
that there was a relationship between tobacco consumption and certain
medical conditions.
The quantitative bivariate analysis that we considered in Chapter 7
consisted of two related techniques: correlation and regression.
Correlation analysis, which is about calculating and evaluating the cor-
relation coefficient, enables you to tell whether there is a relationship
between the observed values of two variables and how strong it is.
Regression analysis, which is about finding lines of best fit, enables you
to find the equation of the line that is most appropriate for the data,
the regression model.

Here we will address how the results from applying correlation and
regression to sample data can be used to test hypotheses and make esti-
mates for the populations the sets of sample data belong to.
17.3.1 Testing the population correlation coefficient
The sample correlation coefficient, represented by the letter r,
measures the extent of the linear association between a sample of obser-
vations of two variables, X and Y. You can find the sample correlation
coefficient of a set of bivariate data using the formula:
where
and s
x
and s
y
are the standard deviations of the x and y values
respectively.
Cov
( )( )
1
XY
xxyy
n
ϭ
⌺Ϫ Ϫ
Ϫ()
r
ss
XY
xy
Cov
ϭ

(*)
Chapter 17 Statistical inference: population means and bivariate data 555
If we select a random sample from populations of X and Y that
are both normal in shape, the sample correlation coefficient will be an
unbiased estimate of the population coefficient, represented by the Greek
r, the letter rho, ␳. In fact the main reason for calculating the sample
correlation coefficient is to assess the linear association, if any, between
the X and Y populations.
The value of the sample correlation coefficient alone is some help in
assessing correlation between the populations, but a more thorough
approach is to test the null hypothesis that the population correlation
coefficient is zero:
H
0
: ␳ ϭ 0
The alternative hypothesis you use depends on what you would like
to show. If you are interested in demonstrating that there is significant
correlation in the population, then use:
H
1
: ␳ ϶ 0
If you want to test for significant positive correlation in the population
then:
H
1
: ␳ Ͼ 0
If you want to test for significant negative correlation in the population
then:
H
1

: ␳ Ͻ 0
If we adopt the first of these, H
1
: ␳ ϶ 0, we will need to use a two-tail
test, if we use one of the other forms we will conduct a one-tail test. In
practice it is more usual to test for either positive or negative correl-
ation rather than for both.
Once we have established the nature of our alternative hypothesis
we need to calculate the test statistic from our sample data. The test
statistic is:
Here r is the sample correlation coefficient and n is the number of
pairs of observations in the sample.
As long as the populations of X and Y are normal the test statistic will
belong to a t distribution with n Ϫ 2 degrees of freedom and a mean of
zero, if the null hypothesis is true and there is no linear association
between the populations of X and Y.
t
rn
r
2
1
2
ϭ
Ϫ
Ϫ
556 Quantitative methods for business Chapter 17
At this point you may find it useful to try Review Questions 17.13 to
17.15 at the end of the chapter.
17.3.2 Testing regression models
The second bivariate quantitative technique we looked at in Chapter 7

was simple linear regression analysis. This allows you to find the equa-
tion of the line of best fit between two variables, X and Y. Such a line
has two distinguishing features, its intercept and its slope. In the standard
Chapter 17 Statistical inference: population means and bivariate data 557
Example 17.7
A shopkeeper wants to investigate the relationship between the temperature and the
number of cans of soft drinks she sells. The maximum daytime temperature (in degrees
Celsius) and the soft drinks sales on 10 working days chosen at random are:
The sample correlation coefficient is 0.871. Test the hypothesis of no correlation
between temperature and sales against the alternative that there is positive correlation
using a 5% level of significance.
We need to compare this test statistic to the t distribution with n Ϫ 2, in this case 8,
degrees of freedom. According to Table 6 on page 623 in Appendix 1 the value of t with
8 degrees of freedom that cuts off a 5% tail on the right-hand side of the distribution,
t
0.05,8
, is 1.860. Since the test statistic is larger than 1.860 we can reject the null hypo-
thesis at the 5% level of significance. The sample evidence strongly suggests positive
correlation between temperature and sales in the population.
The test statistic,
2
1
0.871* 1 2
1 0
5.02
2
t
rn
r
ϭ

Ϫ
Ϫ
ϭ
Ϫ
Ϫ
ϭ
0
871
2
.
Temperature Cans sold
14 19
11 29
17 47
812
20 45
13 41
24 67
310
16 28
521
formula we used the intercept is represented by the letter a and the
slope by the letter b:
Y ϭ a ϩ bX
The line that this equation describes is the best way of representing the
relationship between the dependent variable, Y, and the independent
variable, X. In practice it is almost always the result of a sample investi-
gation that is intended to shed light on the relationship between the
populations of X and Y. That is why we have used ordinary rather than
Greek letters in the equation.

The results of a sample investigation can provide you with an under-
standing of the relationship between the populations. The intercept
and slope of the line of best fit for the sample are point estimates for the
intercept and slope of the line of best fit for the populations, which are
represented by the Greek equivalents of a and b, ␣ and ␤:
Y ϭ ␣ ϩ ␤X
The intercept and slope from the sample regression line can be used to
test hypotheses about the equivalent figures for the populations. Typically
we use null hypotheses that suggest that the population values are zero:
H
0
: ␣ ϭ 0 for the intercept
and
H
0
: ␤ ϭ 0 for the slope.
If the population intercept is zero, the population line of best fit will
be represented by the equation Y ϭ 0 ϩ ␤X, and the line will begin at
the origin of the graph. You can see this type of line in Figure 17.4.
If we wanted to see whether the population intercept is likely to be
zero, we would test the null hypothesis H
0
: ␣ ϭ 0 against the alternative
hypothesis:
H
1
: ␣ ϶ 0
558 Quantitative methods for business Chapter 17
Figure 17.4
Line with zero

intercept,
Y ϭ 0 ϩ ␤X
Y
0
0 X
When you use regression analysis you will find that investigating the
value of the intercept is rarely important. Occasionally it is of interest, for
instance if we are looking at the relationship between an organization’s
levels of operational activity and its total costs at different periods of time
then the intercept of the line of best fit represents the organization’s
fixed costs.
Typically we are much more interested in evaluating the slope of the
regression line. The slope is pivotal; it tells us how the dependent vari-
able responds to changes in the independent variable. For this reason
the slope is also known as the coefficient of the independent variable.
If the population slope turns out to be zero, it tells you that the
dependent variable does not respond to the independent variable.
The implication of this is that your independent variable is of no use in
explaining how your dependent variable behaves and there would be
no point in using it to make predictions of the dependent variable.
If the slope of the line of best fit is zero, the equation of the line
would be Y ϭ ␣ ϩ 0X, and the line would be perfectly horizontal. You
can see this illustrated in Figure 17.5.
The line in Figure 17.5 shows that whatever the value of X, whether
it is small and to the left of the horizontal axis or large and to the right
of it, the value of Y remains the same. The size of the x value has no
impact whatsoever on Y, and the regression model is useless.
We usually want to use regression analysis to find useful rather than
useless models – regression models that help us understand and antici-
pate the behaviour of dependent variables. In order to demonstrate that

a model is valid, it is important that you test the null hypothesis that the
slope is zero. Hopefully the sample evidence will enable you to reject the
null hypothesis in favour of the alternative, that the slope is not zero.
The test statistic used to test the hypothesis is:
t
b
s
b
ϭ
Ϫ 0
Chapter 17 Statistical inference: population means and bivariate data 559
Figure 17.5
Line with zero
slope, Y ϭ ␣ ϩ 0X
Y
X
Where b is the sample slope, 0 is the zero population slope that the null
hypothesis suggests, and s
b
is the estimated standard error of the sampling
distribution of the sample slopes.
To calculate the estimated standard error, s
b
, divide s, the standard
deviation of the sample residuals, the parts of the y values that the line
of best fit does not explain, by the square root of the sum of the squared
deviations between the x values and their mean, x

.
Once we have the test statistic we can assess it by comparing it to

the t distribution with n Ϫ 2 degrees of freedom, two fewer than the
number of pairs of x and y values in our sample data.
s
s
xx
b
( )
2
ϭ
Ϫ∑
560 Quantitative methods for business Chapter 17
Example 17.8
The equation of the line of best fit for the sample data in Example 17.7 is:
Sales ϭ 0.74 ϩ 2.38 Temperature
Test the hypothesis that the population slope is zero using a 5% level of significance.
H
0
: ␤ ϭ 0H
1
: ␤ ϶ 0
To find the test statistic we first need to calculate the standard deviation of the
residuals. We can identify the residuals by taking each x value, putting it into the equation
of the line of best fit and then working out what Y ‘should’ be, according to the model.
The difference between the y value that the equation says should be associated with the
x value and the y value that is actually associated with the x value is the residual.
To illustrate this, we will look at the first pair of values in our sample data, a day when
the temperature was 14° and 19 cans of soft drink were sold. If we insert the tempera-
ture into the equation of the line of best fit we can use the equation to estimate the
number of cans that ‘should’ have been sold on that day:
Sales ϭ 0.74 ϩ (2.38 * 14) ϭ 34.06

The residual is the difference between the actual sales level, 19, and this estimate:
residual ϭ 19 Ϫ 34.06 ϭϪ15.04
The standard deviation of the residuals is based on the squared residuals. The
residuals and their squares are:
Temperature Sales Residuals Squared residuals
14 19 Ϫ15.04 226.23
11 29 2.10 4.39
(Continued)
Chapter 17 Statistical inference: population means and bivariate data 561
We find the standard deviation of the residuals by taking the square root of the sum
of the squared residuals divided by n, the number of residuals, minus 2. (We have to
subtract two because we have ‘lost’ 2 degrees of freedom in using the intercept and
slope to calculate the residuals.)
To get the estimated standard error we divide this by the sum of squared differences
between the temperature figures and their mean.
The estimated standard error is:
and the test statistic t ϭ (b Ϫ 0)/s
b
ϭ 2.38/0.4738 ϭ 5.02
From Table 6, the t value with 8 degrees of freedom that cuts off a tail area of 2.5%,
t
8,0.025
, is 2.306. If the null hypothesis is true and the population slope is zero only 2.5%
of test statistics will be more than 2.306 and only 2.5% will be less than Ϫ2.306. The
level of significance is 5% so our decision rule is therefore to reject the null hypothesis
if the test statistic is outside Ϯ2.306. Since the test statistic in this case is 5.02 we should
reject H
0
and conclude that the evidence suggests that the population slope is not zero.
ss xx

b
( ) 9.343 0.4738
2
ϭϪϭ ϭ∑ 388 90.
sn 698.33 2 698.33 9.343ϭϪϭϭ() 8
Temperature Sales Residuals Squared residuals
17 47 5.82 33.91
812Ϫ7.77 60.35
20 45 Ϫ3.31 10.98
13 41 9.34 87.20
24 67 9.17 84.12
3 10 2.13 4.52
16 28 Ϫ10.80 116.61
5 21 8.37 70.02
698.33
Temperature (x) x

x Ϫ x

(x Ϫ x

)
2
14 13.1 0.9 0.81
11 13.1 Ϫ2.1 4.41
17 13.1 3.9 15.21
8 13.1 Ϫ5.1 26.01
20 13.1 6.9 47.61
13 13.1 Ϫ0.1 0.01
24 13.1 10.9 118.81

3 13.1 Ϫ10.1 102.01
16 13.1 2.9 8.41
5 13.1 Ϫ8.1 65.61
388.90
The implication of the sort of result we arrived at in Example 17.8 is
that the model, represented by the equation, is sufficiently sound to
enable the temperature variable to be used to predict sales.
If you compare the test statistic for the sample slope in Example 17.8
with the test statistic for the sample correlation coefficient in Example 17.7,
you will see that they are both 5.02. This is no coincidence; the two tests
are equivalent. The slope represents the form of the association between
the variables whereas the correlation coefficient measures its strength. We
use the same data in the same sort of way to test both of them.
17.3.3 Constructing interval predictions
When you use a regression model to make a prediction, as we did in
Example 17.8 to obtain the residuals, you get a single figure that is the
value of Y that the model suggests is associated with the value of X that
you specify.
562 Quantitative methods for business Chapter 17
Example 17.9
Use the regression model in Example 17.8 to predict the sales that will be achieved on
a day when the temperature is 22° Celsius.
If temperature ϭ 22, according to the regression equation:
Sales ϭ 0.74 ϩ 2.38 (22) ϭ 53.1.
Since the number of cans sold is discrete, we can round this to 53 cans.
The problem with single-figure predictions is that we do not know
how likely they are to be accurate. It is far better to have an interval that
we know, with a given level of confidence, will be accurate.
Before looking at how to produce such intervals, we need to clarify
exactly what we want to find. The figure we produced in Example 17.9

we described as a prediction of sales on a day when the temperature is
22°. In fact, it can also be used as an estimate of the mean level of sales
that occur on days when the temperature is 22°. Because it is a single
figure it is a point estimate of the mean sales levels on such days.
We can construct an interval estimate, or confidence interval, of the
mean level of sales on days when the temperature is at a particular level
by taking the point estimate and adding and subtracting an error. The
error is the product of the standard error of the sampling distribution
of the point estimates and a figure from the t distribution. The t distri-
bution should have n Ϫ 2 degrees of freedom, n being the number
of pairs of data in our sample, and the t value we select from it is based
on the level of confidence we want to have that our estimate will be
accurate.
We can express this procedure using the formula:
Here y

is the point estimate of the mean of the y values associated with
the x value of interest, x
0
, and s is the standard deviation of the sample
residuals.
Confidence interval
( )
( )
2, 2
0
2
2
ϭϮ ϩ
Ϫ

⌺Ϫ
Ϫ
ˆ*yt s
n
xx
xx
n␣
1
Chapter 17 Statistical inference: population means and bivariate data 563
Example 17.10
Construct a 95% confidence interval for the mean sales of soft drinks that the shop-
keeper in Example 17.7 can expect on days when the temperature is 22° Celsius.
From Example 17.9 the point estimate for the mean, y

, is 53.1 cans. We can use the
precise figure because the mean, unlike sales on a particular day, does not have to
be discrete. We also know from Example 17.9 that s, the standard deviation of the sample
residuals, is 9.343, x

is 13.1 and ⌺(x Ϫ x

)
2
is 388.90.
The t value we need is 2.306, the value that cuts off a tail of 2.5% in the t distribution
with 10 Ϫ 2 ϭ 8 degrees of freedom. The value of x
0
, the temperature on the days whose
mean sales figure we want to estimate, is 22.
Confidence interval

( )
( )
53.1 2.306 * 9.343 (22 13.1)
53.1 11.873 41.227 to 64.973
2, 2
0
2
2
2
ϭϮ ϩ
Ϫ
⌺Ϫ
ϭϮ ϩϪ
ϭϮ ϭ
Ϫ
ˆ*
[( / / . )]
yt s
n
xx
xx
n␣
1
1 10 388 90
The confidence interval we produced in Example 17.10 is a reliable
guide to what the mean sales are on days when the temperature is 22°.
This is because, although this level of temperature is not amongst the
temperature values in our sample data, it is within the range of the
temperatures in our sample data, which is from 3° to 24°.
If we produce a confidence interval for the mean of the y values associ-

ated with an x value outside the range of x values in the sample it will be
both wide and unreliable.

×