You are on page 1of 81

Topic 7

Fundamentals of hypothesis
testing: One sample tests
BB113 Statistics and its applications
Jan. – Apr. 2020

Textbook: Chapter 9
Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 1
Objectives

In this chapter, you learn:


◼ The basic principles of hypothesis testing.
◼ How to use hypothesis testing to test a mean.
◼ To identify the assumptions of each hypothesis-testing
procedure, how to evaluate them, and the
consequences if they are seriously violated.
◼ The pitfalls & ethical issues involved in hypothesis.
testing.
◼ How to avoid the pitfalls involved in hypothesis testing.

Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 2


The nature of hypothesis testing

◼ We use inferential statistic to make decisions or


judgments about the value of a parameter, e.g. 𝜇.

◼ For example, we might need to decide whether


the mean weight, 𝜇 of all bags of popcorns
packaged by a particular company differs from the
advertised weight of 85 g.

◼ Commonly used methods for making such


decisions or judgments → perform a hypothesis
test.
Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 3
What is a Hypothesis?
DCOVA

A hypothesis is a statement that something


is true.

◼ For example, the statement “the mean weight of


all bags of popcorns packaged differs from the
advertised weight of 85 g” is a hypothesis.

Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 4


The nature of hypothesis testing
Null hypothesis
• A hypothesis to be tested. We use the symbol 𝐻0 to represent it.
• We use the symbol 𝐻0 to represent it.
• A null hypothesis is a claim (or statement) about a population
parameter that is assumed to be true until it is declared false.
Alternative hypothesis
• A hypothesis to be considered as an alternative to the null
hypothesis.
• We use the symbol 𝐻1 to represent it.
• An alternative hypothesis is a claim about a population parameter
that will be true if the null hypothesis is false.
Hypothesis test
• The problem in a hypothesis test is to decide whether the null
hypothesis should be rejected in favor of the alternative
hypothesis.
Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 5
The nature of hypothesis testing
DCOVA
◼ Consider the example of soft-drink
company’s claim that on average, its cans
contain 330 ml of soda.
◼ In reality, this claim may or may not be
true.
◼ We initially assume that the company’s
claim is true.

Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 6


The Null Hypothesis, H0
DCOVA
◼ Let 𝜇 = mean amount of soda in all cans.

𝐻0 : 𝜇 = 330 ml (The company ′ s claim is true)

◼ Is always about a population parameter, not


about a sample statistic.

𝐻0 : 𝜇 = 330 𝐻0 : 𝑋ത = 330

Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 7


The Null Hypothesis, H0 (continued)
DCOVA

◼ Begin with the assumption that the null


hypothesis is true.
◼ Similar to the notion of innocent until
proven guilty.

◼ Represents the current belief in a situation.


◼ Always contains “=“, or “≤”, or “≥” sign.
◼ May or may not be rejected.

Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 8


The Alternative Hypothesis, H1
DCOVA
◼ Is the opposite of the null hypothesis.

◼ In our example, alternative hypothesis will


be that the company’s claim is false and its
soft-drink cans contain, on average, less
than 330 ml of soda.

𝐻1 : 𝜇 < 330 ml (The company ′ s claim is false)

Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 9


The Alternative Hypothesis, H1
DCOVA
◼ Challenges the status quo.

◼ Never contains the “=“, or “≤”, or “≥” sign.

◼ May or may not be proven.

◼ Is generally the hypothesis that the


researcher is trying to prove.

Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 10


Choosing the hypotheses
◼ Null hypothesis – always specifies a single value
for that parameter, e.g. population mean.

𝐻0 : 𝜇 = 𝜇0 where 𝜇0 is some number.

◼ Alternative hypothesis – depends on and should


reflect the purpose of hypothesis test. Three
possible choices.

Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 11


Choosing the hypotheses
If primary concern is deciding whether 𝜇
◼ is different from a specified value, 𝜇0

𝐻1 : 𝜇 ≠ 𝜇0 Two-tailed test

