Hypothesis Testing Lecture 18 Biostatistics 602 - Statistical - - PowerPoint PPT Presentation

hypothesis testing lecture 18 biostatistics 602
SMART_READER_LITE
LIVE PREVIEW

Hypothesis Testing Lecture 18 Biostatistics 602 - Statistical - - PowerPoint PPT Presentation

. . March 21th, 2013 Biostatistics 602 - Lecture 18 Hyun Min Kang March 21th, 2013 Hyun Min Kang Hypothesis Testing Lecture 18 Biostatistics 602 - Statistical Inference . Summary . . Hypothesis Testing Recap . . . . . . . . . .


slide-1
SLIDE 1

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

. .

Biostatistics 602 - Statistical Inference Lecture 18 Hypothesis Testing

Hyun Min Kang March 21th, 2013

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 1 / 35

slide-2
SLIDE 2

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Last Lecture

  • What does mean that a statistic is asymptotically normal?
  • What kind of tools are useful for obtaining parameters for asymptotic

normal distributions?

  • How can you evaluate whether a consistent estimator is better than

another consistent estimator?

  • What is the Asymptotic Relative Efficiency?
  • What does mean that a statistic is asymptotically efficient?
  • Is an MLE asymptotically efficient?

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 2 / 35

slide-3
SLIDE 3

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Last Lecture

  • What does mean that a statistic is asymptotically normal?
  • What kind of tools are useful for obtaining parameters for asymptotic

normal distributions?

  • How can you evaluate whether a consistent estimator is better than

another consistent estimator?

  • What is the Asymptotic Relative Efficiency?
  • What does mean that a statistic is asymptotically efficient?
  • Is an MLE asymptotically efficient?

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 2 / 35

slide-4
SLIDE 4

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Last Lecture

  • What does mean that a statistic is asymptotically normal?
  • What kind of tools are useful for obtaining parameters for asymptotic

normal distributions?

  • How can you evaluate whether a consistent estimator is better than

another consistent estimator?

  • What is the Asymptotic Relative Efficiency?
  • What does mean that a statistic is asymptotically efficient?
  • Is an MLE asymptotically efficient?

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 2 / 35

slide-5
SLIDE 5

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Last Lecture

  • What does mean that a statistic is asymptotically normal?
  • What kind of tools are useful for obtaining parameters for asymptotic

normal distributions?

  • How can you evaluate whether a consistent estimator is better than

another consistent estimator?

  • What is the Asymptotic Relative Efficiency?
  • What does mean that a statistic is asymptotically efficient?
  • Is an MLE asymptotically efficient?

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 2 / 35

slide-6
SLIDE 6

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Last Lecture

  • What does mean that a statistic is asymptotically normal?
  • What kind of tools are useful for obtaining parameters for asymptotic

normal distributions?

  • How can you evaluate whether a consistent estimator is better than

another consistent estimator?

  • What is the Asymptotic Relative Efficiency?
  • What does mean that a statistic is asymptotically efficient?
  • Is an MLE asymptotically efficient?

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 2 / 35

slide-7
SLIDE 7

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Last Lecture

  • What does mean that a statistic is asymptotically normal?
  • What kind of tools are useful for obtaining parameters for asymptotic

normal distributions?

  • How can you evaluate whether a consistent estimator is better than

another consistent estimator?

  • What is the Asymptotic Relative Efficiency?
  • What does mean that a statistic is asymptotically efficient?
  • Is an MLE asymptotically efficient?

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 2 / 35

slide-8
SLIDE 8

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Asymptotic Normality

.

Definition: Asymptotic Normality

. . A statistic (or an estimator) Wn(X) is asymptotically normal if √n(Wn − τ(θ))

d

→ N(0, ν(θ))

for all θ where

d

→ stands for ”converge in distribution”

  • τ(θ) : ”asymptotic mean”
  • ν(θ) : ”asymptotic variance”

We denote Wn ∼ AN ( τ(θ), ν(θ)

n

) .

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 3 / 35

slide-9
SLIDE 9

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Central Limit Theorem

.

Central Limit Theorem

. . Assume Xi

i.i.d.

∼ f(x|θ) with finite mean µ(θ) and variance σ2(θ).

X ∼ AN ( µ(θ), σ2(θ) n ) ⇔ √n ( X − µ(θ) )

d

N(0, σ2(θ)) .

Theorem 5.5.17 - Slutsky’s Theorem

. . If Xn

d

→ X, Yn

P

→ a, where a is a constant,

. . 1 Yn · Xn d

→ aX

. . 2 Xn + Yn d

→ X + a

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 4 / 35

slide-10
SLIDE 10

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Delta Method

.

Theorem 5.5.24 - Delta Method

. . Assume Wn ∼ AN ( θ, ν(θ)

n

) . If a function g satisfies g′(θ) ̸= 0, then g(Wn) ∼ AN ( g(θ), [g′(θ)]2 ν(θ) n )

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 5 / 35

slide-11
SLIDE 11

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Asymptotic Efficiency

.

Definition : Asymptotic Efficiency for iid samples

. . A sequence of estimators Wn is asymptotically efficient for τ(θ) if for all θ ∈ Ω, √n(Wn − τ(θ))

d

N ( 0, [τ ′(θ)]2 I(θ) ) ⇐ ⇒ Wn ∼ AN ( τ(θ), [τ ′(θ)]2 nI(θ) ) I(θ) = E [{ ∂ ∂θ log f(X|θ) }2

  • θ

] = −E [ ∂2 ∂θ2 log f(X|θ)

  • θ

] (if interchangeability holds) Note: [τ ′(θ)]2

nI(θ)

is the C-R bound for unbiased estimators of τ(θ).

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 6 / 35

slide-12
SLIDE 12

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Asymptotic Efficiency of MLEs

.

Theorem 10.1.12

. . Let X1, · · · , Xn be iid samples from f(x|θ). Let ˆ θ denote the MLE of θ. Under same regularity conditions, ˆ θ is consistent and asymptotically normal for θ, i.e. √n(ˆ θ − θ)

d

N ( 0, 1 I(θ) ) for every θ ∈ Ω And if τ(θ) is continuous and differentiable in θ, then √n(ˆ θ − θ)

d

N ( 0, [τ ′(θ)] I(θ) ) = ⇒ τ(ˆ θ) ∼ AN ( τ(θ), [τ ′(θ)]2 nI(θ) ) Again, note that the asymptotic variance of τ(ˆ θ) is Cramer-Rao lower bound for unbiased estimators of τ(θ).

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 7 / 35

slide-13
SLIDE 13

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Hypothesis Testing

.

Definition

. . A hypothesis is a statement about a population parameter .

Two complementary statements about

. . . . . . . .

  • Null hypothesis : H
  • Alternative hypothesis : H

c c.

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 8 / 35

slide-14
SLIDE 14

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Hypothesis Testing

.

Definition

. . A hypothesis is a statement about a population parameter .

Two complementary statements about θ

. .

  • Null hypothesis : H0 : θ ∈ Ω0
  • Alternative hypothesis : H

c c.

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 8 / 35

slide-15
SLIDE 15

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Hypothesis Testing

.

Definition

. . A hypothesis is a statement about a population parameter .

Two complementary statements about θ

. .

  • Null hypothesis : H0 : θ ∈ Ω0
  • Alternative hypothesis : H1 : θ ∈ Ωc

