Comparing Two Means

Download Report

Transcript Comparing Two Means

Business Statistics for Managerial
Decision
Comparing two Population Means
Comparing Two means

How do small businesses that fail differ
from those that succeed?


Business school researchers compare two
samples of firms started in 2000, one sample of
failed businesses and one of firms that are still
going after two years.
This study compares two random samples, one
from each of two different populations.
Two-Sample problems



The goal of inference is to compare the
responses in two groups
Each group is considered to be a sample
from a distinct population.
The responses in each group are
independent of those in other group
Two-Sample problems

Notation



We have two independent samples, from two distinct
populations (such as failed businesses and successful
businesses).
We measure the same variable (such as initial capital)
in both samples
We call the variable x1 in the first population and x2 in
the second population.
Population
1
2
Variable
x1
x2
Mean
1
2
Standard deviation
1
2
Two-Sample problems


We want to compare the two population means,
either by giving a confidence interval for 1-2
or by testing the hypothesis of no difference,
H0:1=2.
We base inference on two independent SRSs,
one from each population.
Population
1
2
Sample size
n1
n2
Sample
mean
x1
x2
Sample
standard deviation
s1
s2
The Two-Sample z Statistic


The natural estimator of the difference 1-2 is the
difference between the sample means x1  x2 .
To base inference on this statistic we need to
know its sampling distribution.



The mean of the difference x1  x2 is the difference of
the means 1-2.
Because the samples are independent, their sample
means x1 and x2 are independent.
The variance of the x1  x2 is the sum of their
variances which is  2  2
1
n1

2
n2
The Two-Sample z Statistic

Suppose that x1 is the mean of a SRS of size n1
drawn from a N(1, 1) population and that x2 is
the mean of an independent SRS of size n2 drawn
from a N(2, 2) population. Then the two-sample
z statistic
z
( x1  x2 )  ( 1   2 )
 12
n1

 22
n2
has the standard Normal (0, 1) sampling
distribution.
The Two-Sample t Procedures



In practice, the two population standard deviations 1 and
2 are not known
We estimate them by sample standard deviations s1 and s2
from our two samples.
The two-sample t statistic:
t


( x1  x2 )  ( 1  2 )
s12 s22

n1 n2
This statistic does not have a t distribution.
We can approximate the distribution of the two-sample t
statistic by using the t(k) distribution with an
approximation for the degrees of freedom k.
The Two-Sample t Procedures


We use the approximation to find approximate
value of t* for confidence intervals and to find
approximate P-values for significance tests.
This can be done in two ways:


Scatterwait approximation to calculate a value of k
from data. In general, the resulting k will not be a
whole number.
Use degrees of freedom k equal to the smaller of n1-1
and n2-1.
The Two-Sample t Significance Test

Draw a SRS of size n1 from a Normal population
with unknown mean 1 and an independent SRS
of size n2 from another Normal population with
unknown 2. To test the hypothesis H0: 1-2= 0,
compute the two-sample t statistic
t

( x1  x2 )  ( 1  2 )
s12 s22

n1 n2
And use P-values or critical values for the t(k)
distribution, where the degree of freedom k are the
smaller of n1-1 and n2-1.
Example: Is our product effective?

A company that sells educational materials
reports statistical studies to convince
customers that its materials improve
learning. One new product supplies
”directed reading activities” for class room
use. These activities should improve the
reading ability of elementary school pupils.
Example: Is our product effective?

A consultant arranges for a third-grad class of 21
students to take part in these activities for an
eight-week period. A control classroom of 23
third-graders follows the same curriculum without
the activities. At the end of the eight weeks, all
students are given a Degree of Reading Power
(DRP) test, which measures the aspects of reading
ability that the treatment is designed to improve.
The data appear in table 7.3.
Example: Is our product effective?
Example: Is our product effective?

A back to back
stemplot suggests that
there is a mild outlier
in the control group
but no deviation from
Normality serious
enough to forbid use
of t procedure.
Example: Is our product effective?

The summary statistics are
x
Group
n
Treatment
Control

21
23
51.48
41.52
s
11.01
17.15
We hope to show that the treatment (group 1) is
better than the control (group 2), therefore the
hypotheses are
H0: 1= 2
Ha: 1 > 2
Example: Is our product effective?

The two-sample t statistic is
t

x1  x2
s12 s22

n1 n2
51.48  41.52
2
(11.01)
(17.15)

21
23
2
 2.31
Example: Is our product effective?

The P-value for the one-sided test is
P (t  2.31)


The degrees of freedom k are equal to the smaller
of n1-1= 21-1=20 and n2-1=23-1=22 comparing
t= 2.31 with entries in t-table for 20 degrees of
freedom, we see that P lies between .02 and .01.
Conclusion

The data strongly suggest that directed reading activity
improves the DRP score.
The Two Sample t Confidence Interval


The same ideas that we used for the two-sample t
significance test can apply to give us two-sample t
confidence interval.
Draw a SRS of size n1 from a Normal population with
unknown mean 1 and an independent SRS of size n2 from
another Normal population with unknown mean 2. The
confidence interval for 1- 2 given by
s12 s22
( x1  x2 )  t *

n1 n2

t* is the value for t(k) density curve with area C between
–t* and t*. The value of the degrees of freedom k is
approximated by software or we use the smaller of n1-1
and n2-1.
Example:How much improvement?

