Hypothesis Testing 112
Hypothesis Testing 112
1. Recognize the concepts of critical value, critical region, and region for rejection
3. Explain the purpose of Null hypothesis testing, including role of sampling error
5. Describe the role of relationship strength and sample size in determining statistical
significance
2
Topic: Hypothesis Testing
Key Concept
This section presents individual components of a hypothesis test, and the following
sections use those components in comprehensive procedures.
The role of the following should be understood:
null hypothesis
alternative hypothesis
critical region
significance level
critical value
P-value
Type I and II error
3
What is a Hypothesis?
• A hypothesis is a claim
(assumption) about a
population parameter:
• population mean
Example: The mean monthly cell phone bill of this
city is μ = $42
The Null Hypothesis, H0
H0 : μ 3 H0 : X 3
Topic: Hypothesis Testing
Hypothesis Tests
Statistical hypothesis
• A statement, or claim, about a population parameter.
• Need a pair of hypotheses
• the null hypothesis that represents the claim
• the other, its alternative hypothesis
6
The Null Hypothesis, H0
H0: μ ≥ 3
a
H1: μ < 3
Lower-tail test 0
Errors in Making Decisions
Type I Error
Reject a true null hypothesis
Considered a serious type of error
Type II Error
Fail to reject a false null hypothesis
Actual
Situation
Decision H0 True H0 False
Do Not
No error Type II Error
Key: Reject
(1 - a ) (β)
Outcome H0
(Probability) Reject Type I Error No Error
H0 (a) (1-β)
Type I & II Error Relationship
σKnown
Known σUnknown
Unknown
(Z test) (t test)
The test statistic is:
X μ
Z
σ
n
Two-Tail Tests
There are two H0: μ = 3
cutoff values H1: μ ¹
(critical values), 3
defining the
regions of /2 /2
rejection
3 X
Reject H0 Do not reject H0 Reject H0
-Z 0 +Z Z
Lower Upper
critical critical
value value
Lower-Tail Tests
H0: μ ≥ 3
There is only one
critical value, since H1: μ < 3
the rejection area is
a
in only one tail
μ X
Critical value
Upper-Tail Tests
There is only one H0: μ ≤ 3
Critical value
6 Steps in
Hypothesis Testing
21
Solution: Testing with Rejection
Regions
• H 0: • Test Statistic
• Ha: μ < $45,000 x 43, 500 45, 000
z
• = 0.05 n 5200 30
• Rejection Region: 1.58
• Decision: Fail to reject H0
Since the p-value falls outside the
0.05
rejection region, we fail to reject the
z null hypothesis and can say that
-1.645 0
there is not sufficient evidence to
-1.58
support the employees’ claim that
the mean salary is less than
22
$45,000.
Example: Testing with Rejection
Regions
The mean cost of raising a child from birth to age 2 in a
rural area is $10,460. You believe this value is incorrect, so
you select a random sample of 900 children (age 2) and
find that the mean cost is $10,345 with a standard
deviation of $1540. At α = 0.05, is there enough evidence
to conclude that the mean cost is different from $10,460
23
Solution: Testing with Rejection
Regions
• H0: μ = $10,460 • Test Statistic
• Ha: μ ≠ $10,460 x 10, 345 10, 460
z
• = 0.05 n 1540 900
• Rejection Region: 2.24
• Decision: Reject H0
At the 5% level of significance,
0.025 0.025 you have enough evidence to
z conclude the mean cost of
-1.96 0 1.96
raising a child from birth to age
-2.24 2 in a rural area is significantly
different from $10,460.
24
p-Value Approach to Testing
• p-value: Probability of obtaining a test
statistic more extreme ( ≤ or ) than the
observed sample value given H0 is true
• Also called observed level of significance
= 0.05/2 = 0.05/2
= 0.05/2 = 0.05/2
X = 2.84 is translated
to a Z score of Z = -2.0
/2 = 0.025 /2 = 0.025
P(Z 2.0) 0.0228
0.0228 0.0228
P(Z 2.0) 0.0228
p-value
= 0.0228 + 0.0228 = 0.0456
-1.96 0 1.96 Z
-2.0 2.0
p-Value Example
• Compare the p-value with
• If p-value < , reject H0
• If p-value , do not reject H0
2.6832 ≤ μ ≤ 2.9968
X μ 53.1 52
Z 0.88
σ 10
n 64
Example: Decision
Reach a decision and interpret the result:
Reject H0
=
0.10
Reject H0 P( X 53.1)
= 0.10
53.1 52.0
P Z
0 10/ 64
Do not reject H0 Reject H0
1.28 P(Z 0.88) 1 0.8106
Z = 0.88
0.1894
38
Example: Interpreting a P-value
The P-value for a hypothesis test is P = 0.0237. What is
your decision if the level of significance is
1. 0.05?
Solution:
Because 0.0237 < 0.05, you should reject the null
hypothesis.
2. 0.01?
Solution:
Because 0.0237 > 0.01, you should fail to reject the
null hypothesis.
39
Finding the P-value
After determining the hypothesis test’s standardized test
statistic and the test statistic’s corresponding area, do one
of the following to find the P-value.
a. For a left-tailed test, P = (Area in left tail).
b. For a right-tailed test, P = (Area in right tail).
c. For a two-tailed test, P = 2(Area in tail of test statistic).
40
Example: Finding the P-value
Find the P-value for a left-tailed hypothesis test with a
test statistic of z = -2.23. Decide whether to reject H0 if
the level of significance is α = 0.01.
Solution:
For a left-tailed test, P = (Area in left tail)
P = 0.0129
z
-2.23 0
Because 0.0129 > 0.01, you should fail to reject H0
41
Example: Finding the P-value
Find the P-value for a two-tailed hypothesis test with a
test statistic of z = 2.14. Decide whether to reject H0 if
the level of significance is α = 0.05.
Solution:
For a two-tailed test, P = 2(Area in tail of test statistic)
1 – 0.9838
P = 2(0.0162)
= 0.0162
0.9838 = 0.0324
z
0 2.14
Because 0.0324 < 0.05, you should reject H0
42
Z-Test for a Mean μ
• Can be used when the population is normal and is known, or for
any population when the sample size n is at least 30.
• The test statistic is the sample mean
x
• The standardized test statistic is z
x standard error
z x
n n
• When n 30, the sample standard deviation s can be substituted for
.
43
Example: Hypothesis Testing
Using P-values
In an advertisement, a pizza shop claims that its mean delivery time is
30 minutes. A random selection of 36 delivery times has a sample mean
of 28.5 minutes and a standard deviation of 3.5 minutes. Is there
enough evidence to support the claim at = 0.01? Use a P-value.
44
Solution: Hypothesis Testing
Using P-values
• H 0: • P-value
• Ha: μ < 30 min
0.0051
• = 0.01
z
• Test Statistic: -2.57 0
x • Decision: 0.0051 < 0.01
z
n Reject H0
28.5 30
3.5 36
2.57
45
Topic: References
References
- Katz, D. L., Elmore, J. G., Wild, D., & Lucan, S. C. (2016). Jekel's Epidemiology,
Biostatistics and Preventive Medicine. Elsevier Health Sciences
- Merrill, R. M. (2013). Fundamentals of epidemiology and biostatistics: Combining the
basics. Jones & Bartlett Learning
- Bernard, R. (2017). Fundamental of Biostatistics. Jones & Bartlett Learning
46