◼ is less than a specified value, 𝜇0


Left-tailed test
𝐻1 : 𝜇 < 𝜇0

◼ is greater than a specified value, 𝜇0


Right-tailed test
𝐻1 : 𝜇 > 𝜇0
One –tailed test
Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 12
Example
You are the manager of a fast-food restaurant.
You want to determine whether the waiting time to
place an order has changed in the past month
from its previous population mean value of 4.5
minutes. State the null and alternative hypothesis.

Let 𝜇 denote the mean waiting time to place an order.

𝐻0 : 𝜇 = 4.5 minutes
𝐻1 : 𝜇 ≠ 4.5 minutes

Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 13


Basic logic of hypothesis testing
✓ Take a random sample from the population.

✓ If the sample data are consistent with the null


hypothesis, do not reject the null hypothesis;

✓ if the sample data are inconsistent with the null


hypothesis and supportive of the alternative
hypothesis, reject the null hypothesis in favor of
the alternative hypothesis.

Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 14


The Hypothesis Testing
Process DCOVA
◼ Claim: The population mean age is 50.
◼ H0: μ = 50, H1: μ ≠ 50
◼ Sample the population and find the sample mean.

Population

Sample

Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 15


The Hypothesis Testing (continued)
Process DCOVA
◼ Suppose the sample mean age was X = 20.

◼ This is significantly lower than the claimed mean


population age of 50.

◼ If the null hypothesis were true, the probability of


getting such a different sample mean would be very
small, so you reject the null hypothesis.

◼ In other words, getting a sample mean of 20 is so


unlikely if the population mean was 50, you
conclude that the population mean must not be 50.
Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 16
The Hypothesis Testing
(continued)
Process
DCOVA

Sampling
Distribution of X

X
20 μ = 50
If H0 is true ... then you reject
If it is unlikely that you
the null hypothesis
would get a sample
that μ = 50.
mean of this value ... ... When in fact this were
the population mean…

Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 17


The Test Statistic and
Critical Values
DCOVA
◼ If the sample mean is close to the stated
population mean, the null hypothesis is not
rejected.
◼ If the sample mean is far from the stated
population mean, the null hypothesis is rejected.
◼ How far is “far enough” to reject H0?
◼ The critical value of a test statistic creates a “line in
the sand” for decision making -- it answers the
question of how far is far enough.
Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 18
The Test Statistic and
(continued)
Critical Values DCOVA
Sampling Distribution of the test statistic

Region of Region of
Rejection Rejection
Region of
Non-Rejection

Critical Values

“Too Far Away” From Mean of Sampling Distribution

Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 19


Risks in Decision Making Using
Hypothesis Testing
DCOVA

◼ Type I Error:
◼ Reject the null hypothesis, when it is true and should
not be rejected.
◼ A type I error is a “false alarm.”
◼ The probability of a Type I Error is 𝛼.
◼ Called level of significance of the test.
◼ Set by researcher in advance.

Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 20


Risks in Decision Making Using
Hypothesis Testing
DCOVA

◼ Type II Error:
◼ Do not reject the null hypothesis, when it is false and
should be rejected.
◼ Type II error represents a “missed opportunity” to take
some corrective action.
◼ The probability of a Type II Error is 𝛽.

Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 21


Risks in Decision Making Using
Hypothesis Testing
DCOVA
◼ Complements of Type I and Type II errors

✓ The confidence coefficient, 1 − 𝛼 - probability


that you will not reject the null hypothesis, when
it is true and should not be rejected.
Confidence level of a hypothesis test: 1 − 𝛼 × 100%

✓ The power of a statistical test, 1 − 𝛽 -


probability that you will reject the null
hypothesis when it is false and should be
rejected.
Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 22
Possible Errors in Hypothesis Test
Decision Making DCOVA
(continued)

Possible Hypothesis Test Outcomes

Actual Situation

Decision H0 True H0 False

