Chapter 5:
Hypothesis Testing
Principles
Prepared: Ha Cheun Yuen
What is a Hypothesis Test?
• A hypothesis test is a statistical method that uses
sample data to evaluate a hypothesis about a
population
What Are The Steps For Hypothesis
Testing?
• First we state the null hypothesis H0.
• What is the null hypothesis?
• This states that in the general population there is no change,
no difference, or no relationship.
• Basically it says the opposite of what we are hoping to show.
Hypothesis Testing Continued
• Then we state the alternative hypothesis
• What is the alternative hypothesis?
• This states that there is a change, a difference, or a
relationship for the general population
• This is where we state what we believe (hypothesize) to be
true
Why Do We Do This?
• There is no way to PROVE a hypothesis. You can only
support a hypothesis, or reject it. If you support it
100,000 times, and then on the 100,001st time you
reject it, the hypothesis is not true.
• So, we seek to reject the null, and thus, conversely we
support the alternative.
The Next Step (Hypothesis Testing)
• Set the evaluation criteria
• By this, we are looking to assess an acceptable level of
error by chance
• What do we think is an acceptable probability that the
data we are looking at is “different”
Types of Error
𝛽
Type I and Type II
Type I
• rejecting when it is true, which is a false positive.
We denote the probability of this type of error
by .
Type II
• failing to reject when it is false, which is a false
negative.
• We denote the probability of this type of error by .
Significance Level
• In general, we test at 100% significance level for an in
the interval [0,1].
• Default choice is α = .05 (test ‘at the 5% significance
level’).
• The alpha level or the level of significance is a probability
value that is used to define the very unlikely sample outcomes
if the null hypothesis is true. In this case we would expect to
obtain this “outlier” sample in only 5% of the samples simply
by chance.
• This value of is subjective, and a different significance
level may be chosen.
• Significance level in testing as the complement of the
confidence level in estimation.
a 90% confidence level in estimation has parallels with
a 10% significance level in testing ( = 0:10)
a 95% confidence level in estimation has parallels with
a 5% significance level in testing ( = 0:05)
a 99% confidence level in estimation has parallels with
a 1% significance level in testing ( = 0:01).
rejecting at the 10% significance level reflects a weakly
signicant result, with weak evidence
rejecting at the 5% significance level reflects a
moderately significant result, with moderate evidence
rejecting at the 1% significance level reflects a highly
significant result, with strong evidence.
Critical values
• Critical values are specific points on the scale of a test
statistic’s distribution that define the boundary between
the rejection region where the null hypothesis is
rejected, and the region where it is not rejected
• These critical values are derived from the chosen
significance level, , which represents the probability of
making a Type I error (incorrectly rejecting a true null
hypothesis). Commonly used levels of significance
include 0.05, 0.01, and 0.10. The test statistic value
from the sample data is compared to the critical
value(s).
Rejection region for two tailed tests
Suppose we test:
this will be conducted using a z-test, hence critical values
will be drawn from N(0,1). For a two-tailed test, both tails
of the test statistic's distribution will form the rejection
region, which has a total area of . It is logical to split this
equally between the two tails of the distribution, hence
the critical values dene the boundaries which cut off
probability in each tail.
Rejection region for upper-tailed
tests
Suppose we test:
an upper-tailed test. For an upper-tailed test, only the
right tail of the test statistic’s distribution will form the
rejection region, which has a total area of .
Rejection region for lower-tailed
tests
Suppose we test:
a lower-tailed test. For an upper-tailed test, only the left
tail of the test statistic’s distribution will form the
rejection region, which has a total area of .
P-values
P-value (or probability value)
A p-value is the probability of the event that the `test
statistic' (a known function of our data) takes the
observed value or more extreme (i.e. more unlikely)
values under . It is a measure of the discrepancy between
the null hypothesis, , and the data evidence.
• A ‘small’ p-value indicates that the data are
inconsistent with .
• A ‘large’ p-value indicates that the data are consistent
with .
So, p-values may be seen as a measure of how
compatible our data are with the null hypothesis,
such that as the p-value gets closer to 1 then the
data evidence becomes more compatible with H0
(i.e. seems more credible), while as the p-value
gets closer to 0 then the data evidence becomes
less compatible with (i.e. seems more
incredible).
Interpretation of p-values
When testing at the 100% significance level, for in the
interval [0,1], then:
Steps for Hypothesis Testing
1. State the claim mathematically and verbally. Identify the null and
alternative hypotheses.
H0: ? Ha: ?
2. Specify the level of significance. This sampling distribution
is based on the assumption
α= ? that H0 is true.
3. Determine the standardized
sampling distribution and
sketch its graph. 0
z
4. Calculate the test statistic
and its corresponding
standardized test statistic. 0
z
Standardized test
Add it to your sketch. statistic
Steps for Hypothesis Testing
5. Find the P-value.
6. Use the following decision rule.
Is the P-value less
than or equal to the
No Fail to reject H0.
level of significance?
Yes
Reject H0.
7. Write a statement to interpret the decision in the
context of the original claim.
Summary
• Stated a null hypothesis and an alternative hypothesis
• Identified type I and type II errors and interpreted the
level of significance
• Determined whether to use a one-tailed or two-tailed
statistical test and found a p-value
• Made and interpreted a decision based on the results of
a statistical test
• Wrote a claim for a hypothesis test