We will find a 95% confidence interval for the mean
improvement in the entire population of third-graders. The
interval is
s12 s22
( x1  x2 )  t *

n1 n2
(11.01) 2 (17.15) 2
 (51.48  41.52)  t *

21
23

Using t(20) distribution, t-table gives t* = 2.086
(51.48  41.52)  2.086
(11.01) 2 (17.15) 2

21
23
9.96  2.086  4.31
9.96  8.99  (1.0, 18.9)

We estimate the mean improvement in DRP scores to be about 10
point, but with a margin of error of almost 9 points.
The Pooled Two-sample t Procedures





There is one situation in which a t statistic for comparing
two means has exactly a t distribution.
Suppose that the two Normal population distribution have
the same standard deviation.
Call the common standard deviations . Both sample
variances s12 and S22 estimate 2.
The best way to combine these two estimates is to average
them with weights equal to their degrees of freedom.
The resulting estimate of 2 is
(n1  1) s12  (n2  1) s22
s 
n1  n2  2
2
p
The Pooled Two-sample t Procedures


Sp2 is called the pooled estimator of 2.
When both populations have variance 2, the addition rule
for variance says that x1  x2 has variance equal to the sum
of the individual variances
2
n1


2
n2
  2(
1 1
 )
n1 n2
Now we can substitute sp2 in the test statistic, and the
resulting t statistic has a t distribution.
SEˆ ( x1  x2 )  s p
1 1

n1 n2
The Pooled Two-sample t Procedures

Draw a SRS of size n1 from a Normal population with
unknown mean 1 and an independent SRS of size n2 from
another Normal population with unknown mean 2.
Suppose that the two populations have the same unknown
standard deviation. A level C confidence interval for 1- 2
is
1 1
( x1  x2 )  t * s p
n1

n2
Here t* is the value for the t(n1+n2 -2) density curve with
area C between -t* and t*.
The Pooled Two-sample t Procedures

To test the hypothesis H0: 1=2, compute
the pooled two-sample t statistic
t
x1  x2
1 1
sp

n1 n2
and use P-values from the t(n1+ n2 - 2)
distribution.
Healthy Companies versus Failed Companies




In what ways are companies that fail different
from those that continue to do business?
To answer this question, one study compared
various characteristics of 68 healthy and 33 failed
firms.
One of the variables was the ratio of current assets
to current liabilities.
The data appear in table 7.4.
Healthy Companies versus Failed Companies
Healthy Companies versus Failed Companies



First let’s Look at the data.
Histograms for the two groups
of firms superimposed with a
Normal curve with mean and
standard deviation equal to the
sample values is given.
The distribution for the healthy
firms looks more Normal than
the distribution for the failed
firms.
Healthy Companies versus Failed Companies

The back to back
stemplot confirms our
findings from the
previous plots that
there are no outliers or
strong departure from
Normality that prevent
us from using the t
procedure for these
data.
Example: Do mean asset/liability ratio differ?

Take group 1 to be the firms that were
healthy and group 2 to be those that failed.
The question of interest is whether or not
the mean ratio of current assets to current
liabilities is different for the two groups.
We therefore test
H0:1 =2
Ha:1  2
Example: Do mean asset/liability ratio differ?

Here are the summary statistics:
Group
1
2

Firm
n
Health
Failed
68
33
x
1.7256
0.8236
s
.6393
.4811
The sample standard deviations are fairly close.We are
willing to assume equal population standard deviations.
The pooled sample variance is
(n1  1) s12  (n2  1) s22
s 
n1  n2  2
2
p
(67)(0.6393) 2  (32)(0.4811) 2

 0.35141
68  33  2
and
s p  0.35141  .5928
Example: Do mean asset/liability ratio differ?

The pooled two-sample t statistic is
t 



x1  x2
1
1
sp

n1
n2
1.7256  0.8236
 7.17
1
1
0.5928

68 33
The P-value is P  2  P(t  7.17)
Where t has t(99) distribution. In t-table we have entries
for100 degrees of freedom. We will use the entries for 100.
Our calculated value of t is larger than the t-value
corresponding to p = .0005 entry in the table. Doubling
0.0005 , we conclude that the two sided P-value is less
than .001.
Example: How different are mean
Asset/liability ratios?


P-value is rarely a complete summary of a
statistical analysis. To make a judgment regarding
the size of the difference between the two groups
of firms, we need a confidence interval.
The difference in mean current assets to current
liabilities ratios for healthy versus failed firms is
x1  x2  1.7256  0.8236  1.151
Example: How different are mean
Asset/liability ratios?

For a 95% margin of error we will use the critical
value t* = 1.984 from the t(100) distribution. The
margin of error is
t * sp

1 1
1 1

 (1.984)(0.5928)

 .249
n1 n2
68 33
This will gives the following 95% confidence
interval
1 1
( x1  x2 )  t * s p
 1.151  0.249
(0.90, 1.40)
n1

n2
Example: How different are mean
Asset/liability ratios?


We report that the successful firms have
current assets to current liabilities ratio that
average 1.15 higher than failed firms, with
margin of error 0.25 for 95% confidence.
Alternatively, we are 95% confident that the
difference is between 0.90 and 1.40.