Do Not Correct Decision Type II Error


Reject H0 Confidence = 1 - α P(Type II Error) = β

Reject H0 Type I Error Correct Decision


P(Type I Error) = α Power = (1 – β)

Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 23


Type I & II Error Relationship
DCOVA

▪ Type I and Type II errors cannot happen at


the same time.
▪ A Type I error can only occur if H0 is true.
▪ A Type II error can only occur if H0 is false.

If Type I error probability () , then


Type II error probability (β)

Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 24


Level of Significance
and the Rejection Region
DCOVA
H0: μ = 30 Level of significance = 
H1: μ ≠ 30
 /2  /2

30

Critical values

Rejection Region

This is a two-tail test because there is a rejection region in both tails


Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 25
Possible conclusions for a
hypothesis test
Suppose that a hypothesis test is conducted at a
small significance level.
✓ If the null hypothesis is rejected, we conclude
that the data provide sufficient evidence to
support the alternative hypothesis.

✓ If the null hypothesis is not rejected, we


conclude that the data do not provide sufficient
evidence to support the alternative hypothesis.

Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 26


Critical Value
Approach to Hypothesis Testing
With critical value approach, we choose a “cutoff
point(s)” based on the significance level of the
hypothesis test.

Criterion for deciding whether to reject the null


hypothesis – comparing the value of test statistic
to the cutoff point(s).

Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 27


Critical Value Approach to Hypothesis Testing
Terminology of the critical value approach

Rejection region

• The set of values for the test statistic that leads to rejection of
the null hypothesis

Nonrejection region

• The set of values for the test statistic that leads to nonrejection
of the null hypothesis

Critical value(s)

• The value(s) of the test statistic that separate the rejection and
nonrejection regions.
• A critical value is considered part of the rejection region

Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 28


Critical Value
Approach to Hypothesis Testing
Graphical display of rejection regions for two-tailed, left-
tailed, and right-tailed tests

Sign in 𝐻1 : ≠ < >

Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 29


Critical Value
Approach to Hypothesis Testing
DCOVA
General steps:
Step 1 State the null and alternative hypotheses.
Step 2 Decide on the significance level, 𝛼.
Step 3 Compute the value of the test statistic.
Step 4 Determine the critical value(s).
Decision rule: If the value of the test statistic
falls in the rejection region, reject 𝐻0 ;
otherwise, do not reject 𝐻0 .
Step 5 Making decision
Step 6 Interpret the result of the hypothesis test.
Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 30
p-Value Approach to Hypothesis
Testing
DCOVA
◼ p-value: Probability of obtaining a test
statistic equal to or more extreme than the
observed sample value given H0 is true.
◼ The p-value is also called the observed level of
significance.

◼ It is the smallest value of  for which H0 can be


rejected.

Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 31


p-Value Approach to Testing:
Interpreting the p-value
DCOVA
◼ Compare the p-value with :
◼ If p-value <  , reject H0.
◼ If p-value   , do not reject H0.

◼ Remember
◼ If the p-value is low then H0 must go.

Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 32


p-Value Approach to Hypothesis
Testing
DCOVA
◼ General steps:
Step 1 State the null and alternative hypotheses.
Step 2 Decide on the significance level, 𝛼.
Step 3 Compute the value of the test statistic.
Step 4 Determine the p-value.
Decision rule: If 𝑝−value < 𝛼, reject 𝐻0 ;
otherwise, do not reject 𝐻0 .
Step 5 Making decision
Step 6 Interpret the result of the hypothesis test.
Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 33
P-Value
Approach to Hypothesis Testing
p-value for a one-mean z-test if the test is (a) two tailed,
(b) left tailed, or (c) right tailed

Sign in 𝐻1 : ≠ < >

Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 34


Hypothesis Tests for the Mean
DCOVA

Hypothesis
Tests for 

 Known  Unknown
(Z test) (t test)

Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 35


