03 Test statistics for one- and two-tailed tests
03 Test statistics for one- and two-tailed tests
tests
Remember that our steps for any hypothesis test are
We’ve already covered the first two steps, and now we want to talk about
how to calculate the test statistic. But any test statistic we calculate will
depend on whether we’re running a two-tailed test or a one-tailed test.
Whether we run a one- or two-tailed test is dictated by the hypothesis
statements we wrote in the first step.
So let’s define one- and two-tailed tests, and start over with the
hypothesis statements to show when we’ll use each test type.
290
H0 with a ≤ sign and Ha with a > sign
When the null and alternative hypotheses use the = and ≠ signs, we’ll use
a two-tailed test (also called a two-sided or nondirectional test). But in the
other two cases, with either ≤ and >, or ≥ and <, we’ll use a one-tailed test
(also called a one-sided test or direction test).
Here’s the way to understand one- and two-tailed tests. When we state in
the null hypothesis that the population mean or population proportion is
equal to some value, and then state with the alternative hypothesis that
the mean or proportion is not equal to that value, we’re not predicting any
direction between the variables. We’re not saying that one value is greater
or less than the other, we’re just saying that they’re different. Which
means the difference could be in either direction (less than or greater
than), which means we’ll have a region of rejection in each tail of the
distribution.
291
On the other hand, if we hypothesize that the mean or proportion is
greater than or less than the stated value, then it means we’ll be
performing a one-tailed test. If we predict that the population parameter is
greater than the stated value, then the only rejection region will be in the
upper tail, so we call this an upper-tailed test, or a right-tailed test.
But if we predict that the population parameter is less than the stated
value, then the only rejection region will be in the lower tail, so we call this
a lower-tailed test, or a left-tailed test.
292
Choosing a one-tailed or two-tailed test
Whether we use a one- or two-tailed test is determined by the hypothesis
statements we choose. With that in mind, we really want to think ahead
when we’re writing our hypothesis statements, and consider which kind of
test we want to set ourselves up for.
A one-tailed test has a larger region of rejection, because all of the area
that represents the region of rejection is consolidated into one tail. A two-
tailed test, on the other hand, has the region of rejection split into two
tails, which means each individual rejection region for the two-tailed test is
smaller than the single rejection region from the one-tailed test.
293
The two-tailed test really forces us to find a more extreme result in order
to reach the region of rejection and reject the null hypothesis.
That being said, we should only use a one-tailed test when we have good
reason to believe that the difference between the means or proportions is
in the specific direction that we think it’s in. If we’re not extremely
confident about directionality, we should play it safe and use the more
conservative two-tailed test.
294
two-tailed test we’ll split that 10 % evenly into two tails, 5 % in the lower tail
and 5 % in the upper tail.
And the same goes for the lower tail. When we look for the negative z
-score that corresponds to the boundary of the rejection region in the
lower tail, we need to look for a z-score that corresponds to 0.0500, not
0.1000, even though α = 0.10.
295
Many people get tripped up here, because they assume that, with α = 0.10,
they’re looking for the z-score associated with 0.9000. But because the
rejection region is split into both tails, we only have 10 % /2 = 5 % of the
area in each tail, and that 5 % corresponds to 0.9500 in the upper tail and
0.0500 in the lower tail.
But if instead we’re using a one-tailed test with the same α = 0.10, the
entire 10 % of area that represents the rejection region is consolidated into
one tail of the distribution. So if we’re running an upper-tailed test, then
we’ll find the boundary of the rejection region at a z-score for 0.9000.
296
For a lower-tailed test, we’ll find the boundary of the rejection region at a z
-score for 0.1000.
The next step is always to calculate the test statistic, and then determine
whether that value lies inside or outside the region of rejection.
297
The formula we’ll use to calculate the test statistic depends on the
information we have and the size of our sample, but the general formula
for the test statistic is
observed − expected
test statistic =
standard deviation
The specific formula for the test statistic will depend on whether or not the
population standard deviation σ is known or unknown. When σ is known,
we’ll use
x̄ − μ0 x̄ − μ0
z= = σ
σx̄
n
When σ is unknown, and/or if we’re using a small sample n < 30, we’ll use
the sample standard deviation sx̄ instead of the population standard
deviation σ, but we’ll use the more conservative t-table to compensate for
using sx̄.
x̄ − μ0 x̄ − μ0
t= = s
sx̄
n
These are test statistics for the mean, but the test statistic for the
proportion, as long as n p̂ ≥ 5 and n(1 − p)̂ ≥ 5, will be
p̂ − p0 p̂ − p0
z= =
σp̂ p0(1 − p0)
n
298
Let’s do an example where we calculate the test statistic for the mean,
where population standard deviation is unknown (which will usually be the
case).
Example
We’re testing the claim that a car dealership averages $1,000,000 in monthly
sales. We take a random sample of 40 months of sales data and find
x̄ = $985,000 and s = $200,000. Find the hypothesis statements, choose a
one- or two-tailed test, and calculate a test statistic.
μ = $1,000,000
μ ≠ $1,000,000
x̄ − μ0
t= s
n
299
$985,000 − $1,000,000
t= $200,000
40
40
t = − $15,000 ⋅
$200,000
3 40
t=−
40
3 10
t=−
20
t ≈ − 0.4743
In the next section, we’ll look at what to do with this test statistic once we
have it.
300