Sie sind auf Seite 1von 15

 𝐻𝐻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.
Recall that in the construction of confidence interval, we always start with a
pivotal quantity, say when 𝜽𝜽 = 𝝁𝝁 and 𝝈𝝈𝟐𝟐 is known.
Pivotal quantity
� − 𝝁𝝁
𝒀𝒀
𝒁𝒁 = ~𝑵𝑵(𝟎𝟎, 𝟏𝟏)
𝝈𝝈/ 𝒏𝒏
Test statistic: (Assuming that 𝑯𝑯𝟎𝟎 is true)
The pivotal becomes the test statistic
� − 𝝁𝝁𝟎𝟎
𝒀𝒀
𝒁𝒁 = ~𝑵𝑵 𝟎𝟎, 𝟏𝟏
𝝈𝝈/ 𝒏𝒏
under 𝑯𝑯𝟎𝟎 is true.
𝒀𝒀𝒊𝒊 ~𝑵𝑵 𝝁𝝁, 𝝈𝝈𝟐𝟐
� = 𝟏𝟏. 𝟗𝟗𝟗𝟗
 𝝈𝝈 = 𝟎𝟎. 𝟎𝟎𝟎𝟎, 𝒏𝒏 = 𝟗𝟗, 𝒀𝒀

 𝑯𝑯𝟎𝟎 : 𝝁𝝁 = 𝟐𝟐 𝒗𝒗𝒗𝒗 𝑯𝑯𝟏𝟏 : 𝝁𝝁 ≠ 𝟐𝟐 − 𝟐𝟐 − 𝒕𝒕𝒕𝒕𝒕𝒕𝒕𝒕 𝒕𝒕𝒕𝒕𝒕𝒕𝒕𝒕


Test statistic:
� −𝝁𝝁𝟎𝟎
𝒀𝒀
𝒁𝒁 = (reject 𝑯𝑯𝟎𝟎 if 𝒁𝒁 is too large or too
𝝈𝝈/ 𝒏𝒏

small)
𝑹𝑹𝑹𝑹 = 𝒁𝒁 > 𝒁𝒁𝜶𝜶/𝟐𝟐
At 𝜶𝜶 = 𝟎𝟎. 𝟎𝟎𝟎𝟎, 𝒁𝒁𝜶𝜶/𝟐𝟐 = 𝟏𝟏. 𝟗𝟗𝟗𝟗.
Test statistic
𝟏𝟏. 𝟗𝟗𝟗𝟗 − 𝟐𝟐
𝒁𝒁 = = −𝟐𝟐. 𝟓𝟓
𝟎𝟎. 𝟎𝟎𝟎𝟎/ 𝟗𝟗
At 𝜶𝜶 = 𝟎𝟎. 𝟎𝟎𝟎𝟎, 𝑹𝑹𝑹𝑹 = { 𝒁𝒁 > 𝟏𝟏. 𝟗𝟗𝟗𝟗}
∴ 𝑯𝑯𝟎𝟎 is rejected at 𝜶𝜶 = 𝟎𝟎. 𝟎𝟎𝟎𝟎 and we may
conclude that 𝝁𝝁 ≠ 𝟐𝟐.
 Example 7.1
 𝐻𝐻0 : 𝜇𝜇 = 800 vs 𝐻𝐻1 : 𝜇𝜇 < 800
 Test statistic
𝑌𝑌� − 800
𝑍𝑍 = ~𝑁𝑁 0,1 under 𝐻𝐻0
𝜎𝜎/ 𝑛𝑛
795−800
� = 795 ⇒ 𝑍𝑍 =
 𝑌𝑌 = −1.29
15
� < 𝑦𝑦�𝑜𝑜𝑜𝑜𝑜𝑜 𝐻𝐻0 ) = 𝑃𝑃 𝑍𝑍 < −1.29 = 0.0985 > 0.05
 p-value = 𝑃𝑃 𝑌𝑌

𝑁𝑁 0,1
under 𝐻𝐻0
p-value for
a one-sided
test

−1.29 observed statistic


−1.645
27
� < 𝑦𝑦�𝑜𝑜𝑜𝑜𝑜𝑜 𝐻𝐻0 = 0.0985
 p-value = 𝑃𝑃 𝑌𝑌
 We compare the p-value with 𝛼𝛼 and reject 𝐻𝐻0 if p-value < 𝛼𝛼.
 Example 7.2
 𝐻𝐻0 : 𝜇𝜇 = 2 vs 𝐻𝐻1 : 𝜇𝜇 ≠ 2
 Test statistic 𝑍𝑍 = −2.5
 We first calculate the p-value for a one-sided test

𝑍𝑍~𝑁𝑁 0,1
under 𝐻𝐻0
p-value for
a one-sided
test

𝑃𝑃 𝑍𝑍 < −2.5 = 0.0062


𝑧𝑧 = −2.5

28
Then, the p-value for a two-sided test
= 2 × p-value for a one-sided test

𝑃𝑃 𝑍𝑍 > 𝑧𝑧𝑜𝑜𝑜𝑜𝑜𝑜
= 𝑃𝑃 𝑍𝑍 > 2.5
= 2 × 0.0062
= 0.0124 < 𝛼𝛼 = 0.05

Das könnte Ihnen auch gefallen