Z Test of Hypothesis for the
Mean (σ Known) DCOVA
◼ Convert sample statistic ( X ) to a ZSTAT test statistic.
Hypothesis
Tests for 

σKnown
Known σUnknown
Unknown
(Z test) (t test)
The test statistic is:
X −μ
ZSTAT =
σ
n

Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 36


Two-Tailed Tests
DCOVA
𝑯𝟎 : 𝝁 = 𝝁𝟎
◼ There are two
𝑯𝟏 : 𝝁 ≠ 𝝁𝟎
cutoff values
(critical values),
defining the
regions of /2 /2
rejection.
𝜇0 X
Reject H0 Do not reject H0 Reject H0

-Zα/2 0 +Zα/2 Z

Lower Upper
critical critical
value value
Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 37
Left-Tailed Tests
DCOVA
𝑯𝟎 : 𝝁 = 𝝁𝟎
◼ There is one
𝑯𝟏 : 𝝁 < 𝝁𝟎
cutoff value
(critical value),
defining the
regions of 𝛼
rejection.
𝜇0 X
Reject H0 Do not reject H0

-Zα 0 Z

Lower
critical
value
Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 38
Right-Tailed Tests
DCOVA
𝑯𝟎 : 𝝁 = 𝝁𝟎
◼ There is one
𝑯𝟏 : 𝝁 > 𝝁𝟎
cutoff value
(critical value),
defining the
regions of 𝛼
rejection.
𝜇0 X
Do not reject H0 Reject H0

0 +Zα Z

Upper
critical
value
Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 39
Hypothesis Testing Example 1
DCOVA
◼ In 2005, the mean retail price of all history books
was $78.01.
◼ This year, the mean retail price for 40 randomly
selected history books is $81.44.
◼ At 1% significance level, do the data provide
sufficient evidence to conclude that this year’s
mean retail price of all history books has increased
from the 2005 mean of $78.01?
◼ Assume that the population standard deviation of
prices for this year’s history books is $7.61.
Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 40
Hypothesis Testing Example 1
DCOVA
Step 1: State the null and alternative hypotheses.

Let 𝜇 denote this year’s mean retail price for all history
books.
𝐻0 : 𝜇 = $78.01 (mean price has not increased)
𝐻1 : 𝜇 > $78.01 (mean price has increased)

(Right-tailed hypothesis test)

Step 2: Decide on the significance level, 𝛂.


𝛼 = 0.01
Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 41
Hypothesis Testing Example 1
DCOVA
Step 3: Compute the value of the test statistic.

We have 𝜇0 = 78.01, 𝜎 = 7.61, 𝑋ത = 81.44 and 𝑛 = 40.


The test statistic:
𝑋ത − 𝜇0 81.44 − 78.01
𝑧𝑆𝑇𝐴𝑇 = = = 2.85
𝜎Τ 𝑛 7.61Τ 40

Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 42


Hypothesis Testing Example 1
(critical value approach) DCOVA

Step 4: Determine the critical value(s) & set decision


rule
Because 𝛼 = 0.01, the critical value is 𝑧0.01 . From Table
E.2, 𝑧0.01 = 2.33.

0.01

Z
0 2.33
Do not reject H0 Reject H0

Decision rule: Reject 𝐻0 when 𝑧𝑆𝑇𝐴𝑇 > 2.33; otherwise,


do not reject 𝐻0 .
Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 43
Hypothesis Testing Example 1
(critical value approach) DCOVA

Step 5: Making decision

From step 3, 𝑧𝑆𝑇𝐴𝑇 = 2.85 > 2.33, the value falls in the
rejection, we reject 𝐻0 .

Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 44


Hypothesis Testing Example 1
(p-value approach) DCOVA

Step 4: Determine the p-value & set decision rule.


From step 3, 𝑧𝑆𝑇𝐴𝑇 = 2.85. The test is right tailed, so p-
value = P(observing a value of z of 2.85 or greater if the
𝐻0 is true) = 𝑃 𝑍 ≥ 2.85 = 0.0022
Decision rule: If
𝑝−value < 0.01, reject p-value

