Вы находитесь на странице: 1из 23

Eddy Lam

2017.11.16
 Idea: To make inference about a population based on
information from a random sample taken from it

Sample

Population

…… ©
©
Martin’s Family Fruit Farm, 2015.
Quintessential Leader, 2013
© Total IT Solution, 2014
© Imgarcade, 2015.
 Null hypothesis (𝑯𝑯𝟎𝟎 )
 Alternative hypothesis 𝑯𝑯𝟏𝟏
𝐻𝐻0 : associated with some general belief and something you would like
to protect.
(e.g. the standard drug A and the newly developed drug B are equally effective)

"="
𝐻𝐻1 : associated with new concepts, some new claims or researchers’
hypotheses
(e.g. the newly developed drug B is more effective than the standard drug A)

"<"

© New Drug Approvals, 2013


© Packitgourment, 2015.
𝑯𝑯𝟎𝟎
 𝐻𝐻0 and 𝐻𝐻1 must be mutually exclusive.
 Decision: Either to reject 𝑯𝑯𝟎𝟎 or Fail to reject 𝑯𝑯𝟎𝟎 .

 Court case in Hong Kong where we are practicing Common


Law:
 𝐻𝐻0 : the “suspect” is innocent.
vs
 𝐻𝐻1 : the “suspect” has committed the crime.
 Throughout the trial, there is an important assumption- “𝑯𝑯𝟎𝟎
is true” and the prosecutor will provide evidence in court
(statistic) to convince the jury that the “suspect” had
actually committed the crime (reject 𝑯𝑯𝟎𝟎 ).
 People say, May Hall is a Haunted House at HKU…
 which is basically a claim
 To accept a claim (believe in
 some new concepts), we
 need some proof or evidence
 𝐻𝐻0 : May Hall is NOT a Haunted House.
 -> No ghost will come out at night.
 𝐻𝐻1 : May Hall is a Haunted House.
 -> At least one ghost will come out at night.
Assume that 𝐻𝐻0 is true:
 You will not be able to find a ghost at May Hall
 But IF you happen to see one, please make sure
that
 you are not psychotic
 you do not suffer from any mental illness
 you do not have any illusive symptoms
 you are not day/night dreaming
 your friends are not playing a trick on you
 it’s not halloween
If the above conditions do not apply to you, your
observation do not quite agree with 𝑯𝑯𝟎𝟎 .
You may consider to reject 𝐻𝐻0 and
RUN!!!
 The null hypothesis can be regarded as
the state of status quo and that no
action would be needed if the null
hypothesis cannot be rejected as
everything will remain unchanged!
 The alternative hypothesis can be
regarded as some new theories, some
new claims and that some further
follow-up will be needed if the null
hypothesis is to be rejected (reject 𝐻𝐻0
means accept 𝐻𝐻1 ).
𝑯𝑯𝟎𝟎 ;
𝑯𝑯𝟏𝟏 or 𝑯𝑯𝒂𝒂 ;
Test Statistic;
Rejection Region.
A chemical process has produced, on the average, 800 tons
of chemicals per day.
The amount produced on each day may be assumed to be
normally distributed with known variance 𝜎𝜎 2 = 75.
The daily yields for the past week were 785, 805, 790, 793,
and 802 tons.
Do these data indicate that the average yield is less than 800
tons and hence something is wrong with the process that
requires attention?
𝑖𝑖𝑖𝑖𝑖𝑖
(1) 𝑌𝑌𝑖𝑖 ~ 𝑁𝑁 𝜇𝜇, 𝜎𝜎 2
𝜎𝜎 2 = 75
𝜇𝜇 − 𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝 𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝
(2) 𝑯𝑯𝟎𝟎 : 𝝁𝝁 = 𝟖𝟖𝟖𝟖0
(there is nothing wrong with the manufacturing process)
𝑣𝑣𝑣𝑣
𝑯𝑯𝟏𝟏 : 𝝁𝝁 < 𝟖𝟖𝟖𝟖𝟖𝟖
(something went wrong with the manufacturing process and some
remedial actions need to be taken if 𝐻𝐻0 is rejected)
� estimates 𝜇𝜇.
 𝑌𝑌
� , the more likely we will reject 𝑯𝑯𝟎𝟎 .
 The smaller is the value of 𝒀𝒀
