HO5 Hypothesis Test (Single Mean) PDF
HO5 Hypothesis Test (Single Mean) PDF
HO5 Hypothesis Test (Single Mean) PDF
Statistical Inference
Single Mean Hypothesis Test
For example, the statement “the mean weight of all bags of pretzels packaged differs from the
advertised weight of 454 g” is a hypothesis.
In a typical study, the hypothesis test involves two types of hypotheses called “Null Hypothesis”
and “Alternate Hypothesis”
Null hypothesis: A hypothesis to be tested. The symbol Ho to represent the null hypothesis.
Ho: μ = μo
The choice of the alternative hypothesis depends on and should reflect the purpose of the
hypothesis test. Three choices are possible for the alternative hypothesis.
A hypothesis test is called a one-tailed test if it is either left tailed or right tailed.
Example 1:
Quality Assurance A snack-food company produces a 454-g bag of pretzels. Although the actual
net weights deviate slightly from 454 g and vary from one bag to another, the company insists that
the mean net weight of the bags be 454 g. As part of its program, the quality assurance department
periodically performs a hypothesis test to decide whether the packaging machine is working
properly, that is, to decide whether the mean net weight of all bags packaged is 454 g.
Solution
Let μ denote the mean net weight of all bags packaged.
a. The null hypothesis is that the packaging machine is working properly, that is, that the mean net
weight, μ, of all bags packaged equals 454 g.
In symbols, Ho: μ = 454 g.
b. The alternative hypothesis is that the packaging machine is not working properly, that is, that
the mean net weight, μ, of all bags packaged is different from 454 g.
In symbols, Ha: μ ≠ 454 g.
c. This hypothesis test is two tailed because a does-not-equal sign ( ≠) appears in the alternative
hypothesis.
Example 2:
Prices of History Books The R. R. Bowker Company collects information on the retail prices of
books and publishes the data in The Bowker Annual Library and Book Trade Almanac. In 2005,
the mean retail price of history books was $78.01. Suppose that we want to perform a hypothesis
test to decide whether this year’s mean retail price of history books has increased from the 2005
mean.
a. Determine the null hypothesis for the hypothesis test.
b. Determine the alternative hypothesis for the hypothesis test.
c. Classify the hypothesis test as two tailed, left tailed, or right tailed.
Solution Let μ denote this year’s mean retail price of history books.
a. The null hypothesis is that this year’s mean retail price of history books equals the 2005 mean
of $78.01; that is, H0:μ = $78.01.
b. The alternative hypothesis is that this year’s mean retail price of history books is greater than
the 2005 mean of $78.01; that is, Ha: μ > $78.01.
c. This hypothesis test is right tailed because a greater-than sign (>) appears in the alternative
hypothesis.
Question 1: A study on Heat Stress Evaluation and Worker Fatigue in a Steel assessed fatigue in
steel-plant workers due to heat stress. Among other things, the researchers monitored the heart
rates of a random sample of 29 casting workers. A hypothesis test is to be conducted to decide
whether the mean post-work heart rate of casting workers exceeds the normal resting heart rate
of 72 beats per minute (bpm).
Truth
H o is true H o is false
Do not reject H o Correct Decision Type II Error
Decision
Reject H o Type I Error Correct Decision
Example: Consider again the pretzel-packaging hypothesis test. The null and alternative
hypotheses are, respectively,
where μ is the mean net weight of all bags of pretzels packaged. Explain what each of the following
would mean.
Now suppose that the results of carrying out the hypothesis test lead to rejection of the null
hypothesis μ = 454 g, that is, to the conclusion that μ = 454 g. Classify that conclusion by error
type or as a correct decision if,
Solution:
a. A Type I error occurs when a true null hypothesis is rejected. In this case, a Type I error
would occur if in fact μ = 454 g but the results of the sampling lead to the conclusion that
μ ≠ 454 g.
b. A Type II error occurs when a false null hypothesis is not rejected. In this case, a Type II
error would occur if in fact μ ≠ 454 g but the results of the sampling fail to lead to that
conclusion.
c. A correct decision can occur in either of two ways. A true null hypothesis is not rejected.
That would happen if in fact μ = 454 g and the results of the sampling do not lead to the
rejection of that fact. A false null hypothesis is rejected. That would happen if in fact μ ≠
454 g and the results of the sampling lead to that conclusion.
d. If in fact μ = 454 g, the null hypothesis is true. Consequently, by rejecting the null
hypothesis μ = 454 g, we have made a Type I error—we have rejected a true null
hypothesis.
e. If in fact μ ≠ 454 g, the null hypothesis is false. Consequently, by rejecting the null
hypothesis μ = 454 g, we have made a correct decision—we have rejected a false null
hypothesis.
Assumptions
1. Simple random sample
2. Normal population or large sample
3. σ known
Step 1: The null hypothesis is H0: μ = μ0, and the alternative hypothesis is,
Ha: μ ≠ μ0 (Two tailed) or Ha: μ < μ0 (Left tailed) or Ha: μ > μ0 (Right tailed)
Step 2: Decide on the significance level, α.
Step 3: Compute the value of the test statistic,
𝑥̅ − 𝜇𝑜
𝑧=
𝜎/√𝑛
and denote that value z0.
Step 4: Analyze the value
Approach 1: Critical Value Approach
Question 3: The cheetah is the fastest land mammal and is highly specialized to run down prey.
The cheetah often exceeds speeds of 60 mph and the cheetah is capable of speeds up to 72 mph.
One common estimate of mean top speed for cheetahs is 60 mph. The table below gives the top
speeds, in miles per hour, for a sample of 35 cheetahs
At the 5% significance level, do the data provide sufficient evidence to conclude that the mean
cadmium level in mushrooms is greater than the government’s recommended limit of 0.5 ppm?
Assume that the population standard deviation of cadmium levels in mushrooms is 0.37 ppm.
Question 5: Dementia is the loss of the intellectual and social abilities severe enough to interfere
with judgment, behavior, and daily functioning. Alzheimer’s disease is the most common type of
dementia. In the article “Living with Early Onset Dementia: Exploring the Experience and
Developing Evidence-Based Guidelines for Practice” (Alzheimer’s Care Quarterly, Vol. 5, Issue
2, pp. 111–122), P. Harris and J. Keady explored the experience and struggles of people diagnosed
with dementia and their families. A simple random sample of 21 people with early-onset dementia
gave the following data on age at diagnosis, in years.
60 58 52 58 59 58 51
61 54 59 55 53 44 46
47 42 56 57 49 41 43
At the 1% significance level, do the data provide sufficient evidence to conclude that the mean age
at diagnosis of all people with early-onset dementia is less than 55 years old? Assume that the
population standard deviation is 6.8 years. (Sample Mean is 52.5 years).
as our test statistic and use the t-table, to obtain the critical value(s) or P-value.
We call this hypothesis-testing procedure the one-mean t-test or, simply the t-test.
Example:
The Table shows the pH levels obtained by the researchers for 15 lakes. At the 5% significance
level, do the data provide sufficient evidence to conclude that, on average, high mountain lakes in
the Southern Alps are nonacidic? A lake is classified as nonacidic if it has a pH greater than 6.
Step 4 The critical value for a right-tailed test is tα with df = n − 1. Use T Table to find the
critical value.
We have n = 15 and α = 0.05. T Table shows that for df = 15 − 1 = 14, t0.05 = 1.761.
Step 5 If the value of the test statistic falls in the rejection region, reject H0; otherwise, do not
reject H0.
The value of the test statistic, found in Step 3, is t = 3.458. It falls in the rejection region.
Consequently, we reject H0. The test results are statistically significant at the 5% level.
Exercise:
2. You have provided a sample mean, sample standard deviation, and sample size. In each case,
use the one-mean t-test to perform the required hypothesis test at the 5% significance level
a. x = 20, s = 4, n = 32, H0: μ = 22, Ha: μ < 22
b. x = 24, s = 4, n = 15, H0: μ = 22, Ha: μ > 22
c. x = 20, s = 4, n = 24, H0: μ = 22, Ha: μ ≠ 22
At the 5% significance level, do the data provide sufficient evidence to conclude that the
2006 mean annual expenditure on apparel and services for consumer units in the Northeast
differed from the national mean of $1874? (Note: The sample mean and sample standard
deviation of the data are $2060.76 and $350.90, respectively.)
If the population standard deviation is known, we can use the z-test; if it is unknown, we can use
the t-test. Both procedures require another assumption for their use: The variable under
consideration should be approximately normally distributed, or the sample size should be relatively
large. For small samples, both procedures should be avoided in the presence of outliers.
The Wilcoxon signed-rank test is based on the assumption that the variable under consideration
has a symmetric distribution—one that can be divided into two pieces that are mirror images of
each other—but does not require that its distribution be normal or have any other specific shape.
Thus, for instance, the Wilcoxon signed-rank test applies to a variable that has a normal, triangular,
uniform, or symmetric bimodal distribution but not to one that has a right-skewed or left-skewed
distribution.
EXAMPLE
A typical family of four spends about $157 per week on food. Ten randomly selected families of
four have the weekly food costs shown in the given Table. At 5% level of significance, Do the data
provide sufficient evidence to conclude that the mean weekly food cost for the families of four is
less than the national mean of $157? Apply the Wilcoxon signed-rank test to carry out the
hypothesis test.
Sample of weekly food costs ($)
143 169 149 135 161
138 152 150 141 159
Solution:
Step 01: Define the Hypothesis.
H0: μ = $157 (mean weekly food cost is not less than $157)
Ha: μ < $157 (mean weekly food cost is less than $157).
Note that the hypothesis test is left tailed.
To begin, we rank the data according to distance and direction from the null hypothesis mean,
μ0=$157. The steps for doing so are presented in the Table below.
The last column of Table above shows that the sum of the positive ranks equals
W = 6 + 2 + 1 = 9.
Step 5 If the value of the test statistic falls in the rejection region, reject H0; otherwise, do
not reject H0.
The value of the test statistic is W = 9, as found in Step 3, which falls in the rejection region shown
in the Fig. above. Thus we reject H0. The test results are statistically significant at the 5% level.
Exercise:
Use the Wilcoxon signed-rank test to perform the required hypothesis test.
1. During the late 1800s, Lake Wingra in Madison,Wisconsin, was frozen over an average of
124.9 days per year. A random sample of eight recent years provided the following data on
numbers of days that the lake was frozen over.
103 80 79 135 134 77 80 111
At the 5% significance level, do the data provide sufficient evidence to conclude that the
average number of ice days is less now than in the late 1800s?
2. In the article, “Apparent Quality-of-Life in Nations: How Long and Happy People Live”
(Social Indicators Research, Vol. 71, pp. 61–86) R. Veenhoven discussed how the quality of
life in nations can be measured by how long and happy people live. In the 1990s, the median
number of happy life years across nations was 46.7. A random sample of eight nations for this
year provided the following data on number of happy-life years.
30.3 47.0 56.4 30.5 39.6 47.9 29.7 52.5
At the 5% significance level, do the data provide sufficient evidence to conclude that the
median number of happy-life years has changed from that in the 1990s?
3. A manufacturer of liquid soap produces a bottle with an advertised content of 310 milliliters
(mL). Sixteen bottles are randomly selected and found to have the following contents, in mL.
297 318 306 300 311 303 291 298
322 307 312 300 315 296 309 311
A normal probability plot of the data indicates that you can assume the contents are normally
distributed. Let μ denote the mean content of all bottles produced. To decide whether the mean
content is less than advertised, perform the hypothesis test H0: μ = 310 mL Ha: μ < 310 mL at
the 5% significance level.
a. Use the t-test.
b. Use the Wilcoxon signed-rank test.
Problems on
Single Mean Hypothesis Testing and Probabilities of
Type I and Type II Errors
Exercise:
1. Cans of soda marked 12 oz should average at least 12 ounces. In testing Ho: µ = 12 versus H1:
µ < 12, the following sample quantities are recorded. n = 67, = 11.96, s = 0.135. Determine
a. Probability of type I error.
b. Probability of type II error if H1: µ = 11.5 and critical region is set as ≤ 11.63
2. Cans of soda marked 12 oz should average at least 12 ounces. In testing Ho: µ = 12 versus H1:
µ ≠ 12, at level of sig = 0.05, the following sample quantities are recorded. n = 67, = 11.96,
s = 0.135
a. Test whether the claim is substantiated or not.
b. Determine probability of type II error if H1: µ = 11.6 and critical region is set as ≤
11.8
3. Suppose you are to verify the claim that population mean is different from 30 on the basis of a
random sample of size 75, and you know that standard deviation is 6.2. If you set the rejection
region to be ≥ 31.41.
a. What is the type I error of your test?
b. Test whether the claim is substantiated or not, at 7% level of significance.
4. Suppose you are to verify the claim that population mean is greater than 30 on the basis of a
random sample of size 40, and you know that standard deviation is 5.9. If you set the rejection
region to be 𝑋̅ ≥ 33.1.
a. What is the type I error of your test?
b. Determine type II error if H1: µ = 35
5. A dry cleaning establishment claims that a new spot remover will remove more than 75% of
the spots to which it is applied. To check this claim, the spot remover will be used on 13 spots
chosen at random. If fewer than 11 of the spots are removed, we shall not reject the null
hypothesis that p = 0.75; otherwise, we conclude that p > 0.75.
a. Use Binomial Distribution to evaluate type-I error α.
b. Find the probability of type II error for the alternative p = 0.8, but assume that 100
spots are treated and the critical region is defined to be x>85, where x is the number of
spots removed.
6. It is claimed that automobiles are driven on average more than 25,000 kilometers per year. To
test this claim, 90 randomly selected automobile owners are asked to keep a record of the
kilometers they travel. Would you agree with this claim if the random sample showed an
average of 23,500 kilometers and a standard deviation of 5000 kilometers? Use a P-value in
your conclusion.
7. A random sample of 64 bags of popcorn weighed, on average, 5.53 ounces with a standard
deviation of 0.24 ounce. To test the hypothesis that μ = 5.5 ounces against the alternative
hypothesis, μ ≠ 5.5 ounces, determine the level of type I error. Also determine what will be the
type II error if claim is 5.6 ounces.
8. A manufacturer has developed a new fishing line, which the company claims has a mean
breaking strength of 15 kilograms with a standard deviation of 0.5 kilogram. To test the
hypothesis that μ=15 kilograms against the alternative that μ < 15 kilograms, a random sample
of 50 lines will be tested. The critical region is defined to be 𝑥̅ < 14.9.
a. Find the probability of committing a type I error when H0 is true.
b. Evaluate β for the alternatives μ = 14.8 kilograms.
9. Assume that a sample of 20 associate professors from a research institution has an average
salary of Rs170,750 per month with a standard deviation of Rs26,000. To test the hypothesis
that the mean salary for associate professors in research institutions is more than Rs150,000
per month find the probability of type I error of your test.