𝐻0 ; otherwise, do not 0 Z=2.85


Z
reject 𝐻0 .

Step 5: Making decision


From step 4, 𝑝 = 0.0022 < 0.01, we reject 𝐻0 .
Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 45
Hypothesis Testing Example 1
DCOVA
Step 6: Interpret the result of the hypothesis test.

At the 1% significance level, the data provide sufficient


evidence to conclude that this year’s mean retail price
of all history books has increased from the 2005 mean
of $78.01.

Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 46


Hypothesis Testing Example 2
DCOVA
◼ A sample of 18 adults with incomes below the
poverty level gives the mean daily calcium intakes
of 947.4 mg.
◼ At the 5% significance level, do the data provide
sufficient evidence to conclude that the mean
calcium intake of all adults with incomes below
the poverty level is less than the recommended
adequate intake of 1000 mg?
◼ Assume that 𝜎 = 188 mg.

Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 47


Hypothesis Testing Example 2
DCOVA
Step 1: State the null and alternative hypotheses.

Let 𝜇 denote the mean calcium intake (per day) of all


adults with incomes below the poverty level.

Step 2: Decide on the significance level, 𝛂.

Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 48


Hypothesis Testing Example 2
DCOVA
Step 3: Compute the value of the test statistic.

Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 49


Hypothesis Testing Example 2
(critical value approach) DCOVA

Step 4: Determine the critical value(s) & set decision


rule.

Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 50


Hypothesis Testing Example 2
(critical value approach) DCOVA

Step 5: Making decision

Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 51


Hypothesis Testing Example 2
(p-value approach) DCOVA

Step 4: Determine the p-value.

Step 5: Making decision

Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 52


Hypothesis Testing Example 2
DCOVA
Step 6: Interpret the result of the hypothesis test.

Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 53


Hypothesis Testing Example 3
DCOVA

◼ One common estimate of mean top speed for


cheetahs is 60 mph.
◼ A sample of 35 cheetahs give the mean top speed
of 59.526 mph.
◼ At the 5% significance level, do the data provide
sufficient evidence to conclude that the mean top
speed of all cheetahs differs from 60 mph?
◼ Assume that 𝜎 = 3.2 mph.

Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 54


Hypothesis Testing Example 3
DCOVA
Step 1: State the null and alternative hypotheses.

Step 2: Decide on the significance level, 𝛂.

Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 55


Hypothesis Testing Example 3
DCOVA
Step 3: Compute the value of the test statistic.

Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 56


Hypothesis Testing Example 3
(critical value approach) DCOVA

Step 4: Determine the critical value(s) & set


decision rule.

Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 57


Hypothesis Testing Example 3
(critical value approach) DCOVA

Step 5: Making decision.

Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 58


Hypothesis Testing Example 3
(p-value approach) DCOVA

Step 4: Determine the p-value & set decision rule.

Step 5: Making decision.

Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 59


Hypothesis Testing Example 3
DCOVA
Step 6: Interpret the result of the hypothesis test.

Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 60


Connection Between Two Tail Tests
and Confidence Intervals

◼ For 𝑋ത = 59.526, 𝜎 = 3.2, and 𝑛 = 35, the 95%


confidence interval is:
3.2 3.2
59.526 − 1.96 to 59.526 + 1.96
35 35

58.4658 ≤ 𝜇 ≤ 60.5862

◼ Since this interval do contain the hypothesized mean (60),


we do not reject the null hypothesis at  = 0.05.

Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 61


Do You Ever Truly Know σ?
DCOVA

