### Hypothesis testing

1
1
STAM4000
Quantitative Methods
Week 8
Hypothesis testing
https://www.pinterest.com.au/pin/545357836118376197/
Kaplan Business School (KBS), Australia 1
2
COMMONWEALTH OF AUSTRALIA
WARNING
This material has been reproduced and communicated to you by or on behalf of Kaplan
Business School pursuant to Part VB of the
The material in this communication may be subject to copyright under the Act. Any further
reproduction or communication of this material by you may be the subject of copyright
protection under the Act.
Do not remove this notice.
2
Kaplan Business School (KBS), Australia 2

 3 ing #1 #2 #3 Describe the steps of hypothesis testing Construct hypothesis tests for one population mean Examine errors in hypothesis testing Week 8 Hypothesis test Learning Outcomes

Kaplan Business School (KBS), Australia 3
4
Why does this matter?
We sometimes need to
determine if there is
significant evidence to
support a claim.
Kaplan Business School (KBS), Australia 4
5
#1 Describe the steps of hypothesis testing
cCegQIABAA&oq=steps+funny+animals&gs_lcp=CgNpbWcQAzoHCCMQ6gIQJzoECCMQJzoECAAQQzoCCAA6CAgAELEDEIMBOgUIABCxAzoHCAAQsQMQQzoGCAAQBRAeOgYIABAIEB46BAgAEB5QgdsEWMuABWD8ggVoAXAAeACAAfoBiAGZGpIBBjAuMTguMZgBA
KABAaoBC2d3cy13aXotaW1nsAEKwAEB&sclient=img&ei=0VEGYNDkHMqu3LUPpreWmAY&bih=433&biw=1013&rlz=1C1CHBF_enAU841AU846&hl=en#imgrc=Muqzigq1hZoPTM
Kaplan Business School (KBS), Australia 5
6
#1 What is a hypothesis?
A hypothesis is an
idea,
claim or
belief
that we want to test,
using a sample.
Photo by Jonathan Daniels on Unsplash
We are continuing with INFERENTIAL STATISTICS,
where we use a sample to infer or draw conclusions
on the population.

Learn the steps in hypothesis testing
Step 1: Write the hypotheses
Step 2: Find the calculated test statistic and/or the p-value
Step 3: Find the critical value
Step 4: Sketch the curve, showing the rejection region
Step 5: Decision
Step 6: Conclusion
Notes:
Step 1, hypotheses must be stated in advance, before sampling etc.
Steps 2, 3 and 4 may be interchanged
Steps 5 and 6 must follow this order.
7
#1 Steps in hypothesis testing
Test for μ, so we
need symbol of μ or
u in our
hypotheses.
Use a formula to
COMPARE the x
bar with u from
our hypotheses.
Critical value is
from the
“statistical
tables”
Sketch a
curve for
perspective
or context
Comparison,
e.g.: compare
critical value with
calculated value
Ties the decision to
the original
question

Hypotheses
Null hypothesis, Ho
o Expresses what we initially ASSUME to be true.
Alternative Hypothesis, denoted by Ha, HA, or H1
o Expresses our claim into a statement that we are trying to gather
enough evidence to PROVE is NOW true.
The goal in hypothesis testing is to determine whether there is enough evidence to
infer (or draw the conclusion) that the null hypothesis is no longer true and the
alternative hypothesis is now true.
8
#1 Step 1: Write the hypotheses

 •Expresses what we initially ASSUME to be true. •Expresses our claim into a statement that we are trying to gather enough evidence to PROVE is NOW true.

Null hypothesis, denoted by
Ho
Alternative Hypothesis,
denoted by
Ha, H
A, or H1
Ho is read as “H nought”
9
9
An individual is thought to have committed a crime and is brought before a court
of law.
In Australia, we presume the individual is innocent,
then gather evidence to try and prove they are guilty.
We have two hypotheses:
Ho: individual is innocent, ASSUME THIS IS TRUE
Ha: individual is guilty, PROVE THIS IS NOW TRUE
Objective of
testing:
gather evidence
to reject Ho and
accept Ha.
#1 Introductory example
Introductory Example
An individual is caught committing a crime.
This individual is prosecuted in a court of law.
It is assumed the individual is innocent.
Evidence is gathered to try to reject innocence and conclude the individual is, in fact, guilty.
How do we represent this in hypotheses?
We write two hypotheses:
Ho: individual is innocent
Ha: individual is guilty
The goal in hypothesis testing is to determine whether there is enough evidence to infer (or
draw the conclusion) that the alternative hypothesis is true.
l
Kaplan Business School (KBS), Australia 9
10

 10 Two Correct outcomes Two Incorrect outcomes (errors)

