Chapter 7. Hypothesis Testing
Chapter 7. Hypothesis Testing
Hypothesis Test
Content of Chapter 7
❖Concepts:
• . Hypothesis test; null and alternative
hypotheses.
2
INTRODUCTION -1
❖Every
• . day people make decisions based on their
beliefs about true state of the world.
❖Examples:
➢ A manager believes that an incoming shipment
contains 2% or fewer of defects, and then accept
the shipment.
3
INTRODUCTION -2
❖In
• . these cases, the information of these beliefs
have started as an informed guess (or a
proposition tentatively advanced as true).
4
INTRODUCTION -3
❖We
• . use hypothesis testing to resolve conflicts
between two competing hypotheses on a particular
population parameter of interest.
6
Type I and Type II Errors -1
❖The hypothesis testing procedure uses data
from a sample to test the two competing
statements indicated by H0 and Ha.
7
Type I and Type II Errors -2
8
Type I and Type II Errors -3
❖We consider two types of errors in the context of
hypothesis testing.
9
Type I and Type II Errors -4
❖ Type II error: occurs if we do not reject the null
hypothesis when it is false.
❖ It is difficult to control for the probability of
making a Type II error.
10
Type I and Type II Errors -5
❖ Example 1: Suppose that the person takes a
medical test that attempts to detect the disease.
❖ Consider the following hypotheses:
▪ 𝐇𝟎 : the person is free of a particular disease.
▪ Ha: the person has a particular disease.
11
Type I and Type II Errors -6
❖ Types I error occurs when:
▪ The medical test indicates that the person has
the disease.
▪ But, in reality, the person is free of the disease
12
Type I and Type II Errors -7
❖ Example 2: relate to the court of law
❖ Consider the following hypotheses:
▪ 𝐇𝟎 : An accused person is innocent.
▪ Ha: An accused person is guilty.
13
Type I and Type II Errors -8
15
Defining the null and alternative
hypotheses -2
❖Note: When setting up hypotheses, 𝐻0 always has
symbol of an equal “=“ in it and 𝐻𝑎 never has
symbol of an equal “=“ in it.
❖General form of hypothesis. Three forms of
hypotheses:
𝑯𝟎 𝑯𝒂
≥ <
≤ >
= ≠
16
Defining the null and alternative
hypotheses -3
• .
❖How to define the null and alternative
hypotheses?
17
Defining the null and alternative
hypotheses -4
❖Example 1: An advertisement for a popular weight-
loss clinic suggests that participants in its new diet
program experience an average weight loss of more
than 10 pounds. A consumer activist wants to
determine if the advertisement’s claim is valid.
18
Defining the null and alternative
hypotheses -5
❖Example 2: A television research analyst wishes to
test a claim that more than 50% of the households
will tune in for a TV episode.
❖Specify the null and the alternative hypotheses to test
the claim.
19
Defining the null and alternative hypotheses -6
❖Example 3:
➢ It is generally believed that at least 60% of the
residents in a small town in Texas are happy
with their lives.
➢ A sociologist wonders whether recent economic woes
have adversely affected the happiness level in this
town.
➢ Specify the null and the alternative hypotheses to
determine if the sociologist’s concern is valid.
20
Hypotheses testing about mean 𝝁 -1
❖ In general, a hypothesis test about the value of a population
mean 𝜇 must take one of the following three forms (where
𝜇0 is the hypothesized value of the population mean).
H 0 : 0 H 0 : 0 H 0 : = 0
H a : 0 H a : 0 H a : 0
21
Hypotheses testing about mean 𝝁 -2
22
Hypotheses testing about mean 𝝁 -3
23
Hypotheses testing about mean 𝝁 -4
24
Hypotheses testing about mean 𝝁 -5
25
Lower-Tailed Test About a Population
Mean: 𝜎 Known
• Critical Value Approach
Sampling
distribution
of z = x − 0
Reject H 0 / n
=
Do Not Reject H 0
z
−z = −1.28 0
26
Upper-Tailed Test About a
Population Mean: 𝝈 Known
• Critical Value Approach
Sampling
distribution
of z = x − 0
/ n Reject H 0
=
Do Not Reject H 0
z
0 z = 1.645
27
One-Tailed Test About a Population
Mean: σ is unknown -1
❖Example 1: Grand Auto Corporation produces auto
batteries. The company claims that its top-of-the-line
Never Die batteries are good, on average, for at least 65
months. To test this claim, a consumer protection agency
tested 45 such batteries and found that the mean life is
63.4 months, and the standard deviation is 3 months.
28
One-Tailed Test About a Population
Mean: σ is unknown -2
❖Sol:
29
Two-Tailed Test About a Population
Mean: σ is unknown -3
❖Example 2: Sugar is packed in 5-pound bags. An
inspector suspects the bags may not contain 5 pounds. A
sample of 50 bags produces a mean of 4.6 pounds and a
standard deviation of 0.7 pound.
30
Two-Tailed Test About a Population
Mean: σ is unknown -4
❖Sol:
31
Two -Tailed Test About a Population
Mean: σ is Known -5
Example 3: The average expenditure per student (based
on average daily attendance) for a certain school year was
$10,337 with a population standard deviation of $1560. A
survey for the next school year of 150 randomly selected
students resulted in a sample mean of $10,798.
32
Two -Tailed Test About a Population
Mean: σ is Known -6
❖Sol:
33
One -Tailed Test About a Population
Mean: σ is unknown -7
Example 4: A tobacco company claims that its best-
selling cigarettes contain at most 40 mg of nicotine.
Evidence suggests that nicotine is normally distributed.
34
One -Tailed Test About a Population
Mean: σ is unknown -7
Example 4: Sol
35
One -Tailed Test About a Population
Mean: σ is unknown -8
❖Example 5: A group of young businesswomen wish to
open a high fashion boutique in a vacant store but only if
the average income of households in the area is at least
$25,000. To test the average income of households in the
area is less than 25000$ or not, a random sample of 9
households is selected and given:
36
Two -Tailed Tests About a Population
Mean: σ is Known -9
❖Q: At a level of significance of 5%, what is your
conclusion?
37
Hypotheses testing about proportion 𝒑 -1
38
Hypotheses testing about proportion 𝒑 -2
39
Hypotheses testing about proportion 𝒑 -3
40
Examples -1
Example 1:
❖A dietitian claims that 60% of people are trying to avoid
trans fats in their diets. She randomly selected 200 people
and found that 128 people stated that they were trying to
avoid trans fats in their diets.
❖At a level of significance of 5%, is there enough evidence
to reject the dietitian’s claim? State the null and alternative
hypotheses.
41
Examples -1
Example 1: Sol
42
Examples -2
Example 2:
❖A retailer is looking to evaluate its customer service.
Management has determined that if the retailer
wants to stay competitive, then it will have to have at
least a 90% satisfaction rate among its customers.
43
Examples -3
Question:
a/ State the hypotheses to test if the retailer needs to
improve its services.
b/ At a level of significance of 5%, what is the manager’s
conclusion?
44
End of Chapter 7
65