c.

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 8 / 35

slide-16
SLIDE 16

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Hypothesis Testing

.

Definition

. . A hypothesis is a statement about a population parameter .

Two complementary statements about θ

. .

  • Null hypothesis : H0 : θ ∈ Ω0
  • Alternative hypothesis : H1 : θ ∈ Ωc

θ ∈ Ω = Ω ∪ Ωc.

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 8 / 35

slide-17
SLIDE 17

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Simple and composite hypothesis

.

Simple hypothesis

. . Both H0 and H1 consist of only one parameter value.

  • H0 : θ = θ0 ∈ Ω0
  • H1 : θ = θ1 ∈ Ωc

.

Composite hypothesis

. . . . . . . . One or both of H and H consist more than one parameter values.

  • One-sided hypothesis: H

vs H .

  • One-sided hypothesis: H

vs H .

  • Two-sided hypothesis: H

vs H .

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 9 / 35

slide-18
SLIDE 18

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Simple and composite hypothesis

.

Simple hypothesis

. . Both H0 and H1 consist of only one parameter value.

  • H0 : θ = θ0 ∈ Ω0
  • H1 : θ = θ1 ∈ Ωc

.

Composite hypothesis

. . One or both of H0 and H1 consist more than one parameter values.

  • One-sided hypothesis: H

vs H .

  • One-sided hypothesis: H

vs H .

  • Two-sided hypothesis: H

vs H .

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 9 / 35

slide-19
SLIDE 19

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Simple and composite hypothesis

.

Simple hypothesis

. . Both H0 and H1 consist of only one parameter value.

  • H0 : θ = θ0 ∈ Ω0
  • H1 : θ = θ1 ∈ Ωc

.

Composite hypothesis

. . One or both of H0 and H1 consist more than one parameter values.

  • One-sided hypothesis: H0 : θ ≤ θ0 vs H1 : θ > θ0.
  • One-sided hypothesis: H

vs H .

  • Two-sided hypothesis: H

vs H .

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 9 / 35

slide-20
SLIDE 20

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Simple and composite hypothesis

.

Simple hypothesis

. . Both H0 and H1 consist of only one parameter value.

  • H0 : θ = θ0 ∈ Ω0
  • H1 : θ = θ1 ∈ Ωc

.

Composite hypothesis

. . One or both of H0 and H1 consist more than one parameter values.

  • One-sided hypothesis: H0 : θ ≤ θ0 vs H1 : θ > θ0.
  • One-sided hypothesis: H0 : θ ≥ θ0 vs H1 : θ < θ0.
  • Two-sided hypothesis: H

vs H .

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 9 / 35

slide-21
SLIDE 21

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Simple and composite hypothesis

.

Simple hypothesis

. . Both H0 and H1 consist of only one parameter value.

  • H0 : θ = θ0 ∈ Ω0
  • H1 : θ = θ1 ∈ Ωc

.

Composite hypothesis

. . One or both of H0 and H1 consist more than one parameter values.

  • One-sided hypothesis: H0 : θ ≤ θ0 vs H1 : θ > θ0.
  • One-sided hypothesis: H0 : θ ≥ θ0 vs H1 : θ < θ0.
  • Two-sided hypothesis: H0 : θ = θ0 vs H1 : θ ̸= θ0.

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 9 / 35

slide-22
SLIDE 22

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

An Example of Hypothesis

X1, · · · , Xn

i.i.d.

N(θ, 1) Let Xi is the change in blood pressure after a treatment. H (no effect) H (some effect) Two-sided composite hypothesis.

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 10 / 35

slide-23
SLIDE 23

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

An Example of Hypothesis

X1, · · · , Xn

i.i.d.

N(θ, 1) Let Xi is the change in blood pressure after a treatment. H0 : θ = 0 (no effect) H1 : θ ̸= 0 (some effect) Two-sided composite hypothesis.

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 10 / 35

slide-24
SLIDE 24

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Another Example of Hypothesis

  • Let θ denotes the proportion of defective items from a machine.
  • One may want the proportion to be less than a specified maximum

acceptable proportion .

  • We want to test whether the products produced by the machine is

acceptable. H (acceptable) H (unacceptable)

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 11 / 35

slide-25
SLIDE 25

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Another Example of Hypothesis

  • Let θ denotes the proportion of defective items from a machine.
  • One may want the proportion to be less than a specified maximum

acceptable proportion θ0.

  • We want to test whether the products produced by the machine is

acceptable. H (acceptable) H (unacceptable)

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 11 / 35

slide-26
SLIDE 26

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Another Example of Hypothesis

  • Let θ denotes the proportion of defective items from a machine.
  • One may want the proportion to be less than a specified maximum

acceptable proportion θ0.

  • We want to test whether the products produced by the machine is

acceptable. H (acceptable) H (unacceptable)

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 11 / 35

slide-27
SLIDE 27

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Another Example of Hypothesis

  • Let θ denotes the proportion of defective items from a machine.
  • One may want the proportion to be less than a specified maximum

acceptable proportion θ0.

  • We want to test whether the products produced by the machine is

acceptable. H0 : θ ≤ θ0 (acceptable) H1 : θ > θ0 (unacceptable)

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 11 / 35

slide-28
SLIDE 28

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Hypothesis Testing Procedure

A hypothesis testing procedure is a rule that specifies:

. . 1 For which sample points H is accepted as true (the subset of the

sample space for which H is accepted is called the acceptable region).

. . 2 For which sample points H is rejected and H is accepted as true

(the subset of sample space for which H is rejected is called the rejection region or critical region). Rejection region (R) on a hypothesis is usually defined through a test statistic W X . For example, R x W x c x R x W x c x

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 12 / 35

slide-29
SLIDE 29

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Hypothesis Testing Procedure

A hypothesis testing procedure is a rule that specifies:

. . 1 For which sample points H0 is accepted as true (the subset of the

sample space for which H0 is accepted is called the acceptable region).

. . 2 For which sample points H is rejected and H is accepted as true

(the subset of sample space for which H is rejected is called the rejection region or critical region). Rejection region (R) on a hypothesis is usually defined through a test statistic W X . For example, R x W x c x R x W x c x

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 12 / 35

slide-30
SLIDE 30

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Hypothesis Testing Procedure

A hypothesis testing procedure is a rule that specifies:

. . 1 For which sample points H0 is accepted as true (the subset of the

sample space for which H0 is accepted is called the acceptable region).

. . 2 For which sample points H0 is rejected and H1 is accepted as true

(the subset of sample space for which H0 is rejected is called the rejection region or critical region). Rejection region (R) on a hypothesis is usually defined through a test statistic W X . For example, R x W x c x R x W x c x

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 12 / 35

slide-31
SLIDE 31

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Hypothesis Testing Procedure

A hypothesis testing procedure is a rule that specifies:

. . 1 For which sample points H0 is accepted as true (the subset of the

sample space for which H0 is accepted is called the acceptable region).

. . 2 For which sample points H0 is rejected and H1 is accepted as true

(the subset of sample space for which H0 is rejected is called the rejection region or critical region). Rejection region (R) on a hypothesis is usually defined through a test statistic W(X). For example, R1 = {x : W(x) > c, x ∈ X} R2 = {x : W(x) ≤ c, x ∈ X}

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 12 / 35