Possible outcomes in our introductory example?
Innocent
individual is freed
Guilty individual is
imprisoned
Innocent
individual is
imprisoned
Guilty individual
is freed
Four Possible outcomes
#1
Possible outcomes in our introductory example?
Hypotheses,
Ho:
individual is innocent
Ha:
individual is guilty
Four possible outcomes:
Two correct outcomes:
i) innocent
individual is freed
ii) guilty
individual is imprisoned
Two incorrect outcomes (errors)
i) innocent
individual is imprisoned
ii) guilty
individual is freed
Later, we will discuss errors in testing, in detail.
Kaplan Business School (KBS), Australia 10

11
11
Quick quiz
Let’s use the previous example, with the following
hypotheses:
Ho: individual is innocent, ASSUME Ho TRUE
Ha: individual is guilty, Prove Ho is false, and Ha is TRUE
Which is worse:
an innocent individual going to prison
or
a guilty individual going free?
#1
An innocent individual going
to prison is WORSE.
This type of error occurs if
we INCORRECTLY REJECT Ho.
We have INCORRECTLY
accepted Ha of guilt.
This type of error is called a
TYPE I error.
P(TYPE I ERROR) =
α, the
level of significance.
Quick Quiz
Let’s use the previous example, with the following hypotheses:
Ho: individual is innocent
Ha: individual is guilty
Which is worse:
An innocent individual going to prison
or
a guilty individual going free?
The worst of these is an innocent individual going to prison.
Kaplan Business School (KBS), Australia 11

The calculated test statistic is a value calculated using a formula, which has been
specifically chosen, to compare the population scenario in the null hypothesis and the
values from a sample.
The p-value is the corresponding probability-value of the calculated test statistic.
If we are looking at a sketch of a curve:
The calculated test statistic(s) would lie on the horizontal axis.
The p-value is the area(s) under the curve, corresponding to the calculated test
statistic value(s) , or more extreme) in the tail(s), if Ho were really true.
12
#1 Step 2:Find the calculated test statistic and/or the p-value

 •Value from a formula, quantifying the difference between what is the population and what is in the sample. •The probability of getting our sample results or more extreme, if our null hypothesis were really true.

hypothesised in
Calculated test statistic
p-value :
is a probability
value related to the
calculated test statistic
and the direction in Ha.

13
13
p-value has become
more popular with
technology easily
providing p-values.
13
The critical value is that value which determines the rejection region, hence is critical
in the decision step of the hypothesis test process.
The critical value, in part, relies on the level of significance, α.
Is also called the significance level.
The level of significance, α, is the area or probability in the tail(s) of a curve.
α and the direction in Ha help us define the rejection region by finding the critical
value(s).
Usually, 1% ≤ α ≤ 10% or 0.01 ≤ α ≤ 0.10.
α should be selected by the researcher before a sample is selected. Why? The
selection of α, has an impact on the rejection region and hence on the decision.
α is the probability of incorrectly rejecting Ho. This is P(Type I error) – see later.
α is the probability associated with the critical value.
14
#1 Step 3: Find the critical value

 •As a minimum, we need: o Relevant statistical tables or technology o Level of significance, α, or SIGNIFICANCE LEVEL o Number of tails in Ha

Critical value
•Area of rejection region or rejection regions
•Probability of Type I error (later)
Level of significance, α
15
15
Ho:
Ha:
Objective is to reject Ho and accept Ha, usually the case.
15
Sketch a curve:
The type of curve we sketch, depends on the distribution we are using for the
hypothesis test e.g.’ Z or t – more later
The rejection region(s), will lie in the tail(s) of the curve.
For the purpose of a hypothesis test, we can divide the curve into two main sections:
Horizontal axis: this follows the scale of the variable.
Area beneath the curve: this is the probability related to the calculated test
statistic value and the direction of the alternative hypothesis
16
#1 Step 4: Sketch a curve

 • oOn axis of curve: ▪Insert critical value(s), axis for TODAY ▪Label rejection region(s) = AREA UNDER CURVE THAT TOTALS TO ▪Insert calculated value, from the formula oIn area beneath curve ▪Insert α ▪Insert p-value (if relevant), is the

Ha determines the number of tails in a curve
on the Z or t
α
probability related to the calculated
test statistic AND direction in Ha
Sketch a curve: for
perspective or context,
for yourself

17
17
17
Decision:
There are two possible methods we can use in the decision step of hypothesis testing:
i. Critical value method: comparing values on the horizontal axis of the curve
or
ii. p-value method: comparing areas (probabilities) beneath the curve
Whether we choose the critical value method or the p-value method depends on the information we
are given/question asked. The p-value method has become more popular with the progress of
technology.
The decision should include:
Whether the null hypothesis is rejected or retained.
The process to make that decision, in the context of the question i.e. the comparison of the
calculated test statistic with the critical value OR the comparison of the p-value with α.
The significance level, α, used to make that decision. Why? Different significance levels, will have
different critical values and rejection regions which may/may not result in different decisions and
conclusions.
In research, usually the sample size is also noted.
Conclusion:
This is the most important step in hypothesis testing.
Here, we are tying our decision to the original question – i.e. we are answering the original question.
18
#1 Steps 5: Decision and Step 6: Conclusion

 i. Critical value method: compare calculated test statistic with critical value(s). or ii. p-value method: compare p-value, of calculated test statistic, with α

Decision
If we reject Ho, then we may accept Ha.
BUT, if we
fail to reject Ho, then we must RETAIN Ho;
we NEVER accept Ho.
cCegQIABAA&oq=hypothesis+testing+picture+funny&gs_lcp=CgNpbWcQAzoCCAA6BAgAEBg6BAgAEB5Q31VYs21gsW9oAHAAeAGAAYEEiAH9FZIBCjAuMTIuMS41LTGYAQ
CgAQGqAQtnd3Mtd2l6LWltZ8ABAQ&sclient=img&ei=DloHYLXLLcHErQHa87OwCQ&bih=462&biw=994&rlz=1C1CHBF_enAU841AU846&hl=en
19
19
Critical value method:
compares VALUES ON
THE AXIS OF THE
CURVE
p-value method:
compares AREAS
under the curve.
These two methods
will give us the SAME
DECISION, but they are
focused on two
different aspects of
the curve.
Whether we
choose to use the
critical method or
the p-value
method:
information
provided
wording of the
question
Ho: innocent
Ha: guilty
19
20
#2 Construct hypothesis tests for one population mean, μ
cCegQIABAA&oq=under+construction+funny+comic&gs_lcp=CgNpbWcQAzoCCAA6BAgAEB46BggAEAUQHjoGCAAQCBAeUK6KCFivmAhguZoIaABwAHgAgAG4AYgBhwiSAQMwLjaYAQCgAQGqAQtnd3Mtd2l6LWltZ8ABAQ&sclient=img&ei=HIMHYIalFbakrtoPpfa4k
AI&bih=433&biw=1013&rlz=1C1CHBF_enAU841AU846&hl=en#imgrc=0jMX3p-8zMiXmM
Kaplan Business School (KBS), Australia 20
Test hypotheses about one population mean, μ
In this class, we will be using quantitative data and testing for values of the population mean, μ.
Both our null and alternative hypotheses will include the population mean symbol, μ.
The null hypothesis will contain an “=“ symbol.
The alternative hypothesis will have a direction determined by the wording of the question.
21
#2 Test hypotheses about one population mean, μ
22
α is also called the significance level.
α, and the direction in Ha, will help us define the rejection region by finding the critical
value(s).
Usually, 1% ≤ α ≤ 10% or 0.01 ≤ α ≤ 0.10.
α of 1% is a very strict test, as it has a very small rejection region, area totalling 0.01
α of 10% is a more lenient test, as it has a larger rejection region, area totalling 0.10
α should be selected by the researcher before a sample is selected.
α is the probability of incorrectly rejecting Ho.
#2 The level of significance, α
How is α used in confidence intervals, as compared to hypothesis testing?
In Confidence intervals:
The confidence level is (1 -α)
The confidence interval % is (1 -α)%
With confidence intervals, we are interested in a “central range” of the curve.
In hypothesis testing:
The tail(s) of the curve have a total area (probability) of α.
We are interested in the tail(s) of the curve.
Can a confidence interval be used for a hypothesis test? Yes. Its straightforward for a twotailed test for the population mean, μ,when the population standard deviation, σ, is known.
If the null hypothesis value of the population mean, μ, lies outside in the CI, we reject Ho.
Otherwise, we retain Ho.
Note: we will concentrate on the hypothesis test steps to test hypotheses.
Kaplan Business School (KBS), Australia 22

23
23
α
= P(Type I error)
= probability of incorrectly rejecting Ho
We may choose the level of
α
we are willing to tolerate for a hypothesis test.
α
will be specified:
α
level of significance
significance level
in either % or decimal form.
23
24
Denotes
position of
critical
Ho: μ = value value(s)
Ha : μ < value, left-tailed, directional 0

 Ho: μ = value One tailed test in the right or upper tail a

Ha : μ > value, right-tailed, directional
a
One tailed test in the left or lower tail
0

 Two-tail test REJECTION REGION /2 REJECT Ho Ho: μ = value Total area = 100% or 1 REJECT Ho

Rejection
region(s) is