You are on page 1of 58

Chapter

Hypothesis Testing

McGraw-Hill/Irwin Copyright © 2014 by The McGraw-Hill Companies, Inc. All rights reserved.
Null and Alternative Hypotheses and Errors in
Hypothesis Testing
• Null hypothesis (H0)
– A statement of the basic proposition being tested.
The statement generally represents the status quo
and is not rejected unless there is convincing
sample evidence that it is false.
• Alternative or research hypothesis (Ha/H1)
– An alternative (to the null hypothesis) statement
that will be accepted only if there is convincing
sample evidence that it is true.

9-2
Example: Trash Bag Case
• Suppose that an independent laboratory has tested
trash bags and has found that no 30-gallon bags on
the market have a mean breaking strength of more
than 50 pounds. The producer of the new trash bag
feels sure that its 30-gallon bag will be the strongest
such bag on the market if the new trash bag’s mean
breaking strength can be shown to be greater than
50 pounds. The mean of the sample of 40 trash bag
breaking strengths is 50.575. Assume that the
standard deviation is 1.65.
Example:
Payment Time Case
• A consulting firm recently installed a new
electronic billing system. The company hopes
to decrease the bill payment time by more
than 50%. Using the old system, the mean bill
payment time was at least 39 days. Therefore,
the company believes that the new system
will reduce payment time to less than 19.5
days. From a sample of 65 payment times, the
average was 18.11 days. Assume that σ is 4.2
days.
Example: Valentine’s Day Chocolate
Case
• A candy company annually markets a special 18
ounce box of assorted chocolates to large retail
stores for Valentine’s Day. This year, the company
made an extra special box with a new assortment of
chocolates. The company projects that there will be a
10% increase in sales. Last year, the mean sales of
the stores was 300 boxes. The company wants to
know whether they should prepare for a 10%
increase in sales or not. From a sample of100 stores,
the average was 326 boxes. Assume that σ is 40
boxes.
Types of Alternative Hypotheses
• One-Sided, “Greater Than” Alternative
– Ha: µ > µ0
• One-Sided, “Less Than” Alternative
– Ha : µ < µ0
• Two-Sided, “Not Equal To” Alternative
– µ ¹ µ0

where µ0 is a given constant value (with the


appropriate units) that is a comparative value
Test Statistic
• To “test” H0 vs. Ha, use the test statistic
• Serves as the “evidence” for the test
• Rejection of the H0 depends on the method
that will be used
– Critical Value Method
– P-Value Method
Types of Decisions
• Choose either of the following decisions for
the null hypothesis H0:
– Reject H0
• A weaker statement than “accepting Ha”
• There’s sufficient evidence to say that H0 isn’t true
– Do not reject H0
• A weaker statement than “accepting H0”
• There’s insufficient evidence to say that Ha is true
Legal System
• Choose either of the following decisions for
the legal cases:
– Guilty beyond reasonable doubt
• A weaker statement that “guilty”
• There’s sufficient evidence that accused is not innocent
– Guilt beyond reasonable doubt is not established
• A weaker statement than “innocent”
• There’s insufficient evidence that accused is guilty
beyond reasonable doubt
Error Probabilities
• Type I Error: Rejecting H0 when it is true
– a is the probability of making a Type I error
– 1 – a is the probability of not making a Type I
error
• Type II Error: Failing to reject H0 when it is
false
– β is the probability of making a Type II error
– 1 – β is the probability of not making a Type II
error
Type I and Type II Errors

State of Nature

Conclusion H0 True H0 False

Reject H0 Type I Correct


Error (α ) Decision
Do not Reject H0 Correct Type II
Decision Error (β
)

Type I Error: Rejecting H0 when it is true