◼ Probably not!
◼ In virtually all real world business situations,
σ is not known.
◼ If there is a situation where σ is known then
µ is also known (since to calculate σ you
need to know µ.)
◼ If you truly know µ there would be no need to
gather a sample to estimate it.
Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 62
Hypothesis Testing for the Mean:
σ Unknown
DCOVA
◼ If the population standard deviation is unknown,
you instead use the sample standard deviation S.
◼ Because of this change, you use the t distribution
instead of the Z distribution to test the null
hypothesis about the mean.
◼ When using the t distribution you must assume
the population you are sampling from follows a
normal distribution.
◼ All other steps, concepts, and conclusions are the
same.
Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 63
t Test of Hypothesis for the Mean
(σ Unknown) DCOVA
◼ Convert sample statistic ( X ) to a tSTAT test statistic
Hypothesis
Tests for 

σKnown
Known σUnknown
Unknown
(Z test) (t test)
The test statistic is:

X −μ
t STAT =
S
n
Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 64
Critical Value Approach to
Hypothesis Testing (𝜎 unknown)
Graphical display of rejection regions for two-tailed, left-
tailed, and right-tailed tests

Sign in 𝐻1 : ≠ < >

Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 65


P-Value Approach to Hypothesis
Testing (𝜎 unknown)
p-value for a one-mean t-test if the test is (a) two tailed,
(b) left tailed, or (c) right tailed

Sign in 𝐻1 : ≠ < >

Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 66


Example: Two-Tail Test
( Unknown) DCOVA
◼ The mean cost of a hotel room in
New York is said to be $168 per
night.
◼ To determine if this is true, a
random sample of 25 hotels is
taken and resulted in 𝑋ത of $172.50
and 𝑆 of $15.40. 𝑯𝟎: 𝝁 = 𝟏𝟔𝟖
𝑯𝟏: 𝝁 ≠ 𝟏𝟔𝟖
◼ Test the appropriate hypotheses at
 = 0.05.
◼ (Assume the population distribution
is normal)
Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 67
Example Solution: Two-Tail t Test

Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 68


Example Two-Tail t Test Using A
p-value from Excel DCOVA
◼ Since this is a t-test we cannot calculate the p-
value without some calculation aid.
◼ The Excel output below does this:
t Test for the Hypothesis of the Mean

Data
Null Hypothesis µ= $ 168.00
Level of Significance 0.05
Sample Size 25
Sample Mean $ 172.50
Sample Standard Deviation $ 15.40

Intermediate Calculations
Standard Error of the Mean $ 3.08 =B8/SQRT(B6)
Degrees of Freedom 24 =B6-1
t test statistic 1.46 =(B7-B4)/B11

Two-Tail Test
p-value > α Lower Critical Value
Upper Critical Value
-2.0639
2.0639
=-T.INV.2T(B5,B12)
=T.INV.2T(B5,B12)
So do not reject H0 p-value 0.157 =T.DIST.2T(ABS(B13),B12,2)
Do Not Reject Null Hypothesis =IF(B18<B5, "Reject null hypothesis",
"Do not reject null hypothesis")

Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 69


Connection of Two Tail Tests to
Confidence Intervals DCOVA
◼ For X = 172.5, S = 15.40 and n = 25, the 95%
confidence interval for µ is:

172.5 - (2.0639) 15.4/ 25 to 172.5 + (2.0639) 15.4/ 25

166.14 ≤ μ ≤ 178.86

◼ Since this interval contains the Hypothesized mean (168),


we do not reject the null hypothesis at  = 0.05.

Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 70


Example: Upper-Tail t Test
for Mean ( unknown) DCOVA
◼ A phone industry manager thinks that customer
monthly cell phone bills have increased, and now
average over $52 per month.
◼ A random sample of 25 bills is taken and resulted in
𝑋ത of $53.10 and 𝑆 of $10.
◼ The company wishes to test this claim. Use 𝛼 = 0.10
◼ (Assume a normal population.)
Form hypothesis test:
H0: μ ≤ 52 the mean is not over $52 per month
H1: μ > 52 the mean is greater than $52 per month
(i.e., sufficient evidence exists to support the
manager’s claim)
Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 71
Example Solution: Upper-Tail t Test

Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 72


