Chapter 7: Hypothesis Testing With One Sample
Chapter 7: Hypothesis Testing With One Sample
Chapter 7: Hypothesis Testing With One Sample
The problem with applying the techniques learned in Chapter 5 is that typically, the popula-
tion mean (µ) and standard deviation (σ) are not known. In chapter 7, we will be looking at
the situation when a simple random sample is taken from a large population with unknown
mean and standard deviation. However, the sample mean and sample standard deviation
can be calculated.
Setup:
i) A sample is taken from a population with unknown mean and standard deviation.
iii) The claim is tested using the method of hypothesis testing, to be explained below.
Example: Suppose that an automobile manufacturer advertises that its new hybrid car has a
mean gas mileage of 50 miles per gallon. You take a simple random sample of n = 30 hybrid
vehicles and test their gas mileage. You find that in this sample, the average is x̄ = 47 miles
per gallon with a standard deviation of s = 5.5 miles per gallon. Does this indicate that the
advertiser’s statement is true or false?
Step 1:
Rewrite the claim about the population mathematically. This is called the null hypothesis,
denoted
H0 : µ = 50
Assume, to start, that the null hypothesis is true. In the end, you may reject it in favor of:
Step 2:
The alternative (complement) to the null hypothesis is called the alternative hypothesis,
denoted
Ha : µ 6= 50
It is not possible to determine with absolute certainty whether or not H0 is true, unless the
entire population is tested, which is rarely feasible.
1
Step 3:
Determine (or use the given) probability threshold for making the decision to reject H0 when
it is true. This probability is called the level of significance, denoted α, often chosen to
be 0.05 (or, for example 0.01 or 0.10).
Step 4:
Calculate the mean and standard deviation for the simple random sample.
Step 5:
Calculate the P -value, which is the probability of obtaining a sample mean that is as extreme
or more extreme than the one obtained from the data (details given in 7.2 and 7.3).
Step 6:
If P ≤ α, make the decision to reject H0 . Otherwise, fail to reject H0 .
(Note: Failing to reject H0 is not the same as accepting it – H0 was assumed to be true from
the start. Failing to reject H0 simply means that there is not enough statistical evidence to
reject it.)
This table shows all of the possible scenarios that can occur in hypothesis testing:
H0 is true H0 is false
Fail to reject H0 Correct decision Type II error
Reject H0 Type I error Correct decision
H0 : null hypothesis
Ha : alternative hypothesis
α: significance level
x̄ : sample mean
s: sample standard deviation
P : P -value
The output is a single decision to reject H0 or not, based on the relationship between P ,
which you calculate, and the α, which is typically given or determined by you.
2
7.2 Hypothesis Testing for the Mean (Large Samples)
In this section, we describe the complete procedure of hypothesis testing when the sample
size n ≥ 30.
Example 1: Suppose that an automobile manufacturer advertises that its new hybrid car has
a mean gas mileage of 50 miles per gallon. You take a simple random sample of n = 30 hybrid
vehicles and test their gas mileage. You find that in this sample, the average is x̄ = 47 miles
per gallon with a standard deviation of s = 5.5 miles per gallon. Is there enough evidence
to support the advertised claim using α = 0.05?
Inputs:
1. H0 : µ = 50
2. Ha : µ 6= 50
3. α = 0.05
4. x̄ = 47
s = 5.5
Step 5:
Calculating the P -value if n ≥ 30:
x̄ − µ
z= √
s/ n
Step 6:
If P ≤ α, make the decision to reject H0 . Otherwise, fail to reject H0 .
3
Example 1: (continued)
The z-score is
x̄ − µ 47 − 50
z= √ = √ ≈ −3.0
s/ n 5.5/ 30
The cumulative area for this z-score is 0.0013. This is a two-tailed test: P = 2(0.0013) =
0.0026.
Since P = 0.0026 < 0.05 = α, we make the decision to reject the null hypothesis. This
means that there is not enough statistical evidence to support the advertiser’s claim of an
average of 50 miles per gallon.
Example 2: A pit crew claims that its mean pit stop time (for 4 new tires and fuel) during
an auto race is less than 13 seconds. A random sample of 32 pit stop times has a sample
mean of 12.9 seconds and a standard deviation of 0.19 second. Is there enough evidence to
support the claim of the pit crew at α = 0.01?
1. H0 : µ
2. Ha : µ
3. α=
4. x̄ =
s=
5. z =
P =
Practice Problem 1: A manufacturer of sprinkler systems designed for fire protection claims
that the average activating temperature is at least 135◦ F. To test this claim, you randomly
select a sample of 32 systems and find the mean activation temperature to be 133◦ F with
a standard deviation of 3.3◦ F. At α = 0.10, do you have enough evidence to reject the
manufacturer’s claim?
4
7.3 Hypothesis Testing for the Mean (Small Samples)
In this section, we describe the complete procedure of hypothesis testing when the sample
size n < 30 and the population is assumed to be approximately normally distributed.
The z-table will not be used for small samples, instead the t-table will be used.
Example 3: A used car dealer says that the mean price of a 2008 Honda CR-V is at least
$20,500. You suspect this claim is incorrect and find that a random sample of 14 similar
vehicles has a mean price of $19,850 and a standard deviation of $1084. Is there enough
evidence to reject the dealer’s claim at α = 0.05? Assume the population is normally
distributed.
Inputs:
1. H0 : µ ≥ 20, 500 (left-tailed)
2. Ha : µ < 20, 500
3. α = 0.05
4. x̄ = 19, 850
s = 1, 084
New Input: n − 1 = 14 − 1 = 13 the degrees of freedom
Step 5:
Calculating the P -value is not possible in this case with our tables, as we do not use the
z-table, but the t-table. Instead,
1. H0 : ( -tailed)
2. Ha :
3. α=
4. x̄ =
s=
n−1=
5. t0 =
t=
Practice Problem 2: The Internal Revenue Service claims that the mean wait time for callers
during a recent tax filing season was at most 7 minutes. A random sample of 11 callers has
a mean wait time of 8.7 minutes and a standard deviation of 2.7 minutes. Is there enough
evidence to reject the claim at a significance level of 0.10?
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: