Professional Documents
Culture Documents
ECON 940 - Lecture 9 2019 PDF
ECON 940 - Lecture 9 2019 PDF
Learning objectives
• Explain the logic involved in hypothesis testing
and be able to establish null and alternate
hypotheses
• Implement the 6 step approach to test
hypotheses
• Perform a hypothesis test about a single
population mean when σ is known
• Perform a hypothesis test about a single
population mean when σ is unknown
• Test hypotheses about a single population
proportion
1
13/05/2019
What is hypothesis Testing?
Hypothesis testing isn't just for population means and standard
deviations. You can use this procedure to test many different kinds
of propositions. Examples:
• A jury trial can be seen as a hypothesis test with a null hypothesis
of “Not Guilty" and an alternative hypothesis of "guilty."
• Hypothesis testing of the conception that people with obese
parents are likely to become obese themselves. Does genetics
play a part in a person’s weight?
• Do we buy a new machine for our factory or stay with the current
one?
• Are at least 60% of our customers female?
What is a Hypothesis?
A hypothesis is a statement (assumption) about a population
parameter
population mean
Example: The mean monthly mobile phone bill of this city is $ 72.
μ = $72
Example: The mean waiting time for bank service counter is more than 5
minutes.
μ > 5
population proportion
Example: The proportion of adults in this city with mobile phones is
89 per cent.
p = 0.89
Example: The proportion of children overweight in Australia is more
than 30 per cent.
4 p > 0.30
2
13/05/2019
Hypothesis testing fundamentals
• Hypothesis testing
– A process of testing hypotheses about
parameters by setting up null and alternative
hypotheses and using statistical techniques to
reach conclusions about the hypotheses
• Statistical hypotheses
– A formal hypothesis structure consisting of the
null hypothesis and the alternative hypothesis,
which together contain all possible outcomes
of the experiment or study
Hypothesis testing fundamentals
• Null hypothesis
– The hypothesis that assumes the status quo –
that the old theory, method or standard is still
true; the complement of the alternative
hypothesis
• Alternative hypothesis
– The hypothesis that complements the null
hypothesis. Usually it is the hypothesis that the
researcher is interested in proving
3
13/05/2019
Null and alternative hypotheses
• The null and alternative hypotheses are
mutually exclusive. Only one of them can
be true
• The null and alternative hypotheses are
collectively exhaustive. They are stated to
include all possibilities.
• The null hypothesis is assumed to be true
• The burden of proof falls on the alternative
hypothesis
Null and alternative hypotheses
The Null Hypothesis, H0
• States the belief or assumption in the current situation
(status quo)
• Begin with the assumption that the null hypothesis is true
• Similar to the notion of innocent until proven guilty
• Refers to the status quo
• Always contains ‘=‘ , ‘≤’ or ‘’ sign
• May or may not be rejected
• Is always about a population parameter, eg. μ ,not about
a sample statistic X
4
13/05/2019
The Alternative Hypothesis, Ha
• Is the opposite of the null hypothesis
• e.g. The average number of TV sets in Australia homes
is not equal to 3 ( Ha: μ ≠ 3 )
• Challenges the status quo
• Can only can contain either the ‘<‘ , ‘>’ or ‘≠’ sign
• May or may not be proven
• Is generally the claim or hypothesis that the
researcher is trying to prove
Hypothesis Testing Process
Assumption: the
population
mean age is 50.
(Null Hypothesis:
H0: μ = 50 ) Population
Now select a
random sample
5
13/05/2019
Reason for Rejecting the Null Hypothesis
Sampling Distribution of X
X
20 μ = 50
If H0 is true ... then we
If it is unlikely
reject the null
that we
would get a hypothesis
sample mean ... if in fact this were that μ = 50
of this value.. the population mean…
11
The Level of Significance,
• Defines the unlikely values of the sample statistic if
the null hypothesis is true
• Defines rejection region of the sampling distribution
• Is designated by , (level of significance)
• Typical values are 0.01, 0.05, or 0.10
• Note relationship to 99%, 95% and 90% confidence
levels
• Is selected by the researcher at the beginning
• Provides the critical value (s) of the test
12
6
13/05/2019
One‐tailed and two‐tailed tests
• One‐tailed test – a statistical test wherein
the researcher is interested in testing
deviations from the null in one direction
only
: 0.6
: 0.6
• Two‐tailed test ‐ a statistical test wherein
the researcher is interested in testing
deviations from the null in two directions
: 1.5
: 1.5
Rejection and nonrejection regions
Figure 9.1
7
13/05/2019
Rejection and nonrejection regions
• Rejection region – if a computed statistic
lies in this portion of the distribution, the
null hypothesis will be rejected
• Nonrejection region – any portion of the
distribution that is not in the rejection
region. If the observed statistic falls in this
region the decision is to fail to reject the
null hypothesis
• Critical value – the value that divides the
nonrejection region from the rejection
region
Type I and Type II errors
• Type I Error
– Rejecting a true null hypothesis
– The probability of committing a Type I error is
called , the level of significance
• Type II Error
– Failing to reject a false null hypothesis
– The probability of committing a Type II error is
called .
– The power of a test is the probability of rejecting
a false null hypothesis (1‐ )
8
13/05/2019
Decision table for hypothesis testing
Table 9.1
Decision Rule
Decision Rules
H0 : Not Guilty
HA : Guilty This is what police want to prove
9
13/05/2019
Six‐step approach to hypothesis
testing
• Set up and
• Decide on the type and direction of the test
• Decide on level of significance and
determine the critical value(s) and region(s)
• Write down the decision rule
• Select a random sample and do relevant
calculations
• Draw a conclusion
Example
• Do the average income of country CPA is
different now?
• Last year average income was $ 74, 914.
• In order to test the claim the data from
sample of 112 country CPAs to get a sample
mean of $78695.
• Assume the population standard deviation
is $14, 530
10
13/05/2019
Tests for a population mean(σ known):
CPA net income example
• Step 1
• Step 2 – determine
appropriate test – large
sample, testing the mean,
and have population
standard deviation – z test
• Step 3 – specify a – 0.05
• Step 4 – decision rule – if
we calculate a z statistic
greater than 1.96 or less Figure 9.5
than ‐1.96 the decision will
be to reject the null
hypothesis
Tests for a population mean: CPA net income example
• Step 5 – gather the data from sample of 112 CPAs to get
a sample mean of $78695 and calculate the test statistic
x 78695 74914
z 2.75
14530 z = 2.75 > 1.96
n 112
• Step 6 – state the statistical conclusion. Reject the null
hypothesis
Make a decision. Even though the test was simply whether
the average income was different to the old average,
sample evidence indicated that this average may now be
higher.
Test the claim that average income of country CPA are
higher than last year value of $74, 914.
11
13/05/2019
The critical value method
• Critical value method – a method of testing
hypotheses in which the sample statistic is
compared to a critical value in order to
reach a conclusion about rejecting or failing
to reject the null hypothesis
The p‐value method
• p-value – the probability of getting a test statistic at
least as extreme as the observed test statistic
computed under the assumption that the null
hypothesis is true. It is the smallest level of a for
which the null hypothesis can be rejected
• Observed significance level – another name for the
p-value method of testing hypotheses
• E.g. – an observed test statistic of z=2.04. the
probability of obtaining a value this great or greater
is 0.5000-0.4793 = 0.0207. the researcher would
reject the null hypothesis for a = 0.05 or 0.10 but
not reject for a ≤ 0.0207 (such as a = 0.01)
12
13/05/2019
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
– Obtain the p‐value from a table or computer
• If p‐value < , reject H0
• If p‐value , do not reject H0
Upper‐tail Z Test for Mean ( Known) Example
A phone industry manager claims that customer
monthly mobile phone bills have increased (in other
words the status quo has changed), and now average
over $52 per month. The company wishes to test this
claim
(Assume = 10 is known)
Step 1: State Ho and Ha
H0: μ ≤ 52 the average is not over $52 per month
Ha: μ > 52 the average is greater than $52 per month (i.e. sufficient
evidence exists to support the manager’s claim)
26
13
13/05/2019
Upper‐tail Z Test for Mean ( Known)
Suppose that = 0.10Example
is chosen for this test. What is Z
given a = 0.10?
= 0.10
0.90
27
Upper‐tail Z Test for Mean ( Known) Example
Obtain sample and compute the test statistic
• Suppose a sample is taken with the following results:
n = 64, X = 53.1 (=10 was assumed known)
• Then the test statistic is
X μ 53.1 52
Z 0.88
σ 10
n 64
28
14
13/05/2019
Upper‐tail Z Test for Mean ( Known) Example
Reach a decision and interpret the result
= 0.10
Do not reject H0
Reject H0
1.28
0
Z = 0.88
Do not reject H0 since Z = 0.88 ≤ 1.28
i.e. there is not sufficient evidence that the mean bill is
over $52
29
p‐value Solution
53.1 52.0
P Z Reject H0
10/ 64 = 0.10
30
15
13/05/2019
Testing hypotheses about a population
mean using the t statistic (σ unknown)
• The t distribution is used to analyse
hypotheses about a single population mean
when σ is unknown if the population is
normally distributed for the measurement
being analysed.
• The formula for testing such hypotheses is:
Two‐Tail Test ( Unknown) Example
The average cost of a hotel room in New York is said to
be $168 per night.
In order to test the claim of the average cost of a hotel
room is different to $160, a random sample of 25
hotels resulted in an average of $172.50 and standard
deviation of $15.40
Test at the = 0.05 level.
(Assume the population distribution is normal)
H0: μ = 168
H1: μ ≠ 168
32
16
13/05/2019
Two‐Tail Test ( Unknown) Example
H0: μ = 168
H1: μ ≠ 168
Do not reject H0: not sufficient evidence that true mean cost is different
than $168
33
z test of population proportion
pˆ p
Z n 20
pq
n n p 5, and
where : pˆ = sample proportion nq 5
p = population proportion
q 1 - p
17
13/05/2019
Testing hypotheses about
a proportion: manufacturer example
• A Manufacturer
believes exactly 8% of
its products contain at
least 1 minor flaw
H o : p .08
H a : p .08
If z 1.645, reject H o
If z 1.645, do not reject H o
33 Figure 9.10
pˆ .165
200
pˆ p .165 .08
z 4.43
pq (.08)(.92)
n 200 Since z 4.43 1.645, reject H o
Applied Activity
18
13/05/2019
In this question we need to test the claim that the mean delivery time is
less than 6 hours. To do this we conduct a hypothesis test using the given
information.
Hypotheses:
Ho: 6
Ha: < 6
x
Test statistic: t
s
n
5.87 6 0.13
t 0.90
1.02 0.144
50
Conclusion: Since tcalc > tcritical (-0.90 > -1.6766) we do not reject Ho.
There is insufficient evidence at the 5% level of significance to support the
courier’s claim that the mean delivery time is less than 6 hours.
19