(3) Test statistic: �𝑌𝑌
(4) Rejection Region, say
𝑹𝑹𝑹𝑹 = {𝑌𝑌� < 790}
or more generally 𝑹𝑹𝑹𝑹 = 𝑌𝑌� < 𝑘𝑘
 Guilty!!! or Not Guilty!!!

13
Decision

(𝑯𝑯𝟎𝟎 ) (𝑯𝑯𝟏𝟏 )
Innocent Guilty
“Set free” “Jail”
“He” has not
done it I 冤
FACT

II
“He” has
done it
 𝐻𝐻0 𝑣𝑣𝑣𝑣 𝐻𝐻1
Hidden Truth Innocent “set free” Guilty “jail”

✓ I - 冤枉!(Injustice)
“He” has not done it.

II – (money changes everything) ✓


“He” has done it.

𝛼𝛼 = 𝑃𝑃 𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡 𝑰𝑰 𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒
= 𝑃𝑃(𝐻𝐻0 𝑖𝑖𝑖𝑖 𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟|𝐻𝐻0 𝑖𝑖𝑖𝑖 𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡)
With reference to example 7.1,
𝑌𝑌1 , ⋯ , 𝑌𝑌𝑛𝑛 ~𝑁𝑁(𝜇𝜇, 𝜎𝜎 2 )
𝑛𝑛 = 5, 𝜎𝜎 2 = 75,
(1) 𝐻𝐻0 : 𝝁𝝁 = 𝝁𝝁𝟎𝟎 = 𝟖𝟖𝟖𝟖𝟖𝟖 𝑣𝑣𝑣𝑣 𝑯𝑯𝟏𝟏 : 𝝁𝝁 < 𝟖𝟖𝟖𝟖𝟖𝟖
𝜎𝜎 2
(2) Test statistic: 𝑌𝑌� [From Chapter 6, we know that 𝑌𝑌~𝑁𝑁
� 𝜇𝜇, 𝑛𝑛 ]
(3) 𝑅𝑅𝑅𝑅 = 𝑌𝑌� < 𝑘𝑘 = 790 .
𝑯𝑯𝟎𝟎 : 𝝁𝝁 = 𝟖𝟖𝟖𝟖𝟖𝟖

𝛼𝛼 = 𝑃𝑃 𝑌𝑌� < 790 𝑯𝑯𝟎𝟎 𝑖𝑖𝑖𝑖 𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡


2
𝜎𝜎 75
= 𝑃𝑃 𝑌𝑌� < 790 𝑌𝑌~𝑁𝑁
� 𝝁𝝁 = 𝟖𝟖𝟖𝟖𝟖𝟖, =
𝑛𝑛 5
𝑌𝑌� − 𝜇𝜇 790 − 𝟖𝟖𝟖𝟖𝟖𝟖
= 𝑃𝑃 <
𝜎𝜎/ 𝑛𝑛 15
= 0.0049
𝛽𝛽 = 𝑃𝑃 𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡 𝑰𝑰𝑰𝑰 𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒
= 𝑃𝑃(𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓 𝑡𝑡𝑡𝑡 𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟 𝐻𝐻0 |𝑯𝑯𝟏𝟏 𝑖𝑖𝑖𝑖 𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡)
 𝜷𝜷 cannot be calculated with a composite alternative
>
(𝐻𝐻1 : 𝜃𝜃 ≠𝜃𝜃0 ), but only with a simple 𝐻𝐻1 like 𝐻𝐻0 .
<
 For example, 𝑯𝑯𝟎𝟎 : 𝝁𝝁 = 𝟖𝟖𝟖𝟖𝟖𝟖 𝑣𝑣𝑣𝑣 𝑯𝑯𝟏𝟏 : 𝝁𝝁 = 𝟕𝟕𝟕𝟕𝟕𝟕.

∴ 𝛽𝛽 = 𝑃𝑃 𝑌𝑌� > 790 𝑯𝑯𝟏𝟏 𝑖𝑖𝑖𝑖 𝑡𝑡𝑡𝑡𝑡𝑡𝑡𝑡


75
= 𝑃𝑃 𝑌𝑌� > 790 𝑌𝑌~𝑁𝑁
� 𝟕𝟕𝟕𝟕𝟕𝟕,
5

𝑌𝑌 − 𝜇𝜇 790 − 𝟕𝟕𝟕𝟕𝟕𝟕
= 𝑃𝑃 >
𝜎𝜎/ 𝑛𝑛 15
= 𝑃𝑃 𝑍𝑍 > 1.29
= 0.0985.
 There is a trade-off between 𝛼𝛼 and 𝛽𝛽 if the sample size 𝑛𝑛 is fixed.