Type II Error: Failing to reject H0 when it is false
Example: Trash Bag Case
• H0: The trash bag’s mean breaking strength is equal
to 50 pounds. (μ≤50)
• Ha: The trash bag’s mean breaking strength is greater
than 50 pounds. (μ>50)
• Type I Error:
– Claim that the mean breaking strength is greater than 50
pounds when in fact, it is not
• Type II Error:
– Do not claim that the mean breaking strength is greater
than 50 pounds when in fact, it is
Type I and Type II Errors
• Usually set a to a low value
– So there is a small chance of rejecting a true H0
– Typically, a = 0.05
• Strong evidence is required to reject H0
• Usually choose a between 0.01 and 0.05
– a = 0.01 requires very strong evidence is to reject H0
– Tradeoff between a and β
• For fixed sample size, the lower a, the higher β
• And the higher a, the lower β
Weight of Evidence
• Based on the a used to reject H0, we can be
able to determine the weight of evidence, or
the degree of our confidence with our
conclusion
– .10, some evidence
– .05, strong evidence
– .01, very strong evidence
– .001, extremely strong evidence
The Seven Steps of
Hypothesis Testing
1. State the null and alternative hypotheses
2. Specify the significance level a
3. Select the appropriate test
4. Determine the rejection rule for deciding whether or not to reject
H0
5. Collect the sample data and calculate the value of the test statistic
6. Decide whether to reject H0 by using the test statistic and the
rejection rule
7. Interpret the statistical results in actual terms and assess their
practical importance
z Tests about a Population Mean: σ
Known
• Test hypotheses about a population mean
using the normal distribution, where:
– The population standard deviation σ is known
• In most real-world situations, σ is not known
• Assume that we know σ if there is sufficient basis
– The sampling distribution of the sample mean is
normally distributed
Example: Trash Bag Case
• Suppose that an independent laboratory has tested
trash bags and has found that no 30-gallon bags on
the market have a mean breaking strength of more
than 50 pounds. The producer of the new trash bag
feels sure that its 30-gallon bag will be the strongest
such bag on the market if the new trash bag’s mean
breaking strength can be shown to be greater than
50 pounds. The mean of the sample of 40 trash bag
breaking strengths is 50.575. Assume that the
standard deviation is 1.65.
One-Sided, Greater Than Alternative: Trash
Bag Case
• Assume that we got a sample mean  of
50.575 lbs from a sample of 40 trash bags.
Also, assume that the population standard
deviation σ is 1.65.
1. H0: µ = 50 lbs
Ha: µ > 50 lbs
2. We want significance levels of a = 0.10, 0.05,
0.01, and 0.001.
One-Sided, Greater Than Alternative: Trash
Bag Case
3. Select the appropriate test
– Identify relevant information
• Testing average breaking strength (µ)
• Sampling distribution of the sample mean is
approximately normally distributed
• σ is known
– As such, it is appropriate to use a z test
One-Sided, Greater Than Alternative: Trash
Bag Case
4. Determine the critical value and the
rejection rule:
– We reject the null hypothesis if the test statistic is
greater than the critical value
– We do not reject the null hypothesis if the test
statistic is less than or equal to the critical value.
– The Critical value is the z value that yields an area
of a to its right
One-Sided, Greater Than Alternative:
Trash Bag Case
5. Collect the sample data and calculate the
value of the test statistic
x - 50 50.575 - 50
z= = = 2.20
s n 1.65 40
One-Sided, Greater Than Alternative:
Trash Bag Case
6. Decide whether to reject H0 by using the test
statistic and the rejection rule
a DECISION
0.1 Reject H0
0.05 Reject H0
0.01 Do not reject H0
0.001 Do not reject H0
7. There is strong evidence to support the claim that
the average breaking strength of all the new bags is
greater than 50 lbs.
One-Sided, Greater Than Alternative:
Trash Bag Case
• Instead of critical values, we may also use the p-
value for the rejection rule.
– The p-value is the area under the standard normal
curve to the right of the test statistic
• We reject the null hypothesis if the p-value is less
than a.
– We do not reject the null hypothesis if the p-value is
greater than or equal to a.
• More efficient to use if the hypotheses are to be
tested at different values of a
One-Sided, Greater Than Alternative:
Trash Bag Case
4. Rejection rule: Reject H0 if p-value < a
5. Collect the sample data and calculate the
value of the test statistic