slide-32
SLIDE 32

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Example of hypothesis testing

X1, X2, X3

i.i.d.

∼ Bernoulli(p). Consider hypothesis tests

H0 : p ≤ 0.5 H1 : p > 0.5

  • Test 1 : Reject H if x

rejection region = rejection region = x xi

  • Test 2 : Reject H if x

rejection region = rejection region = x xi

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 13 / 35

slide-33
SLIDE 33

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Example of hypothesis testing

X1, X2, X3

i.i.d.

∼ Bernoulli(p). Consider hypothesis tests

H0 : p ≤ 0.5 H1 : p > 0.5

  • Test 1 : Reject H0 if x ∈ {(1, 1, 1)}

⇐ ⇒ rejection region = {(1, 1, 1)} ⇐ ⇒ rejection region = {x : ∑ xi > 2}

  • Test 2 : Reject H if x

rejection region = rejection region = x xi

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 13 / 35

slide-34
SLIDE 34

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Example of hypothesis testing

X1, X2, X3

i.i.d.

∼ Bernoulli(p). Consider hypothesis tests

H0 : p ≤ 0.5 H1 : p > 0.5

  • Test 1 : Reject H0 if x ∈ {(1, 1, 1)}

⇐ ⇒ rejection region = {(1, 1, 1)} ⇐ ⇒ rejection region = {x : ∑ xi > 2}

  • Test 2 : Reject H0 if x ∈ {(1, 1, 0), (1, 0, 1), (0, 1, 1), (1, 1, 1)}

⇐ ⇒ rejection region = {(1, 1, 0), (1, 0, 1), (0, 1, 1), (1, 1, 1)} ⇐ ⇒ rejection region = {x : ∑ xi > 1}

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 13 / 35

slide-35
SLIDE 35

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Example

Let X1, · · · , Xn be changes in blood pressure after a treatment. H0 : θ = 0 H1 : θ ̸= 0 An example rejection region R x

x sX n

. Decision Truth Accept H Reject H H Correct Decision Type I error H Type II error Correct Decision

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 14 / 35

slide-36
SLIDE 36

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Example

Let X1, · · · , Xn be changes in blood pressure after a treatment. H0 : θ = 0 H1 : θ ̸= 0 An example rejection region R = { x :

x sX/√n > 3

} . Decision Truth Accept H Reject H H Correct Decision Type I error H Type II error Correct Decision

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 14 / 35

slide-37
SLIDE 37

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Example

Let X1, · · · , Xn be changes in blood pressure after a treatment. H0 : θ = 0 H1 : θ ̸= 0 An example rejection region R = { x :

x sX/√n > 3

} . Decision Truth Accept H0 Reject H0 H0 Correct Decision Type I error H1 Type II error Correct Decision

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 14 / 35

slide-38
SLIDE 38

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Type I and Type II error

.

Type I error

. . If θ ∈ Ω0 (if the null hypothesis is true), the probability of making a type I error is Pr(X ∈ R|θ) .

Type II error

. . . . . . . . If

c (if the alternative hypothesis is true), the probability of making a

type II error is Pr X R Pr X R

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 15 / 35

slide-39
SLIDE 39

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Type I and Type II error

.

Type I error

. . If θ ∈ Ω0 (if the null hypothesis is true), the probability of making a type I error is Pr(X ∈ R|θ) .

Type II error

. . If θ ∈ Ωc

0 (if the alternative hypothesis is true), the probability of making a

type II error is Pr(X / ∈ R|θ) = 1 − Pr(X ∈ R|θ)

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 15 / 35

slide-40
SLIDE 40

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Power function

.

Definition - The power function

. . The power function of a hypothesis test with rejection region R is the function of θ defined by β(θ) = Pr(X ∈ R|θ) = Pr(reject H0|θ) If

c (alternative is true), the probability of rejecting H is called the

power of test for this particular value of .

  • Probability of type I error =

if .

  • Probability of type II error =

if

c.

An ideal test should have power function satisfying for all , for all

c, which is typically not possible in practice.

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 16 / 35

slide-41
SLIDE 41

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Power function

.

Definition - The power function

. . The power function of a hypothesis test with rejection region R is the function of θ defined by β(θ) = Pr(X ∈ R|θ) = Pr(reject H0|θ) If θ ∈ Ωc

0 (alternative is true), the probability of rejecting H0 is called the

power of test for this particular value of θ.

  • Probability of type I error =

if .

  • Probability of type II error =

if

c.

An ideal test should have power function satisfying for all , for all

c, which is typically not possible in practice.

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 16 / 35

slide-42
SLIDE 42

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Power function

.

Definition - The power function

. . The power function of a hypothesis test with rejection region R is the function of θ defined by β(θ) = Pr(X ∈ R|θ) = Pr(reject H0|θ) If θ ∈ Ωc

0 (alternative is true), the probability of rejecting H0 is called the

power of test for this particular value of θ.

  • Probability of type I error = β(θ) if θ ∈ Ω0.
  • Probability of type II error =

if

c.

An ideal test should have power function satisfying for all , for all

c, which is typically not possible in practice.

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 16 / 35

slide-43
SLIDE 43

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Power function

.

Definition - The power function

. . The power function of a hypothesis test with rejection region R is the function of θ defined by β(θ) = Pr(X ∈ R|θ) = Pr(reject H0|θ) If θ ∈ Ωc

0 (alternative is true), the probability of rejecting H0 is called the

power of test for this particular value of θ.

  • Probability of type I error = β(θ) if θ ∈ Ω0.
  • Probability of type II error = 1 − β(θ) if θ ∈ Ωc

0.

An ideal test should have power function satisfying for all , for all

c, which is typically not possible in practice.

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 16 / 35

slide-44
SLIDE 44

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Power function

.

Definition - The power function

. . The power function of a hypothesis test with rejection region R is the function of θ defined by β(θ) = Pr(X ∈ R|θ) = Pr(reject H0|θ) If θ ∈ Ωc

0 (alternative is true), the probability of rejecting H0 is called the

power of test for this particular value of θ.

  • Probability of type I error = β(θ) if θ ∈ Ω0.
  • Probability of type II error = 1 − β(θ) if θ ∈ Ωc

0.

An ideal test should have power function satisfying β(θ) = 0 for all θ ∈ Ω0, β(θ) = 1 for all θ ∈ Ωc

0, which is typically not possible in practice.

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 16 / 35

slide-45
SLIDE 45

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Example of power function

.

Problem

. . X1, X2, · · · , Xn

i.i.d.

∼ Bernoulli(θ) where n = 5.

H H Test 1 rejects H if and only if all ”success” are observed. i.e. R x x x

i

xi

. . 1 Compute the power function . . 2 What is the maximum probability of making type I error? . . 3 What is the probability of making type II error if

?

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 17 / 35

slide-46
SLIDE 46

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Example of power function

.

Problem

. . X1, X2, · · · , Xn

i.i.d.

∼ Bernoulli(θ) where n = 5.

H0 : θ ≤ 0.5 H1 : θ > 0.5 Test 1 rejects H if and only if all ”success” are observed. i.e. R x x x

i

xi

. . 1 Compute the power function . . 2 What is the maximum probability of making type I error? . . 3 What is the probability of making type II error if

?

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 17 / 35

slide-47
SLIDE 47

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Example of power function

.