𝛼𝛼 β

 Say if we set 𝑘𝑘 = 796 instead of 𝑘𝑘 = 790, we have


� < 796 𝐻𝐻0 = 0.1515 (𝛼𝛼 = 0.0049 for 𝑘𝑘 = 790);
 𝛼𝛼 = 𝑃𝑃 𝑌𝑌
� > 796 𝐻𝐻1 = 0.0023 (𝛽𝛽 = 0.0985 for 𝑘𝑘 = 790).
 𝛽𝛽 = 𝑃𝑃 𝑌𝑌
• Enlarging the critical
region will increase 𝛼𝛼 and
decrease 𝛽𝛽 (or vice versa).
• How can one reduce both
𝛼𝛼 and 𝛽𝛽 simultaneously?
• Increase 𝑛𝑛‼
• We should achieve a
better balance between
the risks of committing a
type I or type II error if
both 𝛼𝛼 and 𝛽𝛽 can be
calculated.
 Power of the test is defined as
 1 − 𝛽𝛽 = 𝑃𝑃 rejecting 𝐻𝐻0 𝐻𝐻0 is not true)
 We would like to have a test with strong
power so that the correct decision to
reject the null hypothesis can be made
with a large probability content (say
effectiveness of a certain new drug /
treatment protocol)!
 However, 𝛽𝛽 cannot be computed in
general as we do not normally have a
simple alternative in reality!
 Then there is no way we can strike a
balance between the probability of
committing the two types of errors.
 As more protection will be placed on 𝐻𝐻0 ,
we simply fix the probability of
committing a type I error, 𝛼𝛼, to be small.
 Most commonly used values of 𝛼𝛼 are:
 𝛼𝛼 = 0.05, 0.01, 0.10 Level of significance
To complete Example 7.1
We have
𝐻𝐻0 : 𝜇𝜇 = 𝜇𝜇0 = 𝟖𝟖𝟖𝟖𝟖𝟖
𝐻𝐻1 : 𝜇𝜇 < 𝟖𝟖𝟖𝟖𝟖𝟖
by setting 𝛼𝛼 = 0.05 and under 𝐻𝐻0 , we have

𝛼𝛼 = 0.05 2
𝜎𝜎
= 𝑃𝑃 𝑌𝑌� < 𝑘𝑘 𝑌𝑌~𝑁𝑁
� 𝜇𝜇 = 𝟖𝟖𝟖𝟖𝟖𝟖, = 15
𝑌𝑌� − 𝜇𝜇 𝑘𝑘 − 𝟖𝟖𝟖𝟖𝟖𝟖 𝑛𝑛
= 𝑃𝑃 <
𝜎𝜎 2 /𝑛𝑛 15
𝑘𝑘 − 𝟖𝟖𝟖𝟖𝟖𝟖
= 𝑃𝑃 𝑍𝑍 < , where 𝜇𝜇0 = 800
2
𝜎𝜎 /𝑛𝑛
𝑘𝑘 − 𝜇𝜇0
∴ = −1.645
𝜎𝜎/ 𝑛𝑛 𝜎𝜎
𝑘𝑘 = 𝜇𝜇0 − 1.645 ×
𝑛𝑛
𝟕𝟕𝟕𝟕
= 𝟖𝟖𝟖𝟖𝟖𝟖 − 1.645 ×
𝟓𝟓
= 793.63.
∴ 𝑅𝑅𝑅𝑅 = 𝑌𝑌� < 793,63
OR equivalently
𝑦𝑦� − 𝝁𝝁𝟎𝟎
if 𝑍𝑍 =
𝝈𝝈/ 𝒏𝒏
< −1.645 − 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 𝑣𝑣𝑣𝑣𝑣𝑣𝑣𝑣𝑣𝑣, then 𝐻𝐻0 is rejected at 𝛼𝛼
= 0.05.

� −𝝁𝝁𝟎𝟎
𝒀𝒀
More formally, the test statistic is 𝒁𝒁 = ~ 𝑵𝑵(𝟎𝟎, 𝟏𝟏), when 𝝈𝝈𝟐𝟐 is
𝝈𝝈/ 𝒏𝒏
known.

Вам также может понравиться