x - 50 50.575 - 50
z= = = 2.20
s n 1.65 40
– Using the z-table, the p-value is 0.0139
One-Sided, Greater Than Alternative:
Trash Bag Case
6. Decide whether to reject H0 by using the test
statistic and the rejection rule
a DECISION
0.1 Reject H0
0.05 Reject H0
0.01 Do not reject H0
0.001 Do not reject H0
7. There is strong evidence to support the claim that
the average breaking strength of all the new bags is
greater than 50 lbs.
Example: Payment Time Case

• A consulting firm recently installed a new


electronic billing system. The company hopes
to decrease the bill payment time by more
than 50%. Using the old system, the mean bill
payment time was at least 39 days. Therefore,
the company believes that the new system
will reduce payment time to less than 19.5
days. From a sample of 65 payment times, the
average was 18.11 days. Assume that σ is 4.2
days.
One-Sided, Less Than Alternative: Payment Time
Case
1. H0: µ = 19.5 days vs. Ha: µ < 19.5 days
2. We want significance levels of a = 0.10, 0.05, 0.01,
and 0.001.
3. Select the appropriate test
– Identify relevant information
• Testing average payment time (µ)
• Sampling distribution of the sample mean is approximately
normally distributed
• σ is known
– As such, it is appropriate to use a z test
One-Sided, Less Than Alternative: Payment Time
Case
4. Determine the critical value rule
– We reject the null hypothesis if the test statistic is
less than the critical value
– We do not reject the null hypothesis if the test
statistic is greater than or equal to the critical
value.
– The Critical value is the z value that yields an area
of a to its left
One-Sided, Less Than Alternative:
Payment Time Case
5. Test statistic
– In the payment time case, assume that σ is known
and σ = 4.2 days
– For a sample of n=65,  = 18.1077 days:
x - 19.5 18.1077 - 19.5
z= = = -2.67
s n 4.2 65
One-Sided, Less Than Alternative:
Payment Time Case
6. a DECISION
0.1 Reject H0
0.05 Reject H0
0.01 Reject H0
0.001 Do not reject H0
7. There is very strong evidence to support the
claim that the average bill payment time of
all the customers using the new billing
system is less than 19.5 days.
One-Sided, Less Than Alternative: Payment Time
Case (P-value)
• (Steps 1–3 are the same)
4. Rejection rule: Reject H0 if p-value < a
5. Test statistic and p-value
– zstat = –2.67
– The area under the standard normal curve in the
left-hand tail to the left of the test statistic is
0.0038
– The p-value is 0.0038
One-Sided, Less Than Alternative: Payment Time
Case (P-value)
6. a DECISION
0.1 Reject H0
0.05 Reject H0
0.01 Reject H0
0.001 Do not reject H0
7. There is very strong evidence to support the
claim that the average bill payment time of
all the customers using the new billing
system is less than 19.5 days.
Example: Valentine’s Day Chocolate
Case
• A candy company annually markets a special 18
ounce box of assorted chocolates to large retail
stores for Valentine’s Day. This year, the company
made an extra special box with a new assortment of
chocolates. The company projects that there will be a
10% increase in sales. Last year, the mean sales of
the stores was 300 boxes. The company wants to
know whether they should prepare for a 10%
increase in sales or not. From a sample of 100 stores,
the average was 326 boxes. Assume that σ is 40
boxes.
Two-Sided, “Not Equal To”
Alternative: Valentine Day Case
1. H0: µ = 330 vs. Ha: µ ≠ 330
2. We want significance levels of a = 0.10, 0.05,
0.01, and 0.001.
3. Select the appropriate test
– Identify relevant information
• Testing average number of boxes (µ)
• Sampling distribution of the sample mean is
approximately normally distributed
• σ is known
– As such, it is appropriate to use a z test
Two-Sided, “Not Equal To”
Alternative: Valentine Day Case
4. Determine the critical value rule
– The critical values are the z value that yields an area
of a/2 to its left, and the z value that yields and area of
a/2 to its right
– We reject the null hypothesis if the test statistic is
less than –zα/2 or greater than zα/2
– We do not reject the null hypothesis if the test
statistic is greater than or equal to –zα/2 and less
than or equal to zα/2.
Two-Sided, “Not Equal To”
Alternative: Valentine Day Case
5. Test statistic
– In the Valentine Day case, assume that σ is
known and σ = 40
– For a sample of n = 100,  = 326
– Then
x - 330 326 - 330
z= = = -1.00
s n 40 100
Two-Sided, “Not Equal To”
Alternative: Valentine Day Case
6. a DECISION
0.1 Do not reject H0
0.05 Do not reject H0
0.01 Do not reject H0
0.001 Do not reject H0
7. There is insufficient evidence to support the
claim that the average order quantity this
year of the Valentine Day box at all large
retail stores is not 330 boxes.
Two-Sided, “Not Equal To”
Alternative: P-value Method
• (Steps 1–3 are the same)
4. Rejection rule: Reject H0 if p-value < a
5. Test statistic and p-value
– zstat = –1.00
– The area under the standard normal curve in the
left-hand tail to the left of the test statistic is
0.1587
– The p-value is 0.1587 x 2 = 0.3174
Two-Sided, “Not Equal To”
Alternative: P-value Method
6. a DECISION
0.1 Do not reject H0
0.05 Do not reject H0
0.01 Do not reject H0
0.001 Do not reject H0
7. There is insufficient evidence to support the
claim that the average order quantity this
year of the Valentine Day box at all large
retail stores is not 330 boxes.
Summary: z Test (s is known)
• Test statistic:
x - µ0 x - µ0
z= =
sx s n
• Rejection Rule:
– One-sided Greater than alternative
• If test statistic is greater than critical value.
• If p-value is less than a. (Area to the right of test statistic)
– One-sided Less than alternative
• If test statistic is less than critical value.
• If p-value is less than a. (Area to the left of test statistic)
– Two-sided not equal to alternative
• If the absolute value of the test statistic is less than the critical
value.
• If p-value is less than a. (Twice the area to the right of the
absolute value of the test statistic.
t Tests about a Population Mean: σ
Unknown
• Test hypotheses about a population mean
using the normal distribution, where:
– The population standard deviation σ is unknown,
as is the usual situation
• If the population standard deviation σ is unknown, then
it will be estimated from a sample standard deviation s
– The sample distribution of the sample mean is
normally distributed
t Tests about a Population Mean: σ
Unknown
• Let  be the mean of a sample of size n with
standard deviation s
• Also, µ0 is the claimed value of the population mean
• Define a new test statistic
x - µ0
t =
s n
• If the sampling distribution of the sample mean is
normal, the sampling distribution of the t statistic is a
t distribution with n – 1 degrees of freedom
t Tests about a Population Mean: σ
Unknown
Alternative Reject H0 if: p-value
Ha: µ > µ0 t > ta Area under t
distribution to right of t
Ha: µ < µ0 t < –ta Area under t
distribution to left of –t
Ha: µ ¹ µ0 |t| > t a/2 * Twice area under t
distribution to right of |t|
tα, tα/2, and p-values are based on n – 1 degrees of
freedom (for a sample of size n)
* either t > tα/2 or t < –tα/2
Example: Interest Rates
• In 1991, the average interest rate charged by the US
credit issuers was 18.8%. Since then, new credit
cards affiliated with retail stores, oil companies, etc.
proliferated. A financial officer wishes to study
whether the increased competition in the credit card
business has reduced interest rates. From a sample
of 15 interest rates, the mean was calculated to be
16.827% with a standard deviation of 1.5838%.
Assume that the population of interest rates is
normally distributed.
t Tests about a Population Mean: σ
Unknown
l Test statistic:
x - µ0
t=
s n
l Rejection Rule:
l One-sided Greater than alternative
l If test statistic is greater than critical value
l If p-value is less than a (Area to the right of test statistic)
l One-sided Less than alternative
l If test statistic is less than critical value.
l If p-value is less than a (Area to the left of test statistic)
l Two-sided not equal to alternative
l If the absolute value of the test statistic is less than the absolute
value of the critical values
l If p-value is less than a (Twice the area to the right of the absolute
value of the test statistic)
z Tests about a Population Proportion
• Test hypotheses about a population
proportion, where :
– The sampling distribution of the sample mean is
normally distributed
• np ≥ 5
• n(1 – p) ≥ 5
z Tests about a Population Proportion
• Let p̂ be the proportion of a certain response
from a sample of size n
• Also, p0 is the claimed value of the population
mean
• Define a new test statistic
𝑝̂ − 𝜋*
𝑧"#$# =
𝜋* (1 − 𝜋* )
𝑛
z Tests about a Population Proportion

Alternative Reject H0 if: p-value


Ha: p > p0 z > za Area under z
distribution to right of z
Ha: p < p0 z < –za Area under z
distribution to left of –z
Ha: p ¹ p0 |z| > z a/2 * Twice area under z
distribution to right of |z|
* either z > zα/2 or z < –zα/2
Example: Cigarette Taxes
• A recent study conducted by the state government
attempts to determine whether the voting public
supports further increase in cigarette taxes. The
opinion poll recently sampled 1500 voting age
citizens. 1020 of the sampled citizens were in favor of
an increase in cigarette taxes. The state government
would like to decide if there is enough evidence to
establish whether the proportion of citizens
supporting an increase in cigarette taxes is
significantly greater than 0.66.
Summary: Tests about a Population
Proportion
l Rejection Rule:
l One-sided Greater than alternative
l If test statistic is greater than critical value.
l If p-value is less than a. (Area to the right of test statistic)
l One-sided Less than alternative
l If test statistic is less than critical value.
l If p-value is less than a. (Area to the left of test statistic)
l Two-sided not equal to alternative
l If the absolute value of the test statistic is less than the
critical value.
l If p-value is less than a. (Twice the area to the right of the
absolute value of the test statistic.
Exercise: Thermal Wear
• The Philippine National Football team will be needing
thermal wear for their games in countries with freezing
weather conditions. A number of companies have
expressed their interest to provide the kits, one of which
is your company. According to some sources, the average
temperature that the other kits can maintain is 35°C. If
you are able to show that the ave. temp. that your kit can
maintain is greater than 35°C, you will be the official
outfitter of the team. From a sample of 30 kits, the ave.
temp. you got is 36.86°C. If the population standard
deviation is 3.57, will you get the contract?
Exercise: Catalyst Yield
• Consider a chemical company that wishes to
determine whether a new catalyst, catalyst XA-100,
changes the mean hourly yield of its chemical
process from the historical process mean of 750
pounds per hour. When five trial runs are made using
the new catalyst, the following yields (in pounds per
hour) are recorded: 801, 814, 784, 836, and 820.
Assume that the hourly yields are normally
distributed.
Exercise: Sugar Content
• A powdered milk manufacturing company
claims that the amount of sugar present in a
100g pack is exactly 15g only. Food and
Nutrition Research Institute (FNRI) is
conducting a study to verify if the claim of the
manufacturer is true. From a sample of 100
packs, they got a sample mean of 15.285g.
Assume that the population standard
deviation is equal to 1.43g.
Exercise: Work Stress
• Suppose that a national survey finds that 73%
of restaurant employees say that work stress
has a negative impact on their personal lives.
A random sample of 200 employees of a large
restaurant chain finds that 141 employees say
that work stress has a negative impact on
their personal lives. Show that the percentage
of work-stressed employees for the restaurant
chain differs from the national percentage.
Exercise: Product X
• Based on a random sample of 25 units of
product X, the average weight is 98 lbs., and
the population standard deviation is 10 lbs.
We would like to decide if there is enough
evidence to establish that the average weight
for the population of product X is less than
100 lbs. Assume the population is normally
distributed.