Problem

. . X1, X2, · · · , Xn

i.i.d.

∼ Bernoulli(θ) where n = 5.

H0 : θ ≤ 0.5 H1 : θ > 0.5 Test 1 rejects H0 if and only if all ”success” are observed. i.e. R = {x : x = (1, 1, 1, 1, 1)} = {x :

5

i=1

xi = 5}

. . 1 Compute the power function . . 2 What is the maximum probability of making type I error? . . 3 What is the probability of making type II error if

?

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 17 / 35

slide-48
SLIDE 48

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Example of power function

.

Problem

. . X1, X2, · · · , Xn

i.i.d.

∼ Bernoulli(θ) where n = 5.

H0 : θ ≤ 0.5 H1 : θ > 0.5 Test 1 rejects H0 if and only if all ”success” are observed. i.e. R = {x : x = (1, 1, 1, 1, 1)} = {x :

5

i=1

xi = 5}

. . 1 Compute the power function . . 2 What is the maximum probability of making type I error? . . 3 What is the probability of making type II error if

?

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 17 / 35

slide-49
SLIDE 49

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Example of power function

.

Problem

. . X1, X2, · · · , Xn

i.i.d.

∼ Bernoulli(θ) where n = 5.

H0 : θ ≤ 0.5 H1 : θ > 0.5 Test 1 rejects H0 if and only if all ”success” are observed. i.e. R = {x : x = (1, 1, 1, 1, 1)} = {x :

5

i=1

xi = 5}

. . 1 Compute the power function . . 2 What is the maximum probability of making type I error? . . 3 What is the probability of making type II error if

?

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 17 / 35

slide-50
SLIDE 50

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Example of power function

.

Problem

. . X1, X2, · · · , Xn

i.i.d.

∼ Bernoulli(θ) where n = 5.

H0 : θ ≤ 0.5 H1 : θ > 0.5 Test 1 rejects H0 if and only if all ”success” are observed. i.e. R = {x : x = (1, 1, 1, 1, 1)} = {x :

5

i=1

xi = 5}

. . 1 Compute the power function . . 2 What is the maximum probability of making type I error? . . 3 What is the probability of making type II error if θ = 2/3?

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 17 / 35

slide-51
SLIDE 51

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Solution for Test 1

.

Power function

. . β(θ) = Pr(reject H0|θ) = Pr(X ∈ R|θ) Pr Xi Because Xi Binomial , . .

Maximum type I error

. . . . . . . . When , the power function is Type I error. max max .

Type II error when

. . . . . . . .

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 18 / 35

slide-52
SLIDE 52

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Solution for Test 1

.

Power function

. . β(θ) = Pr(reject H0|θ) = Pr(X ∈ R|θ) = Pr( ∑ Xi = 5|θ) Because Xi Binomial , . .

Maximum type I error

. . . . . . . . When , the power function is Type I error. max max .

Type II error when

. . . . . . . .

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 18 / 35

slide-53
SLIDE 53

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Solution for Test 1

.

Power function

. . β(θ) = Pr(reject H0|θ) = Pr(X ∈ R|θ) = Pr( ∑ Xi = 5|θ) Because ∑ Xi ∼ Binomial(5, θ), β(θ) = θ5. .

Maximum type I error

. . . . . . . . When , the power function is Type I error. max max .

Type II error when

. . . . . . . .

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 18 / 35

slide-54
SLIDE 54

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Solution for Test 1

.

Power function

. . β(θ) = Pr(reject H0|θ) = Pr(X ∈ R|θ) = Pr( ∑ Xi = 5|θ) Because ∑ Xi ∼ Binomial(5, θ), β(θ) = θ5. .

Maximum type I error

. . When θ ∈ Ω0 = (0, 0.5], the power function β(θ) is Type I error. max max .

Type II error when

. . . . . . . .

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 18 / 35

slide-55
SLIDE 55

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Solution for Test 1

.

Power function

. . β(θ) = Pr(reject H0|θ) = Pr(X ∈ R|θ) = Pr( ∑ Xi = 5|θ) Because ∑ Xi ∼ Binomial(5, θ), β(θ) = θ5. .

Maximum type I error

. . When θ ∈ Ω0 = (0, 0.5], the power function β(θ) is Type I error. max

θ∈(0,0.5] β(θ) =

max

θ∈(0,0.5] θ5 = 0.55 = 1/32 ≈ 0.031

.

Type II error when

. . . . . . . .

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 18 / 35

slide-56
SLIDE 56

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Solution for Test 1

.

Power function

. . β(θ) = Pr(reject H0|θ) = Pr(X ∈ R|θ) = Pr( ∑ Xi = 5|θ) Because ∑ Xi ∼ Binomial(5, θ), β(θ) = θ5. .

Maximum type I error

. . When θ ∈ Ω0 = (0, 0.5], the power function β(θ) is Type I error. max

θ∈(0,0.5] β(θ) =

max

θ∈(0,0.5] θ5 = 0.55 = 1/32 ≈ 0.031

.

Type II error when θ = 2/3

. . 1 − β(θ)|θ= 2

3 = 1 − θ5

  • θ= 2

3 = 1 − (2/3)5 = 211/243 ≈ 0.868 Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 18 / 35

slide-57
SLIDE 57

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Another Example

.

Problem

. . X1, X2, · · · , Xn

i.i.d.

∼ Bernoulli(θ) where n = 5.

H H Test 2 rejects H if and only if 3 or more ”success” are observed. i.e. R x

i

xi

. . 1 Compute the power function . . 2 What is the maximum probability of making type I error? . . 3 What is the probability of making type II error if

?

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 19 / 35

slide-58
SLIDE 58

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Another Example

.

Problem

. . X1, X2, · · · , Xn

i.i.d.

∼ Bernoulli(θ) where n = 5.

H0 : θ ≤ 0.5 H1 : θ > 0.5 Test 2 rejects H if and only if 3 or more ”success” are observed. i.e. R x

i

xi

. . 1 Compute the power function . . 2 What is the maximum probability of making type I error? . . 3 What is the probability of making type II error if

?

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 19 / 35

slide-59
SLIDE 59

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Another Example

.

Problem

. . X1, X2, · · · , Xn

i.i.d.

∼ Bernoulli(θ) where n = 5.

H0 : θ ≤ 0.5 H1 : θ > 0.5 Test 2 rejects H0 if and only if 3 or more ”success” are observed. i.e. R = {x :

5

i=1

xi ≥ 3}

. . 1 Compute the power function . . 2 What is the maximum probability of making type I error? . . 3 What is the probability of making type II error if

?

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 19 / 35

slide-60
SLIDE 60

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Another Example

.

Problem

. . X1, X2, · · · , Xn

i.i.d.

∼ Bernoulli(θ) where n = 5.

H0 : θ ≤ 0.5 H1 : θ > 0.5 Test 2 rejects H0 if and only if 3 or more ”success” are observed. i.e. R = {x :

5

i=1

xi ≥ 3}

. . 1 Compute the power function . . 2 What is the maximum probability of making type I error? . . 3 What is the probability of making type II error if θ = 2/3?

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 19 / 35

slide-61
SLIDE 61

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Solution for Test 2

.

Power function

. . β(θ) = Pr( ∑ Xi ≥ 3|θ) = (5 3 ) θ3(1 − θ)2 + (5 4 ) θ4(1 − θ) + (5 5 ) θ5 .

