Baruch College, STA 9708
Draft 7-22-21
Lecture Notes 8: Two-Sample t-Test
Section 1. The Two-Sample t-Test using Excel
Data Analysis
In the previous lesson we saw that a
t-test
test is used to assess a
claimed value of μ for a given population.
That t- test was applied to
only
one
population, so it is termed a
one-sample
t-test.
When a
hypothesis test is used to compare the population averages of
two
different populations
, we term it a
two-sample
t-test.
As an example, consider the weight of a U.S. quarter.
It is
natural to think that all quarters have the same weight, but that is not
true.
There is variation, everywhere.
Controlling the variability of
the weights of quarters is important because vending machines and
change-counters operate by measuring weight.
A question that interests me is the extent to which quarters lose
weight with age.
Is so, this would show up as a change in the
population average.
For example, it might be that the population of
quarters minted in the 1970's would have a population average, μ,
which is lower than that of quarters minted in 2010's.
Consider the population consisting of the weights of all
quarters made in the decade of 1970 to 1979.
And consider a second
population of consisting of the weights of all quarters made in the
decade of 2010 to 2019.
A reasonable question is whether or not the
population average weight of that first population, μ
1
, equals that of
the second, μ
2
.
We will apply a two-sample t-test to that problem.
I have a sample of 7 coins from the first population, years
1970-79, and 4 coins from the second population, years 2010-19.
That gives us two samples, the first with sample size n
1
=7 and the
second with n
2
=4.
The data is given on the right.
The photograph above is of those 11 coins.
Originally, the
date of a U.S. quarter was on the "heads" side with George Washington; in 1999, the mint
started making "State" quarters and those show the date on the "tails" side.
Therefore, in
the photo, I have shown the tails side of the State coins.
In a two-sample t-test, the null hypothesis asserts that the two population averages
are
equal:
H
o
: μ
1
= μ
2
.
The alternate hypothesis asserts that the two population averages are not
equal:
H
a
: μ
1
≠ μ
2
.
To perform the test, we start by taking a random sample from population #1 and a
random sample from population #2.
We compute then compute the two sample
averages,
¯
x
1
and
¯
x
2
.
If the null hypothesis were true, then the sample averages will
likely be close in value; that is, if in fact μ
1
equals μ
2
, then the difference between
¯
x
1
1