Example: Utilizing The p-value
for The Upper Tail t-Test
DCOVA
◼ Calculate the p-value and compare to  (p-value below
calculated using Excel spreadsheet on next page)
p-value = .2937

Reject H0
 = .10

0
Do not reject Reject
H0 1.318 H0
tSTAT = .55

Do not reject H0 since p-value = .2937 >  = .10

Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 73


Excel Spreadsheet Calculating The
p-value for The Upper Tail t Test
DCOVA
t Test for the Hypothesis of the Mean

Data
Null Hypothesis µ= 52.00
Level of Significance 0.1
Sample Size 25
Sample Mean 53.10
Sample Standard Deviation 10.00

Intermediate Calculations
Standard Error of the Mean 2.00 =B8/SQRT(B6)
Degrees of Freedom 24 =B6-1
t test statistic 0.55 =(B7-B4)/B11

Upper Tail Test


Upper Critical Value 1.318 =T.INV.2T2*B5,B12)
p-value 0.2937 =T.DIST.RT(ABS(B13),B12,1)
Do Not Reject Null Hypothesis =IF(B18<B5, "Reject null hypothesis",
"Do not reject null hypothesis")

Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 74


Hypothesis Tests for Proportions
DCOVA

◼ Involves categorical variables.


◼ Two possible outcomes:
◼ Possesses characteristic of interest.
◼ Does not possess characteristic of interest.

◼ Fraction or proportion of the population in the


category of interest is denoted by 𝑝.

Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 75


Proportions (continued)

DCOVA
◼ Sample proportion in the category of interest is
denoted by 𝑝.Ƹ

𝑋 number in category of interest in sample


𝑝Ƹ = =
𝑛 sample size

◼ When both 𝑛𝑝 and 𝑛(1 − 𝑝) are at least 5, 𝑝Ƹ can


be approximated by a normal distribution with
mean and standard deviation:
𝑝(1 − 𝑝)
𝜇𝑝ො = 𝑝 𝜎𝑝ො =
𝑛
Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 76
Hypothesis Tests for Proportions
DCOVA

◼ The sampling
distribution of p is Hypothesis
approximately Tests for p
normal, so the test
statistic is a ZSTAT
value: np  5 np < 5
and or
𝑝Ƹ − 𝑝 n(1-p)  5 n(1-p) < 5
𝑍𝑆𝑇𝐴𝑇 =
𝑝(1 − 𝑝)
𝑛 Not discussed
in this chapter

Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 77


Z Test for Proportion in Terms of
Number in Category of Interest
DCOVA

◼ An equivalent form
to the last slide, Hypothesis
but in terms of the Tests for X
number in the
category of
interest, X: X5 X<5
and or
𝑋 − 𝑛𝑝 n-X  5 n-X < 5
𝑍𝑆𝑇𝐴𝑇 =
𝑛𝑝(1 − 𝑝)
Not discussed
in this chapter

Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 78


Example: Z Test for Proportion
DCOVA
◼ A marketing company
claims that it receives 8%
responses from its mailing.
◼ To test this claim, a random
sample of 500 were
surveyed with 25
Check:
responses.
◼ Test at the  = 0.05
n p = (500)(.08) = 40

n(1-p) = (500)(.92) = 460
significance level.

Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 79


Z Test for Proportion: Solution

Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 80


p-Value Solution (continued)

DCOVA
Calculate the p-value and compare to 
(For a two-tail test the p-value is always two-tail.)

Do not reject H0
Reject H0 Reject H0 p-value = 0.0136:
/2 = .025 /2 = .025
P(Z  −2.47) + P(Z  2.47)
0.0068 0.0068
= 2(0.0068) = 0.0136

-1.96 0 1.96

Z = -2.47 Z = 2.47

Reject H0 since p-value = 0.0136 <  = 0.05.

Copyright © 2017, 2014, 2011 Pearson Education, Inc. Chapter 9 - 81

You might also like