Maximum type I error

. . . . . . . . We need to find the maximum of for is increasing in . Maximum type I error is .

Type II error when

. . . . . . . .

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 20 / 35

slide-62
SLIDE 62

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Solution for Test 2

.

Power function

. . β(θ) = Pr( ∑ Xi ≥ 3|θ) = (5 3 ) θ3(1 − θ)2 + (5 4 ) θ4(1 − θ) + (5 5 ) θ5 = θ3(6θ2 − 15θ + 10) .

Maximum type I error

. . . . . . . . We need to find the maximum of for is increasing in . Maximum type I error is .

Type II error when

. . . . . . . .

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 20 / 35

slide-63
SLIDE 63

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Solution for Test 2

.

Power function

. . β(θ) = Pr( ∑ Xi ≥ 3|θ) = (5 3 ) θ3(1 − θ)2 + (5 4 ) θ4(1 − θ) + (5 5 ) θ5 = θ3(6θ2 − 15θ + 10) .

Maximum type I error

. . We need to find the maximum of β(θ) for θ ∈ Ω0 = (0, 0.5] β′(θ) = 30θ2(θ − 1)2 > 0 is increasing in . Maximum type I error is .

Type II error when

. . . . . . . .

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 20 / 35

slide-64
SLIDE 64

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Solution for Test 2

.

Power function

. . β(θ) = Pr( ∑ Xi ≥ 3|θ) = (5 3 ) θ3(1 − θ)2 + (5 4 ) θ4(1 − θ) + (5 5 ) θ5 = θ3(6θ2 − 15θ + 10) .

Maximum type I error

. . We need to find the maximum of β(θ) for θ ∈ Ω0 = (0, 0.5] β′(θ) = 30θ2(θ − 1)2 > 0 β(θ) is increasing in θ ∈ (0, 1). Maximum type I error is β(0.5) = 0.5 .

Type II error when θ = 2/3

. . 1 − β(θ)|θ= 2

3 = 1 − θ3(6θ2 − 15θ + 10)

  • θ= 2

3 ≈ 0.21 Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 20 / 35

slide-65
SLIDE 65

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Sizes and Levels of Tests

.

Size α test

. . A test with power function β(θ) is a size α test if sup

θ∈Ω0

β(θ) = α In other words, the maximum probability of making a type I error is . .

Level test

. . . . . . . . A test with power function is a level test if sup In other words, the maximum probability of making a type I error is equal

  • r less than

. Any size test is also a level test

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 21 / 35

slide-66
SLIDE 66

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Sizes and Levels of Tests

.

Size α test

. . A test with power function β(θ) is a size α test if sup

θ∈Ω0

β(θ) = α In other words, the maximum probability of making a type I error is α. .

Level test

. . . . . . . . A test with power function is a level test if sup In other words, the maximum probability of making a type I error is equal

  • r less than

. Any size test is also a level test

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 21 / 35

slide-67
SLIDE 67

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Sizes and Levels of Tests

.

Size α test

. . A test with power function β(θ) is a size α test if sup

θ∈Ω0

β(θ) = α In other words, the maximum probability of making a type I error is α. .

Level α test

. . A test with power function β(θ) is a level α test if sup

θ∈Ω0

β(θ) ≤ α In other words, the maximum probability of making a type I error is equal

  • r less than

. Any size test is also a level test

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 21 / 35

slide-68
SLIDE 68

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Sizes and Levels of Tests

.

Size α test

. . A test with power function β(θ) is a size α test if sup

θ∈Ω0

β(θ) = α In other words, the maximum probability of making a type I error is α. .

Level α test

. . A test with power function β(θ) is a level α test if sup

θ∈Ω0

β(θ) ≤ α In other words, the maximum probability of making a type I error is equal

  • r less than α.

Any size test is also a level test

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 21 / 35

slide-69
SLIDE 69

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Sizes and Levels of Tests

.

Size α test

. . A test with power function β(θ) is a size α test if sup

θ∈Ω0

β(θ) = α In other words, the maximum probability of making a type I error is α. .

Level α test

. . A test with power function β(θ) is a level α test if sup

θ∈Ω0

β(θ) ≤ α In other words, the maximum probability of making a type I error is equal

  • r less than α.

Any size α test is also a level α test

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 21 / 35

slide-70
SLIDE 70

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Revisiting Previous Examples

.

Test 1

. . sup

θ∈Ω0

β(θ) = sup

θ∈Ω0

θ5 = 0.55 = 0.03125 The size is 0.03125, and this is a level 0.05 test, or a level 0.1 test, but not a level 0.01 test. .

Test 2

. . . . . . . . sup The size is 0.5

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 22 / 35

slide-71
SLIDE 71

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Revisiting Previous Examples

.

Test 1

. . sup

θ∈Ω0

β(θ) = sup

θ∈Ω0

θ5 = 0.55 = 0.03125 The size is 0.03125, and this is a level 0.05 test, or a level 0.1 test, but not a level 0.01 test. .

Test 2

. . sup

θ∈Ω0

β(θ) = 0.5 The size is 0.5

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 22 / 35

slide-72
SLIDE 72

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Constructing a good test

. . 1 Construct all the level α test. . 2 Within this level of tests, we search for the test with Type II error

probability as small as possible; equivalently, we want the test with the largest power if

c.

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 23 / 35

slide-73
SLIDE 73

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Constructing a good test

. . 1 Construct all the level α test. . . 2 Within this level of tests, we search for the test with Type II error

probability as small as possible; equivalently, we want the test with the largest power if θ ∈ Ωc

0.

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 23 / 35

slide-74
SLIDE 74

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Review on standard normal and t distribution

.

Quantile of standard normal distribution

. . Let Z ∼ N(0, 1) with pdf fZ(z) and cdf FZ(z). The α-th quantile zα or (1 − α)-th quantile z1−α of the standard distribution satisfy Pr Z z

  • r

z FZ Pr Z z

  • r

z FZ z z .

Quantile of t distribution

. . . . . . . . Let T tn with pdf fT n t and cdf FT n t . The

  • th quantile

tn

  • r
  • th quantile tn
  • f the standard distribution satisfy

Pr T tn

  • r

tn FT n Pr T tn

  • r

tn FT n tn tn

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 24 / 35

slide-75
SLIDE 75

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Review on standard normal and t distribution

.

Quantile of standard normal distribution

. . Let Z ∼ N(0, 1) with pdf fZ(z) and cdf FZ(z). The α-th quantile zα or (1 − α)-th quantile z1−α of the standard distribution satisfy Pr(Z ≥ zα) = α

  • r

zα = F−1

Z (1 − α)

Pr Z z

  • r

z FZ z z .

Quantile of t distribution

. . . . . . . . Let T tn with pdf fT n t and cdf FT n t . The

  • th quantile

tn

  • r
  • th quantile tn
  • f the standard distribution satisfy

Pr T tn

  • r

tn FT n Pr T tn

  • r

tn FT n tn tn

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 24 / 35

slide-76
SLIDE 76

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Review on standard normal and t distribution

.

Quantile of standard normal distribution

. . Let Z ∼ N(0, 1) with pdf fZ(z) and cdf FZ(z). The α-th quantile zα or (1 − α)-th quantile z1−α of the standard distribution satisfy Pr(Z ≥ zα) = α

  • r

zα = F−1

Z (1 − α)

Pr(Z ≤ z1−α) = α

  • r

z1−α = F−1

Z (α)

z z .

Quantile of t distribution

. . . . . . . . Let T tn with pdf fT n t and cdf FT n t . The

  • th quantile

tn

  • r
  • th quantile tn
  • f the standard distribution satisfy

Pr T tn

  • r

tn FT n Pr T tn

  • r

tn FT n tn tn

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 24 / 35

slide-77
SLIDE 77

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Review on standard normal and t distribution

.

Quantile of standard normal distribution

. . Let Z ∼ N(0, 1) with pdf fZ(z) and cdf FZ(z). The α-th quantile zα or (1 − α)-th quantile z1−α of the standard distribution satisfy Pr(Z ≥ zα) = α

  • r

zα = F−1

Z (1 − α)

Pr(Z ≤ z1−α) = α

  • r

z1−α = F−1

Z (α)

z1−α = −zα .

Quantile of t distribution

. . Let T ∼ tn−1 with pdf fT,n−1(t) and cdf FT,n−1(t). The α-th quantile tn−1,α or (1 − α)-th quantile tn−1,1−α of the standard distribution satisfy Pr T tn

  • r

tn FT n Pr T tn

  • r

tn FT n tn tn

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 24 / 35

slide-78
SLIDE 78

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Review on standard normal and t distribution

.

Quantile of standard normal distribution

. . Let Z ∼ N(0, 1) with pdf fZ(z) and cdf FZ(z). The α-th quantile zα or (1 − α)-th quantile z1−α of the standard distribution satisfy Pr(Z ≥ zα) = α

  • r

zα = F−1

Z (1 − α)

Pr(Z ≤ z1−α) = α

  • r

z1−α = F−1

Z (α)

z1−α = −zα .

Quantile of t distribution

. . Let T ∼ tn−1 with pdf fT,n−1(t) and cdf FT,n−1(t). The α-th quantile tn−1,α or (1 − α)-th quantile tn−1,1−α of the standard distribution satisfy Pr(T ≥ tn−1,α) = α

  • r

tn−1α = F−1

T,n−1(1 − α)

Pr(T ≤ tn−1,1−α) = α

  • r

tn−1,1−α = F−1

T,n−1(α)

tn−1,1−α = −tn−1,α

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 24 / 35

slide-79
SLIDE 79

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Likelihood Ratio Tests (LRT)

.

Definition

. . Let L(θ|x) be the likelihood function of θ. The likelihood ratio test statistic for testing H0 : θ ∈ Ω0 vs. H1 : θ ∈ Ωc

0 is

x sup L x sup L x L x L x where is the MLE of

  • ver

, and is the MLE of

  • ver

(restricted MLE). The likelihood ratio test is a test that rejects H if and only if x c where c .

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 25 / 35

slide-80
SLIDE 80

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Likelihood Ratio Tests (LRT)

.

Definition

. . Let L(θ|x) be the likelihood function of θ. The likelihood ratio test statistic for testing H0 : θ ∈ Ω0 vs. H1 : θ ∈ Ωc

0 is

λ(x) = supθ∈Ω0 L(θ|x) supθ∈Ω L(θ|x) = L(ˆ θ0|x) L(ˆ θ|x) where is the MLE of

  • ver

, and is the MLE of

  • ver

(restricted MLE). The likelihood ratio test is a test that rejects H if and only if x c where c .

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 25 / 35

slide-81
SLIDE 81

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Likelihood Ratio Tests (LRT)

.

Definition

. . Let L(θ|x) be the likelihood function of θ. The likelihood ratio test statistic for testing H0 : θ ∈ Ω0 vs. H1 : θ ∈ Ωc

0 is

λ(x) = supθ∈Ω0 L(θ|x) supθ∈Ω L(θ|x) = L(ˆ θ0|x) L(ˆ θ|x) where ˆ θ is the MLE of θ over θ ∈ Ω, and ˆ θ0 is the MLE of θ over θ ∈ Ω0 (restricted MLE). The likelihood ratio test is a test that rejects H if and only if x c where c .

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 25 / 35

slide-82
SLIDE 82

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Likelihood Ratio Tests (LRT)

.

Definition

. . Let L(θ|x) be the likelihood function of θ. The likelihood ratio test statistic for testing H0 : θ ∈ Ω0 vs. H1 : θ ∈ Ωc

0 is

λ(x) = supθ∈Ω0 L(θ|x) supθ∈Ω L(θ|x) = L(ˆ θ0|x) L(ˆ θ|x) where ˆ θ is the MLE of θ over θ ∈ Ω, and ˆ θ0 is the MLE of θ over θ ∈ Ω0 (restricted MLE). The likelihood ratio test is a test that rejects H0 if and only if λ(x) ≤ c where 0 ≤ c ≤ 1.

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 25 / 35

slide-83
SLIDE 83

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Properties of LRT

  • For example
  • If c = 1, null hypothesis will always be rejected.
  • If c = 0, null hypothesis will never be rejected.
  • Difference choice of c

give different tests.

  • The smaller the c, the smaller type I error.
  • The larger the c, the smaller the type II error.
  • Choose c such that type I error probability of LRT is bound above by

. sup Pr x c sup sup Pr reject H Then we get a size test.

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 26 / 35

slide-84
SLIDE 84

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Properties of LRT

  • For example
  • If c = 1, null hypothesis will always be rejected.
  • If c = 0, null hypothesis will never be rejected.
  • Difference choice of c ∈ [0, 1] give different tests.
  • The smaller the c, the smaller type I error.
  • The larger the c, the smaller the type II error.
  • Choose c such that type I error probability of LRT is bound above by

. sup Pr x c sup sup Pr reject H Then we get a size test.

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 26 / 35

slide-85
SLIDE 85

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Properties of LRT

  • For example
  • If c = 1, null hypothesis will always be rejected.
  • If c = 0, null hypothesis will never be rejected.
  • Difference choice of c ∈ [0, 1] give different tests.
  • The smaller the c, the smaller type I error.
  • The larger the c, the smaller the type II error.
  • Choose c such that type I error probability of LRT is bound above by

α. sup

θ∈Ω0

Pr(λ(x) ≤ c) = sup

θ∈Ω0

β(θ) sup Pr reject H Then we get a size test.

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 26 / 35

slide-86
SLIDE 86

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Properties of LRT

  • For example
  • If c = 1, null hypothesis will always be rejected.
  • If c = 0, null hypothesis will never be rejected.
  • Difference choice of c ∈ [0, 1] give different tests.
  • The smaller the c, the smaller type I error.
  • The larger the c, the smaller the type II error.
  • Choose c such that type I error probability of LRT is bound above by

α. sup

θ∈Ω0

Pr(λ(x) ≤ c) = sup

θ∈Ω0

β(θ) = sup

θ∈Ω0

Pr(reject H0) = α Then we get a size α test.

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 26 / 35

slide-87
SLIDE 87

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Example of LRT

.

Problem

. . Consider X1, · · · , Xn

i.i.d.

∼ N(θ, σ2) where σ2 is known.

H H For the LRT test and its power function .

Solution

. . . . . . . . L x

n i

exp xi

n

exp

n i

xi We need to find MLE of

  • ver

and .

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 27 / 35

slide-88
SLIDE 88

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Example of LRT

.

Problem

. . Consider X1, · · · , Xn

i.i.d.

∼ N(θ, σ2) where σ2 is known.

H0 : θ ≤ θ0 H For the LRT test and its power function .

Solution

. . . . . . . . L x

n i

exp xi

n

exp

n i

xi We need to find MLE of

  • ver

and .

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 27 / 35

slide-89
SLIDE 89

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Example of LRT

.

Problem

. . Consider X1, · · · , Xn

i.i.d.

∼ N(θ, σ2) where σ2 is known.

H0 : θ ≤ θ0 H1 : θ > θ0 For the LRT test and its power function .

Solution

. . . . . . . . L x

n i

exp xi

n

exp

n i

xi We need to find MLE of

  • ver

and .

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 27 / 35

slide-90
SLIDE 90

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Example of LRT

.

Problem

. . Consider X1, · · · , Xn

i.i.d.

∼ N(θ, σ2) where σ2 is known.

H0 : θ ≤ θ0 H1 : θ > θ0 For the LRT test and its power function .

Solution

. . L(θ|x) =

n

i=1

1 √ 2πσ2 exp [ −(xi − θ)2 2σ2 ]

n

exp

n i

xi We need to find MLE of

  • ver

and .

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 27 / 35

slide-91
SLIDE 91

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Example of LRT

.

Problem

. . Consider X1, · · · , Xn

i.i.d.

∼ N(θ, σ2) where σ2 is known.

H0 : θ ≤ θ0 H1 : θ > θ0 For the LRT test and its power function .

Solution

. . L(θ|x) =

n

i=1

1 √ 2πσ2 exp [ −(xi − θ)2 2σ2 ] = ( 1 √ 2πσ2 )n exp [ − ∑n

i=1(xi − θ)2

2σ2 ] We need to find MLE of

  • ver

and .

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 27 / 35

slide-92
SLIDE 92

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Example of LRT

.

Problem

. . Consider X1, · · · , Xn

i.i.d.

∼ N(θ, σ2) where σ2 is known.

H0 : θ ≤ θ0 H1 : θ > θ0 For the LRT test and its power function .

Solution

. . L(θ|x) =

n

i=1

1 √ 2πσ2 exp [ −(xi − θ)2 2σ2 ] = ( 1 √ 2πσ2 )n exp [ − ∑n

i=1(xi − θ)2

2σ2 ] We need to find MLE of θ over Ω = (−∞, ∞) and Ω0 = (−∞, θ0].

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 27 / 35

slide-93
SLIDE 93

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

MLE of θ over Ω = (−∞, ∞)

To maximize L(θ|x), we need to maximize exp [ −

∑n

i=1(xi−θ)2

2σ2

] , or equivalently to minimize ∑n

i=1(xi − θ)2. n i

xi

n i

xi xi n

n i

xi

n i

xi The equation above minimizes when

n i

xi n

x.

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 28 / 35

slide-94
SLIDE 94

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

MLE of θ over Ω = (−∞, ∞)

To maximize L(θ|x), we need to maximize exp [ −

∑n

i=1(xi−θ)2

2σ2

] , or equivalently to minimize ∑n

i=1(xi − θ)2. n

i=1

(xi − θ)2 =

n

i=1

(x2

i + θ2 − 2θxi)

n

n i

xi

n i

xi The equation above minimizes when

n i

xi n

x.

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 28 / 35

slide-95
SLIDE 95

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

MLE of θ over Ω = (−∞, ∞)

To maximize L(θ|x), we need to maximize exp [ −

∑n

i=1(xi−θ)2

2σ2

] , or equivalently to minimize ∑n

i=1(xi − θ)2. n

i=1

(xi − θ)2 =

n

i=1

(x2

i + θ2 − 2θxi)

= nθ2 − 2θ

n

i=1

xi +

n

i=1

x2

i

The equation above minimizes when

n i

xi n

x.

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 28 / 35

slide-96
SLIDE 96

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

MLE of θ over Ω = (−∞, ∞)

To maximize L(θ|x), we need to maximize exp [ −

∑n

i=1(xi−θ)2

2σ2

] , or equivalently to minimize ∑n

i=1(xi − θ)2. n

i=1

(xi − θ)2 =

n

i=1

(x2

i + θ2 − 2θxi)

= nθ2 − 2θ

n

i=1

xi +

n

i=1

x2

i

The equation above minimizes when θ = ˆ θ =

∑n

i=1 xi

n

= x.

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 28 / 35

slide-97
SLIDE 97

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

MLE of θ over Ω0 = (−∞, θ0]

  • L(θ|x) is maximized at θ =

∑n

i=1 xi

n

= x if x ≤ θ0.

  • However, if x

, x does not fall into a valid range of , and , the likelihood function will be an increasing function. Therefore . To summarize, X if X if X

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 29 / 35

slide-98
SLIDE 98

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

MLE of θ over Ω0 = (−∞, θ0]

  • L(θ|x) is maximized at θ =

∑n

i=1 xi

n

= x if x ≤ θ0.

  • However, if x ≥ θ0, x does not fall into a valid range of ˆ

θ0, and θ ≤ θ0, the likelihood function will be an increasing function. Therefore ˆ θ0 = θ0. To summarize, X if X if X

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 29 / 35

slide-99
SLIDE 99

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

MLE of θ over Ω0 = (−∞, θ0]

  • L(θ|x) is maximized at θ =

∑n

i=1 xi

n

= x if x ≤ θ0.

  • However, if x ≥ θ0, x does not fall into a valid range of ˆ

θ0, and θ ≤ θ0, the likelihood function will be an increasing function. Therefore ˆ θ0 = θ0. To summarize, ˆ θ0 = { X if X ≤ θ0 θ0 if X > θ0

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 29 / 35

slide-100
SLIDE 100

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Likelihood ratio test

λ(x) = L(ˆ θ0|x) L(ˆ θ|x) =        1 if X ≤ θ0

exp [ −

∑n i=1(xi−θ0)2 2σ2

] exp [ −

∑n i=1(xi−x)2 2σ2

]

if X > θ0 if X exp

n x

if X Therefore, the likelihood test rejects the null hypothesis if and only if exp n x c and x .

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 30 / 35

slide-101
SLIDE 101

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Likelihood ratio test

λ(x) = L(ˆ θ0|x) L(ˆ θ|x) =        1 if X ≤ θ0

exp [ −

∑n i=1(xi−θ0)2 2σ2

] exp [ −

∑n i=1(xi−x)2 2σ2

]

if X > θ0 = { 1 if X ≤ θ0 exp [ − n(x−θ0)2

2σ2

] if X > θ0 Therefore, the likelihood test rejects the null hypothesis if and only if exp n x c and x .

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 30 / 35

slide-102
SLIDE 102

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Likelihood ratio test

λ(x) = L(ˆ θ0|x) L(ˆ θ|x) =        1 if X ≤ θ0

exp [ −

∑n i=1(xi−θ0)2 2σ2

] exp [ −

∑n i=1(xi−x)2 2σ2

]

if X > θ0 = { 1 if X ≤ θ0 exp [ − n(x−θ0)2

2σ2

] if X > θ0 Therefore, the likelihood test rejects the null hypothesis if and only if exp [ −n(x − θ0)2 2σ2 ] ≤ c and x ≥ θ0.

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 30 / 35

slide-103
SLIDE 103

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Specifying c

exp [ −n(x − θ0)2 2σ2 ] ≤ c n x log c x log c n x log c n x

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 31 / 35

slide-104
SLIDE 104

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Specifying c

exp [ −n(x − θ0)2 2σ2 ] ≤ c ⇐ ⇒ −n(x − θ0)2 2σ2 ≤ log c x log c n x log c n x

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 31 / 35

slide-105
SLIDE 105

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Specifying c

exp [ −n(x − θ0)2 2σ2 ] ≤ c ⇐ ⇒ −n(x − θ0)2 2σ2 ≤ log c ⇐ ⇒ (x − θ0)2 ≥ −2σ2 log c n x log c n x

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 31 / 35

slide-106
SLIDE 106

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Specifying c

exp [ −n(x − θ0)2 2σ2 ] ≤ c ⇐ ⇒ −n(x − θ0)2 2σ2 ≤ log c ⇐ ⇒ (x − θ0)2 ≥ −2σ2 log c n ⇐ ⇒ x − θ0 ≥ √ −2σ2 log c n (∵ x > θ0)

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 31 / 35

slide-107
SLIDE 107

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Specifying c (cont’d)

So, LRT rejects H0 if and only if x − θ0 ≥ √ −2σ2 log c n ⇐ ⇒ x − θ0 σ/√n ≥ √ − 2σ2 log c

n

σ/√n = c∗ Therefore, the rejection region is x x n c

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 32 / 35

slide-108
SLIDE 108

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Specifying c (cont’d)

So, LRT rejects H0 if and only if x − θ0 ≥ √ −2σ2 log c n ⇐ ⇒ x − θ0 σ/√n ≥ √ − 2σ2 log c

n

σ/√n = c∗ Therefore, the rejection region is { x : x − θ0 σ/√n ≥ c∗ }

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 32 / 35

slide-109
SLIDE 109

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Power function

β(θ) = Pr (reject H0) = Pr (X − θ0 σ/√n ≥ c∗ ) Pr X n c Pr X n n c Since X Xn

i.i.d.

, X

n

. Therefore, X n = Pr Z n c where Z .

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 33 / 35

slide-110
SLIDE 110

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Power function

β(θ) = Pr (reject H0) = Pr (X − θ0 σ/√n ≥ c∗ ) = Pr (X − θ + θ − θ0 σ/√n ≥ c∗ ) Pr X n n c Since X Xn

i.i.d.

, X

n

. Therefore, X n = Pr Z n c where Z .

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 33 / 35

slide-111
SLIDE 111

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Power function

β(θ) = Pr (reject H0) = Pr (X − θ0 σ/√n ≥ c∗ ) = Pr (X − θ + θ − θ0 σ/√n ≥ c∗ ) = Pr (X − θ σ/√n ≥ θ0 − θ σ/√n + c∗ ) Since X Xn

i.i.d.

, X

n

. Therefore, X n = Pr Z n c where Z .

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 33 / 35

slide-112
SLIDE 112

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Power function

β(θ) = Pr (reject H0) = Pr (X − θ0 σ/√n ≥ c∗ ) = Pr (X − θ + θ − θ0 σ/√n ≥ c∗ ) = Pr (X − θ σ/√n ≥ θ0 − θ σ/√n + c∗ ) Since X1, · · · , Xn

i.i.d.

∼ N(θ, σ2), X ∼ N

( θ, σ2

n

) . Therefore, X n = Pr Z n c where Z .

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 33 / 35

slide-113
SLIDE 113

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Power function

β(θ) = Pr (reject H0) = Pr (X − θ0 σ/√n ≥ c∗ ) = Pr (X − θ + θ − θ0 σ/√n ≥ c∗ ) = Pr (X − θ σ/√n ≥ θ0 − θ σ/√n + c∗ ) Since X1, · · · , Xn

i.i.d.

∼ N(θ, σ2), X ∼ N

( θ, σ2

n

) . Therefore, X − θ σ/√n ∼ N(0, 1) = ⇒ β(θ) = Pr ( Z ≥ θ0 − θ σ/√n + c∗ ) where Z ∼ N(0, 1).

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 33 / 35

slide-114
SLIDE 114

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Making size α LRT

To make a size α test, sup sup Pr Z n c Pr Z c c z Note that Pr Z

n

c is maximized when is maximum (i.e. ). Therefore, size LRT test rejects H if and only if x

n

z .

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 34 / 35

slide-115
SLIDE 115

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Making size α LRT

To make a size α test, sup

θ∈Ω0

β(θ) = α sup Pr Z n c Pr Z c c z Note that Pr Z

n

c is maximized when is maximum (i.e. ). Therefore, size LRT test rejects H if and only if x

n

z .

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 34 / 35

slide-116
SLIDE 116

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Making size α LRT

To make a size α test, sup

θ∈Ω0

β(θ) = α sup

θ≤θ0

Pr ( Z ≥ θ0 − θ σ/√n + c∗ ) = α Pr Z c c z Note that Pr Z

n

c is maximized when is maximum (i.e. ). Therefore, size LRT test rejects H if and only if x

n

z .

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 34 / 35

slide-117
SLIDE 117

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Making size α LRT

To make a size α test, sup

θ∈Ω0

β(θ) = α sup

θ≤θ0

Pr ( Z ≥ θ0 − θ σ/√n + c∗ ) = α Pr (Z ≥ c∗) = α c z Note that Pr Z

n

c is maximized when is maximum (i.e. ). Therefore, size LRT test rejects H if and only if x

n

z .

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 34 / 35

slide-118
SLIDE 118

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Making size α LRT

To make a size α test, sup

θ∈Ω0

β(θ) = α sup

θ≤θ0

Pr ( Z ≥ θ0 − θ σ/√n + c∗ ) = α Pr (Z ≥ c∗) = α c∗ = zα Note that Pr ( Z ≥ θ0−θ

σ/√n + c∗)

is maximized when θ is maximum (i.e. θ = θ0). Therefore, size LRT test rejects H if and only if x

n

z .

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 34 / 35

slide-119
SLIDE 119

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Making size α LRT

To make a size α test, sup

θ∈Ω0

β(θ) = α sup

θ≤θ0

Pr ( Z ≥ θ0 − θ σ/√n + c∗ ) = α Pr (Z ≥ c∗) = α c∗ = zα Note that Pr ( Z ≥ θ0−θ

σ/√n + c∗)

is maximized when θ is maximum (i.e. θ = θ0). Therefore, size α LRT test rejects H0 if and only if x−θ0

σ/√n ≥ zα.

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 34 / 35

slide-120
SLIDE 120

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Summary

.

Today

. .

  • Hypothesis Testing
  • Likelihood Ratio Test

.

Next Lecture

. . . . . . . .

  • More Hypothesis Testing

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 35 / 35

slide-121
SLIDE 121

. . . . . .

. . . . . . Recap . . . . . . . . . . . . . . . . . . . . . . . . . . . Hypothesis Testing . Summary

Summary

.

Today

. .

  • Hypothesis Testing
  • Likelihood Ratio Test

.

Next Lecture

. .

  • More Hypothesis Testing

Hyun Min Kang Biostatistics 602 - Lecture 18 March 21th, 2013 35 / 35