Lecture 22 April 9th, 2013 Biostatistics 602 - Lecture 22 Hyun Min - - PowerPoint PPT Presentation

lecture 22
SMART_READER_LITE
LIVE PREVIEW

Lecture 22 April 9th, 2013 Biostatistics 602 - Lecture 22 Hyun Min - - PowerPoint PPT Presentation

. . . . .. . . .. . . .. . . .. . . .. . . Lecture 22 April 9th, 2013 Biostatistics 602 - Lecture 22 Hyun Min Kang April 9th, 2013 Hyun Min Kang p-Values Biostatistics 602 - Statistical Inference .. . . . .. . . ..


slide-1
SLIDE 1

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

. .

Biostatistics 602 - Statistical Inference Lecture 22 p-Values

Hyun Min Kang April 9th, 2013

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 1 / 1

slide-2
SLIDE 2

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Last Lecture

  • Is the exact distribution of LRT statistic typically easy to obtain?
  • How about its asymptotic distribution? For testing which

null/alternative hypotheses is the asymptotic distribution valid?

  • What is a Wald Test?
  • Describe a typical way to construct a Wald Test.

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 2 / 1

slide-3
SLIDE 3

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Last Lecture

  • Is the exact distribution of LRT statistic typically easy to obtain?
  • How about its asymptotic distribution? For testing which

null/alternative hypotheses is the asymptotic distribution valid?

  • What is a Wald Test?
  • Describe a typical way to construct a Wald Test.

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 2 / 1

slide-4
SLIDE 4

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Last Lecture

  • Is the exact distribution of LRT statistic typically easy to obtain?
  • How about its asymptotic distribution? For testing which

null/alternative hypotheses is the asymptotic distribution valid?

  • What is a Wald Test?
  • Describe a typical way to construct a Wald Test.

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 2 / 1

slide-5
SLIDE 5

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Last Lecture

  • Is the exact distribution of LRT statistic typically easy to obtain?
  • How about its asymptotic distribution? For testing which

null/alternative hypotheses is the asymptotic distribution valid?

  • What is a Wald Test?
  • Describe a typical way to construct a Wald Test.

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 2 / 1

slide-6
SLIDE 6

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Last Lecture

  • Is the exact distribution of LRT statistic typically easy to obtain?
  • How about its asymptotic distribution? For testing which

null/alternative hypotheses is the asymptotic distribution valid?

  • What is a Wald Test?
  • Describe a typical way to construct a Wald Test.

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 2 / 1

slide-7
SLIDE 7

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Asymptotics of LRT

.

Theorem 10.3.1

. . Consider testing H0 : θ = θ0 vs H1 : θ ̸= θ0. Suppose X1, · · · , Xn are iid samples from f(x|θ), and ˆ θ is the MLE of θ, and f(x|θ) satisfies certain ”regularity conditions” (e.g. see misc 10.6.2), then under H0: log x

d

as n .

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 3 / 1

slide-8
SLIDE 8

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Asymptotics of LRT

.

Theorem 10.3.1

. . Consider testing H0 : θ = θ0 vs H1 : θ ̸= θ0. Suppose X1, · · · , Xn are iid samples from f(x|θ), and ˆ θ is the MLE of θ, and f(x|θ) satisfies certain ”regularity conditions” (e.g. see misc 10.6.2), then under H0: −2 log λ(x)

d

→ χ2

1

as n → ∞.

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 3 / 1

slide-9
SLIDE 9

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Wald Test

Wald test relates point estimator of θ to hypothesis testing about θ. .

Definition

. . Suppose Wn is an estimator of θ and Wn ∼ AN(θ, σ2

W). Then Wald test

statistic is defined as Zn Wn Sn where is the value of under H and Sn is a consistent estimator of

W

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 4 / 1

slide-10
SLIDE 10

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Wald Test

Wald test relates point estimator of θ to hypothesis testing about θ. .

Definition

. . Suppose Wn is an estimator of θ and Wn ∼ AN(θ, σ2

W). Then Wald test

statistic is defined as Zn = Wn − θ0 Sn where is the value of under H and Sn is a consistent estimator of

W

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 4 / 1

slide-11
SLIDE 11

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Wald Test

Wald test relates point estimator of θ to hypothesis testing about θ. .

Definition

. . Suppose Wn is an estimator of θ and Wn ∼ AN(θ, σ2

W). Then Wald test

statistic is defined as Zn = Wn − θ0 Sn where θ0 is the value of θ under H0 and Sn is a consistent estimator of σW

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 4 / 1

slide-12
SLIDE 12

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

p-Values

.

Conclusions from Hypothesis Testing

. .

  • Reject H0 or accept H0.
  • If size of the test is ( ) small, the decision to reject H is convincing.
  • If

is large, the decision may not be very convincing. .

Definition: p-Value

. . . . . . . . A p-value p X is a test statistic satisfying p x for every sample point x. Small values of p X given evidence that H is true. A p-value is valid if, for every and every , Pr p X

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 5 / 1

slide-13
SLIDE 13

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

p-Values

.

Conclusions from Hypothesis Testing

. .

  • Reject H0 or accept H0.
  • If size of the test is (α) small, the decision to reject H0 is convincing.
  • If

is large, the decision may not be very convincing. .

Definition: p-Value

. . . . . . . . A p-value p X is a test statistic satisfying p x for every sample point x. Small values of p X given evidence that H is true. A p-value is valid if, for every and every , Pr p X

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 5 / 1

slide-14
SLIDE 14

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

p-Values

.

Conclusions from Hypothesis Testing

. .

  • Reject H0 or accept H0.
  • If size of the test is (α) small, the decision to reject H0 is convincing.
  • If α is large, the decision may not be very convincing.

.

Definition: p-Value

. . . . . . . . A p-value p X is a test statistic satisfying p x for every sample point x. Small values of p X given evidence that H is true. A p-value is valid if, for every and every , Pr p X

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 5 / 1

slide-15
SLIDE 15

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

p-Values

.

Conclusions from Hypothesis Testing

. .

  • Reject H0 or accept H0.
  • If size of the test is (α) small, the decision to reject H0 is convincing.
  • If α is large, the decision may not be very convincing.

.

Definition: p-Value

. . A p-value p(X) is a test statistic satisfying 0 ≤ p(x) ≤ 1 for every sample point x. Small values of p(X) given evidence that H1 is true. A p-value is valid if, for every θ ∈ Ω0 and every 0 ≤ α ≤ 1, Pr p X

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 5 / 1

slide-16
SLIDE 16

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

p-Values

.

Conclusions from Hypothesis Testing

. .

  • Reject H0 or accept H0.
  • If size of the test is (α) small, the decision to reject H0 is convincing.
  • If α is large, the decision may not be very convincing.

.

Definition: p-Value

. . A p-value p(X) is a test statistic satisfying 0 ≤ p(x) ≤ 1 for every sample point x. Small values of p(X) given evidence that H1 is true. A p-value is valid if, for every θ ∈ Ω0 and every 0 ≤ α ≤ 1, Pr(p(X) ≤ α|θ) ≤ α

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 5 / 1

slide-17
SLIDE 17

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Advantage to reporting a test result via a p-value

  • The size α does not need to be predefined
  • Each reader can choose the

he or she considers appropriate

  • And then can compare the reported p x to
  • So that each reader can individually determine whether these data lead

to acceptance or rejection to H .

  • The p-value quantifies the evidence against H .
  • The smaller the p-value, the stronger, the evidence for rejecting H .
  • A p-value reports the results of a test on a more continuous scale
  • Rather than just the dichotomous decision ”Accept H ” or ”Reject H ”.

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 6 / 1

slide-18
SLIDE 18

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Advantage to reporting a test result via a p-value

  • The size α does not need to be predefined
  • Each reader can choose the α he or she considers appropriate
  • And then can compare the reported p x to
  • So that each reader can individually determine whether these data lead

to acceptance or rejection to H .

  • The p-value quantifies the evidence against H .
  • The smaller the p-value, the stronger, the evidence for rejecting H .
  • A p-value reports the results of a test on a more continuous scale
  • Rather than just the dichotomous decision ”Accept H ” or ”Reject H ”.

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 6 / 1

slide-19
SLIDE 19

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Advantage to reporting a test result via a p-value

  • The size α does not need to be predefined
  • Each reader can choose the α he or she considers appropriate
  • And then can compare the reported p(x) to α
  • So that each reader can individually determine whether these data lead

to acceptance or rejection to H .

  • The p-value quantifies the evidence against H .
  • The smaller the p-value, the stronger, the evidence for rejecting H .
  • A p-value reports the results of a test on a more continuous scale
  • Rather than just the dichotomous decision ”Accept H ” or ”Reject H ”.

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 6 / 1

slide-20
SLIDE 20

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Advantage to reporting a test result via a p-value

  • The size α does not need to be predefined
  • Each reader can choose the α he or she considers appropriate
  • And then can compare the reported p(x) to α
  • So that each reader can individually determine whether these data lead

to acceptance or rejection to H0.

  • The p-value quantifies the evidence against H0.
  • The smaller the p-value, the stronger, the evidence for rejecting H .
  • A p-value reports the results of a test on a more continuous scale
  • Rather than just the dichotomous decision ”Accept H ” or ”Reject H ”.

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 6 / 1

slide-21
SLIDE 21

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Advantage to reporting a test result via a p-value

  • The size α does not need to be predefined
  • Each reader can choose the α he or she considers appropriate
  • And then can compare the reported p(x) to α
  • So that each reader can individually determine whether these data lead

to acceptance or rejection to H0.

  • The p-value quantifies the evidence against H0.
  • The smaller the p-value, the stronger, the evidence for rejecting H0.
  • A p-value reports the results of a test on a more continuous scale
  • Rather than just the dichotomous decision ”Accept H ” or ”Reject H ”.

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 6 / 1

slide-22
SLIDE 22

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Advantage to reporting a test result via a p-value

  • The size α does not need to be predefined
  • Each reader can choose the α he or she considers appropriate
  • And then can compare the reported p(x) to α
  • So that each reader can individually determine whether these data lead

to acceptance or rejection to H0.

  • The p-value quantifies the evidence against H0.
  • The smaller the p-value, the stronger, the evidence for rejecting H0.
  • A p-value reports the results of a test on a more continuous scale
  • Rather than just the dichotomous decision ”Accept H ” or ”Reject H ”.

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 6 / 1

slide-23
SLIDE 23

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Advantage to reporting a test result via a p-value

  • The size α does not need to be predefined
  • Each reader can choose the α he or she considers appropriate
  • And then can compare the reported p(x) to α
  • So that each reader can individually determine whether these data lead

to acceptance or rejection to H0.

  • The p-value quantifies the evidence against H0.
  • The smaller the p-value, the stronger, the evidence for rejecting H0.
  • A p-value reports the results of a test on a more continuous scale
  • Rather than just the dichotomous decision ”Accept H0” or ”Reject H0”.

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 6 / 1

slide-24
SLIDE 24

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Constructing a value p-value

.

Theorem 8.3.27.

. . Let W(X) be a test statistic such that large values of W give evidence that H1 is true. For each sample point x, define p x sup Pr W X W x Then p X is a valid p-value.

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 7 / 1

slide-25
SLIDE 25

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Constructing a value p-value

.

Theorem 8.3.27.

. . Let W(X) be a test statistic such that large values of W give evidence that H1 is true. For each sample point x, define p(x) = sup

θ∈Ω0

Pr(W(X) ≥ W(x)|θ) Then p X is a valid p-value.

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 7 / 1

slide-26
SLIDE 26

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Constructing a value p-value

.

Theorem 8.3.27.

. . Let W(X) be a test statistic such that large values of W give evidence that H1 is true. For each sample point x, define p(x) = sup

θ∈Ω0

Pr(W(X) ≥ W(x)|θ) Then p(X) is a valid p-value.

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 7 / 1

slide-27
SLIDE 27

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Example : Two-sided normal p-value

.

Problem

. . Let X = (X1, · · · , Xn) be a random sample from a N(θ, σ2) population. Consider testing H0 : θ = θ0 versus H1 : θ ̸= θ0.

. . 1 Construct a size α LRT test. . . 2 Find a valid p-value, as a function of x.

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 8 / 1

slide-28
SLIDE 28

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Solution - Constructing LRT

Ω = {(θ, σ2) : θ ∈ R, σ2 > 0} x sup L x sup L x For the denominator, the MLE of and are X

Xi X n n n sX

For the numerator, the MLE of and are

Xi n

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 9 / 1

slide-29
SLIDE 29

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Solution - Constructing LRT

Ω = {(θ, σ2) : θ ∈ R, σ2 > 0} Ω0 = {(θ, σ2) : θ = θ0, σ2 > 0} x sup L x sup L x For the denominator, the MLE of and are X

Xi X n n n sX

For the numerator, the MLE of and are

Xi n

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 9 / 1

slide-30
SLIDE 30

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Solution - Constructing LRT

Ω = {(θ, σ2) : θ ∈ R, σ2 > 0} Ω0 = {(θ, σ2) : θ = θ0, σ2 > 0} λ(x) = sup{(θ,σ2):θ=θ0,σ2>0} L(θ, σ2|x) sup{(θ,σ2):θ∈R,σ2>0} L(θ, σ2|x) For the denominator, the MLE of and are X

Xi X n n n sX

For the numerator, the MLE of and are

Xi n

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 9 / 1

slide-31
SLIDE 31

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Solution - Constructing LRT

Ω = {(θ, σ2) : θ ∈ R, σ2 > 0} Ω0 = {(θ, σ2) : θ = θ0, σ2 > 0} λ(x) = sup{(θ,σ2):θ=θ0,σ2>0} L(θ, σ2|x) sup{(θ,σ2):θ∈R,σ2>0} L(θ, σ2|x) For the denominator, the MLE of θ and σ2 are X

Xi X n n n sX

For the numerator, the MLE of and are

Xi n

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 9 / 1

slide-32
SLIDE 32

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Solution - Constructing LRT

Ω = {(θ, σ2) : θ ∈ R, σ2 > 0} Ω0 = {(θ, σ2) : θ = θ0, σ2 > 0} λ(x) = sup{(θ,σ2):θ=θ0,σ2>0} L(θ, σ2|x) sup{(θ,σ2):θ∈R,σ2>0} L(θ, σ2|x) For the denominator, the MLE of θ and σ2 are { ˆ θ = X ˆ σ2 =

∑(Xi−X)2 n

= n−1

n s2 X

For the numerator, the MLE of and are

Xi n

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 9 / 1

slide-33
SLIDE 33

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Solution - Constructing LRT

Ω = {(θ, σ2) : θ ∈ R, σ2 > 0} Ω0 = {(θ, σ2) : θ = θ0, σ2 > 0} λ(x) = sup{(θ,σ2):θ=θ0,σ2>0} L(θ, σ2|x) sup{(θ,σ2):θ∈R,σ2>0} L(θ, σ2|x) For the denominator, the MLE of θ and σ2 are { ˆ θ = X ˆ σ2 =

∑(Xi−X)2 n

= n−1

n s2 X

For the numerator, the MLE of θ and σ2 are

Xi n

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 9 / 1

slide-34
SLIDE 34

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Solution - Constructing LRT

Ω = {(θ, σ2) : θ ∈ R, σ2 > 0} Ω0 = {(θ, σ2) : θ = θ0, σ2 > 0} λ(x) = sup{(θ,σ2):θ=θ0,σ2>0} L(θ, σ2|x) sup{(θ,σ2):θ∈R,σ2>0} L(θ, σ2|x) For the denominator, the MLE of θ and σ2 are { ˆ θ = X ˆ σ2 =

∑(Xi−X)2 n

= n−1

n s2 X

For the numerator, the MLE of θ and σ2 are { ˆ θ0 = θ0 ˆ σ2

0 = ∑(Xi−θ0)2 n

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 9 / 1

slide-35
SLIDE 35

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Solution - Constructing and Simplifying the Test

Combining the results together λ(x) = ( ˆ σ2 ˆ σ2 )n/2 LRT test rejects H if and only if

n

c xi x n xi n

n

c xi x xi c

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 10 / 1

slide-36
SLIDE 36

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Solution - Constructing and Simplifying the Test

Combining the results together λ(x) = ( ˆ σ2 ˆ σ2 )n/2 LRT test rejects H0 if and only if

n

c xi x n xi n

n

c xi x xi c

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 10 / 1

slide-37
SLIDE 37

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Solution - Constructing and Simplifying the Test

Combining the results together λ(x) = ( ˆ σ2 ˆ σ2 )n/2 LRT test rejects H0 if and only if ( ˆ σ2 ˆ σ2 )n/2 ≤ c xi x n xi n

n

c xi x xi c

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 10 / 1

slide-38
SLIDE 38

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Solution - Constructing and Simplifying the Test

Combining the results together λ(x) = ( ˆ σ2 ˆ σ2 )n/2 LRT test rejects H0 if and only if ( ˆ σ2 ˆ σ2 )n/2 ≤ c ( ∑(xi − x)2/n ∑(xi − θ0)2/n )n/2 ≤ c xi x xi c

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 10 / 1

slide-39
SLIDE 39

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Solution - Constructing and Simplifying the Test

Combining the results together λ(x) = ( ˆ σ2 ˆ σ2 )n/2 LRT test rejects H0 if and only if ( ˆ σ2 ˆ σ2 )n/2 ≤ c ( ∑(xi − x)2/n ∑(xi − θ0)2/n )n/2 ≤ c ∑(xi − x)2 ∑(xi − θ0)2 ≤ c∗

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 10 / 1

slide-40
SLIDE 40

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Solution - Simplifying the LRT

∑(xi − x)2 ∑(xi − s)2 + n(x − θ0)2 ≤ c∗

n x xi x

c n x xi x c x sX n c LRT test rejects H if

x sX n

c . The next step is specify c to get size test.

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 11 / 1

slide-41
SLIDE 41

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Solution - Simplifying the LRT

∑(xi − x)2 ∑(xi − s)2 + n(x − θ0)2 ≤ c∗ 1 1 + n(x−θ0)2

∑(xi−x)2

≤ c∗ n x xi x c x sX n c LRT test rejects H if

x sX n

c . The next step is specify c to get size test.

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 11 / 1

slide-42
SLIDE 42

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Solution - Simplifying the LRT

∑(xi − x)2 ∑(xi − s)2 + n(x − θ0)2 ≤ c∗ 1 1 + n(x−θ0)2

∑(xi−x)2

≤ c∗ n(x − θ0)2 ∑(xi − x)2 ≥ c∗∗ x sX n c LRT test rejects H if

x sX n

c . The next step is specify c to get size test.

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 11 / 1

slide-43
SLIDE 43

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Solution - Simplifying the LRT

∑(xi − x)2 ∑(xi − s)2 + n(x − θ0)2 ≤ c∗ 1 1 + n(x−θ0)2

∑(xi−x)2

≤ c∗ n(x − θ0)2 ∑(xi − x)2 ≥ c∗∗

  • x − θ0

sX/√n

c∗∗∗ LRT test rejects H if

x sX n

c . The next step is specify c to get size test.

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 11 / 1

slide-44
SLIDE 44

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Solution - Simplifying the LRT

∑(xi − x)2 ∑(xi − s)2 + n(x − θ0)2 ≤ c∗ 1 1 + n(x−θ0)2

∑(xi−x)2

≤ c∗ n(x − θ0)2 ∑(xi − x)2 ≥ c∗∗

  • x − θ0

sX/√n

c∗∗∗ LRT test rejects H if

x sX n

c . The next step is specify c to get size test.

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 11 / 1

slide-45
SLIDE 45

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Solution - Simplifying the LRT

∑(xi − x)2 ∑(xi − s)2 + n(x − θ0)2 ≤ c∗ 1 1 + n(x−θ0)2

∑(xi−x)2

≤ c∗ n(x − θ0)2 ∑(xi − x)2 ≥ c∗∗

  • x − θ0

sX/√n

c∗∗∗ LRT test rejects H0 if

  • x−θ0

sX/√n

  • ≥ c∗∗∗. The next step is specify c to get

size α test.

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 11 / 1

slide-46
SLIDE 46

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Solution - Obtaining size α test

Under H0 X − θ0 sX/√n ∼ Tn−1 Pr X sX n c Pr Tn c c tn Therefore, size LRT test rejects H if and only if

x sX n

tn

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 12 / 1

slide-47
SLIDE 47

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Solution - Obtaining size α test

Under H0 X − θ0 sX/√n ∼ Tn−1 Pr (

  • X − θ0

sX/√n

  • ≥ c∗∗∗

) = α Pr Tn c c tn Therefore, size LRT test rejects H if and only if

x sX n

tn

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 12 / 1

slide-48
SLIDE 48

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Solution - Obtaining size α test

Under H0 X − θ0 sX/√n ∼ Tn−1 Pr (

  • X − θ0

sX/√n

  • ≥ c∗∗∗

) = α Pr (|Tn−1| ≥ c∗∗∗) = α c tn Therefore, size LRT test rejects H if and only if

x sX n

tn

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 12 / 1

slide-49
SLIDE 49

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Solution - Obtaining size α test

Under H0 X − θ0 sX/√n ∼ Tn−1 Pr (

  • X − θ0

sX/√n

  • ≥ c∗∗∗

) = α Pr (|Tn−1| ≥ c∗∗∗) = α c∗∗∗ = tn−1,α/2 Therefore, size LRT test rejects H if and only if

x sX n

tn

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 12 / 1

slide-50
SLIDE 50

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Solution - Obtaining size α test

Under H0 X − θ0 sX/√n ∼ Tn−1 Pr (

  • X − θ0

sX/√n

  • ≥ c∗∗∗

) = α Pr (|Tn−1| ≥ c∗∗∗) = α c∗∗∗ = tn−1,α/2 Therefore, size α LRT test rejects H0 if and only if

  • x−θ0

sX/√n

  • ≥ tn−1,α/2

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 12 / 1

slide-51
SLIDE 51

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Solution - p-value from two-sided test

For a test statistic W(X) =

  • X−θ0

sX/√n

  • ,

under H , regardless of the value of , W X Tn . Then, a valid p-value can be defined by p x sup Pr W X W x Pr W X W x Pr Tn W x FTn W x where FTn is the inverse CDF of t-distribution with n degrees of freedom.

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 13 / 1

slide-52
SLIDE 52

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Solution - p-value from two-sided test

For a test statistic W(X) =

  • X−θ0

sX/√n

  • , under H0, regardless of the value of

σ2, W(X) ∼ Tn−1. Then, a valid p-value can be defined by p x sup Pr W X W x Pr W X W x Pr Tn W x FTn W x where FTn is the inverse CDF of t-distribution with n degrees of freedom.

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 13 / 1

slide-53
SLIDE 53

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Solution - p-value from two-sided test

For a test statistic W(X) =

  • X−θ0

sX/√n

  • , under H0, regardless of the value of

σ2, W(X) ∼ Tn−1. Then, a valid p-value can be defined by p(x) = sup

θ∈Ω0

Pr(W(X) ≥ W(x)|θ, σ2) Pr W X W x Pr Tn W x FTn W x where FTn is the inverse CDF of t-distribution with n degrees of freedom.

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 13 / 1

slide-54
SLIDE 54

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Solution - p-value from two-sided test

For a test statistic W(X) =

  • X−θ0

sX/√n

  • , under H0, regardless of the value of

σ2, W(X) ∼ Tn−1. Then, a valid p-value can be defined by p(x) = sup

θ∈Ω0

Pr(W(X) ≥ W(x)|θ, σ2) = Pr(W(X) ≥ W(x)|θ0, σ2) Pr Tn W x FTn W x where FTn is the inverse CDF of t-distribution with n degrees of freedom.

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 13 / 1

slide-55
SLIDE 55

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Solution - p-value from two-sided test

For a test statistic W(X) =

  • X−θ0

sX/√n

  • , under H0, regardless of the value of

σ2, W(X) ∼ Tn−1. Then, a valid p-value can be defined by p(x) = sup

θ∈Ω0

Pr(W(X) ≥ W(x)|θ, σ2) = Pr(W(X) ≥ W(x)|θ0, σ2) = 2 Pr(Tn−1 ≥ W(x)) FTn W x where FTn is the inverse CDF of t-distribution with n degrees of freedom.

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 13 / 1

slide-56
SLIDE 56

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Solution - p-value from two-sided test

For a test statistic W(X) =

  • X−θ0

sX/√n

  • , under H0, regardless of the value of

σ2, W(X) ∼ Tn−1. Then, a valid p-value can be defined by p(x) = sup

θ∈Ω0

Pr(W(X) ≥ W(x)|θ, σ2) = Pr(W(X) ≥ W(x)|θ0, σ2) = 2 Pr(Tn−1 ≥ W(x)) = 2 [ 1 − F−1

Tn−1{W(x)}

] where FTn is the inverse CDF of t-distribution with n degrees of freedom.

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 13 / 1

slide-57
SLIDE 57

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Solution - p-value from two-sided test

For a test statistic W(X) =

  • X−θ0

sX/√n

  • , under H0, regardless of the value of

σ2, W(X) ∼ Tn−1. Then, a valid p-value can be defined by p(x) = sup

θ∈Ω0

Pr(W(X) ≥ W(x)|θ, σ2) = Pr(W(X) ≥ W(x)|θ0, σ2) = 2 Pr(Tn−1 ≥ W(x)) = 2 [ 1 − F−1

Tn−1{W(x)}

] where F−1

Tn−1(·) is the inverse CDF of t-distribution with n − 1 degrees of

freedom.

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 13 / 1

slide-58
SLIDE 58

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Example : One-sided normal p-value

.

Problem

. . Let X = (X1, · · · , Xn) be a random sample from a N(θ, σ2) population. Consider testing H0 : θ ≤ θ0 versus H1 : θ > θ0.

. . 1 Construct a size α LRT test. . . 2 Find a valid p-value, as a function of x.

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 14 / 1

slide-59
SLIDE 59

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Constructing LRT test

As shown in previous lectures, the LRT size α test rejects H0 if W x x sX n tn Because the null hypothesis contains multiple possible , we first want to show that the supreme in the definition of p-value p x sup Pr W X W x always occurs at when , and the value of does not matter.

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 15 / 1

slide-60
SLIDE 60

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Constructing LRT test

As shown in previous lectures, the LRT size α test rejects H0 if W(x) = x − θ0 sX/√n ≥ tn−1,α Because the null hypothesis contains multiple possible , we first want to show that the supreme in the definition of p-value p x sup Pr W X W x always occurs at when , and the value of does not matter.

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 15 / 1

slide-61
SLIDE 61

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Constructing LRT test

As shown in previous lectures, the LRT size α test rejects H0 if W(x) = x − θ0 sX/√n ≥ tn−1,α Because the null hypothesis contains multiple possible θ ≤ θ0, we first want to show that the supreme in the definition of p-value p x sup Pr W X W x always occurs at when , and the value of does not matter.

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 15 / 1

slide-62
SLIDE 62

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Constructing LRT test

As shown in previous lectures, the LRT size α test rejects H0 if W(x) = x − θ0 sX/√n ≥ tn−1,α Because the null hypothesis contains multiple possible θ ≤ θ0, we first want to show that the supreme in the definition of p-value p(x) = sup

θ∈Ω0

Pr(W(X) ≥ W(x)|θ, σ2) always occurs at when , and the value of does not matter.

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 15 / 1

slide-63
SLIDE 63

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Constructing LRT test

As shown in previous lectures, the LRT size α test rejects H0 if W(x) = x − θ0 sX/√n ≥ tn−1,α Because the null hypothesis contains multiple possible θ ≤ θ0, we first want to show that the supreme in the definition of p-value p(x) = sup

θ∈Ω0

Pr(W(X) ≥ W(x)|θ, σ2) always occurs at when θ = θ0, and the value of σ does not matter.

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 15 / 1

slide-64
SLIDE 64

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Obtaining one-sided p-value

Consider any θ ≤ θ0 and any σ. Pr(W(X) ≥ W(x)|θ, σ2) = Pr (X − θ0 sX/√n ≥ W(x)|θ, σ2 ) Pr X sX n W x sX n Pr Tn W x sX n Pr Tn W x Pr W X W x

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 16 / 1

slide-65
SLIDE 65

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Obtaining one-sided p-value

Consider any θ ≤ θ0 and any σ. Pr(W(X) ≥ W(x)|θ, σ2) = Pr (X − θ0 sX/√n ≥ W(x)|θ, σ2 ) = Pr ( X − θ sX/√n ≥ W(x) + θ0 − θ sX/√n|θ, σ2 ) Pr Tn W x sX n Pr Tn W x Pr W X W x

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 16 / 1

slide-66
SLIDE 66

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Obtaining one-sided p-value

Consider any θ ≤ θ0 and any σ. Pr(W(X) ≥ W(x)|θ, σ2) = Pr (X − θ0 sX/√n ≥ W(x)|θ, σ2 ) = Pr ( X − θ sX/√n ≥ W(x) + θ0 − θ sX/√n|θ, σ2 ) = Pr ( Tn−1 ≥ W(x) + θ0 − θ sX/√n|θ, σ2 ) Pr Tn W x Pr W X W x

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 16 / 1

slide-67
SLIDE 67

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Obtaining one-sided p-value

Consider any θ ≤ θ0 and any σ. Pr(W(X) ≥ W(x)|θ, σ2) = Pr (X − θ0 sX/√n ≥ W(x)|θ, σ2 ) = Pr ( X − θ sX/√n ≥ W(x) + θ0 − θ sX/√n|θ, σ2 ) = Pr ( Tn−1 ≥ W(x) + θ0 − θ sX/√n|θ, σ2 ) ≤ Pr (Tn−1 ≥ W(x)) Pr W X W x

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 16 / 1

slide-68
SLIDE 68

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Obtaining one-sided p-value

Consider any θ ≤ θ0 and any σ. Pr(W(X) ≥ W(x)|θ, σ2) = Pr (X − θ0 sX/√n ≥ W(x)|θ, σ2 ) = Pr ( X − θ sX/√n ≥ W(x) + θ0 − θ sX/√n|θ, σ2 ) = Pr ( Tn−1 ≥ W(x) + θ0 − θ sX/√n|θ, σ2 ) ≤ Pr (Tn−1 ≥ W(x)) = Pr ( W(X) ≥ W(x)|θ0, σ2)

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 16 / 1

slide-69
SLIDE 69

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Obtaining one-sided p-value (cont’d)

Thus, the p-value for this one-side test is p x sup Pr W X W x Pr W X W x Pr Tn W x FTn W x

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 17 / 1

slide-70
SLIDE 70

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Obtaining one-sided p-value (cont’d)

Thus, the p-value for this one-side test is p(x) = sup

θ∈Ω0

Pr(W(X) ≥ W(x)|θ, σ2) Pr W X W x Pr Tn W x FTn W x

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 17 / 1

slide-71
SLIDE 71

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Obtaining one-sided p-value (cont’d)

Thus, the p-value for this one-side test is p(x) = sup

θ∈Ω0

Pr(W(X) ≥ W(x)|θ, σ2) = Pr(W(X) ≥ W(x)|θ0, σ2) Pr Tn W x FTn W x

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 17 / 1

slide-72
SLIDE 72

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Obtaining one-sided p-value (cont’d)

Thus, the p-value for this one-side test is p(x) = sup

θ∈Ω0

Pr(W(X) ≥ W(x)|θ, σ2) = Pr(W(X) ≥ W(x)|θ0, σ2) = Pr(Tn−1 ≥ W(x)) = 1 − F−1

Tn−1[W(x)]

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 17 / 1

slide-73
SLIDE 73

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

p-Values by conditioning on on sufficient statistic

Suppose S(X) is a sufficient statistic for the model {f(x|θ) : θ ∈ Ω0}. (not necessarily including alternative hypothesis). If the null hypothesis is true, the conditional distribution of X given S s does not depend on . Again, let W X denote a test statistic where large value give evidence that H is true. Define p x Pr W X W x S S x If we consider only the conditional distribution, by Theorem 8.3.27, this is a valid p-value, meaning that Pr p X S s

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 18 / 1

slide-74
SLIDE 74

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

p-Values by conditioning on on sufficient statistic

Suppose S(X) is a sufficient statistic for the model {f(x|θ) : θ ∈ Ω0}. (not necessarily including alternative hypothesis). If the null hypothesis is true, the conditional distribution of X given S = s does not depend on θ. Again, let W X denote a test statistic where large value give evidence that H is true. Define p x Pr W X W x S S x If we consider only the conditional distribution, by Theorem 8.3.27, this is a valid p-value, meaning that Pr p X S s

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 18 / 1

slide-75
SLIDE 75

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

p-Values by conditioning on on sufficient statistic

Suppose S(X) is a sufficient statistic for the model {f(x|θ) : θ ∈ Ω0}. (not necessarily including alternative hypothesis). If the null hypothesis is true, the conditional distribution of X given S = s does not depend on θ. Again, let W(X) denote a test statistic where large value give evidence that H1 is true. Define p(x) = Pr(W(X) ≥ W(x)|S = S(x)) If we consider only the conditional distribution, by Theorem 8.3.27, this is a valid p-value, meaning that Pr p X S s

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 18 / 1

slide-76
SLIDE 76

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

p-Values by conditioning on on sufficient statistic

Suppose S(X) is a sufficient statistic for the model {f(x|θ) : θ ∈ Ω0}. (not necessarily including alternative hypothesis). If the null hypothesis is true, the conditional distribution of X given S = s does not depend on θ. Again, let W(X) denote a test statistic where large value give evidence that H1 is true. Define p(x) = Pr(W(X) ≥ W(x)|S = S(x)) If we consider only the conditional distribution, by Theorem 8.3.27, this is a valid p-value, meaning that Pr(p(X) ≤ α|S = s) ≤ α

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 18 / 1

slide-77
SLIDE 77

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

p-Values by conditioning on sufficient statistic (cont’d)

Then for any θ ∈ Ω0, unconditionally we have Pr p X

s

Pr p X S s Pr S s

s

Pr S s Thus, p X is a valid p-value.

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 19 / 1

slide-78
SLIDE 78

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

p-Values by conditioning on sufficient statistic (cont’d)

Then for any θ ∈ Ω0, unconditionally we have Pr(p(X) ≤ α|θ) = ∑

s

Pr(p(X) ≤ α|S = s) Pr(S = s|θ)

s

Pr S s Thus, p X is a valid p-value.

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 19 / 1

slide-79
SLIDE 79

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

p-Values by conditioning on sufficient statistic (cont’d)

Then for any θ ∈ Ω0, unconditionally we have Pr(p(X) ≤ α|θ) = ∑

s

Pr(p(X) ≤ α|S = s) Pr(S = s|θ) ≤ ∑

s

α Pr(S = s|θ) = α Thus, p X is a valid p-value.

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 19 / 1

slide-80
SLIDE 80

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

p-Values by conditioning on sufficient statistic (cont’d)

Then for any θ ∈ Ω0, unconditionally we have Pr(p(X) ≤ α|θ) = ∑

s

Pr(p(X) ≤ α|S = s) Pr(S = s|θ) ≤ ∑

s

α Pr(S = s|θ) = α Thus, p(X) is a valid p-value.

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 19 / 1

slide-81
SLIDE 81

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Example - Fisher’s Exact Test

.

Problem

. . Let X1 and X2 be independent observations with X1 ∼ Binomial(n1, p1), and X2 ∼ Binomial(n2, p2). Consider testing H0 : p1 = p2 versus H1 : p1 > p2. Find a valid p-value function. .

Solution

. . . . . . . . Under H , if we let p denote the common value of p p . Then the join pmf of X X is f x x p n x px p n

x

n x px p n

x

n x n x px

x

p n

n x x

Therefore S X X is a sufficient statistic under H .

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 20 / 1

slide-82
SLIDE 82

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Example - Fisher’s Exact Test

.

Problem

. . Let X1 and X2 be independent observations with X1 ∼ Binomial(n1, p1), and X2 ∼ Binomial(n2, p2). Consider testing H0 : p1 = p2 versus H1 : p1 > p2. Find a valid p-value function. .

Solution

. . Under H0, if we let p denote the common value of p1 = p2. Then the join pmf of (X1, X2) is f x x p n x px p n

x

n x px p n

x

n x n x px

x

p n

n x x

Therefore S X X is a sufficient statistic under H .

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 20 / 1

slide-83
SLIDE 83

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Example - Fisher’s Exact Test

.

Problem

. . Let X1 and X2 be independent observations with X1 ∼ Binomial(n1, p1), and X2 ∼ Binomial(n2, p2). Consider testing H0 : p1 = p2 versus H1 : p1 > p2. Find a valid p-value function. .

Solution

. . Under H0, if we let p denote the common value of p1 = p2. Then the join pmf of (X1, X2) is f(x1, x2|p) = (n1 x1 ) px1(1 − p)n1−x1 (n2 x2 ) px2(1 − p)n2−x2 n x n x px

x

p n

n x x

Therefore S X X is a sufficient statistic under H .

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 20 / 1

slide-84
SLIDE 84

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Example - Fisher’s Exact Test

.

Problem

. . Let X1 and X2 be independent observations with X1 ∼ Binomial(n1, p1), and X2 ∼ Binomial(n2, p2). Consider testing H0 : p1 = p2 versus H1 : p1 > p2. Find a valid p-value function. .

Solution

. . Under H0, if we let p denote the common value of p1 = p2. Then the join pmf of (X1, X2) is f(x1, x2|p) = (n1 x1 ) px1(1 − p)n1−x1 (n2 x2 ) px2(1 − p)n2−x2 = (n1 x1 )(n2 x2 ) px1+x2(1 − p)n1+n2−x1−x2 Therefore S X X is a sufficient statistic under H .

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 20 / 1

slide-85
SLIDE 85

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Example - Fisher’s Exact Test

.

Problem

. . Let X1 and X2 be independent observations with X1 ∼ Binomial(n1, p1), and X2 ∼ Binomial(n2, p2). Consider testing H0 : p1 = p2 versus H1 : p1 > p2. Find a valid p-value function. .

Solution

. . Under H0, if we let p denote the common value of p1 = p2. Then the join pmf of (X1, X2) is f(x1, x2|p) = (n1 x1 ) px1(1 − p)n1−x1 (n2 x2 ) px2(1 − p)n2−x2 = (n1 x1 )(n2 x2 ) px1+x2(1 − p)n1+n2−x1−x2 Therefore S = X1 + X2 is a sufficient statistic under H0.

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 20 / 1

slide-86
SLIDE 86

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Solution - Fisher’s Exact Test (cont’d)

Given the value of S = s, it is reasonable to use X1 as a test statistic and reject H0 in favor of H1 for large values of X1,because large values of X1 correspond to small values of X2 = s − X1. The conditional distribution of X given S s is a hypergeometric distribution. f X x s

n x n s x n n s

Thus, the p-value conditional on the sufficient statistic s x x is p x x

min n s j x

f j s

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 21 / 1

slide-87
SLIDE 87

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Solution - Fisher’s Exact Test (cont’d)

Given the value of S = s, it is reasonable to use X1 as a test statistic and reject H0 in favor of H1 for large values of X1,because large values of X1 correspond to small values of X2 = s − X1. The conditional distribution of X1 given S = s is a hypergeometric distribution. f(X1 = x1|s) = (n1

x1

)( n2

s−x1

) (n1+n2

s

) Thus, the p-value conditional on the sufficient statistic s x x is p x x

min n s j x

f j s

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 21 / 1

slide-88
SLIDE 88

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Solution - Fisher’s Exact Test (cont’d)

Given the value of S = s, it is reasonable to use X1 as a test statistic and reject H0 in favor of H1 for large values of X1,because large values of X1 correspond to small values of X2 = s − X1. The conditional distribution of X1 given S = s is a hypergeometric distribution. f(X1 = x1|s) = (n1

x1

)( n2

s−x1

) (n1+n2

s

) Thus, the p-value conditional on the sufficient statistic s = x1 + x2 is p(x1, x2) =

min(n1,s)

j=x1

f(j|s)

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 21 / 1

slide-89
SLIDE 89

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Exercise 8.1

.

Problem

. . In 1,000 tosses of a coin, 560 heads and 440 tails appear. Is it reasonable to assume that the coin is fair? Justify your answer. .

Hypothesis

. . . . . . . . Let be the probability of head.

. . 1 H . . 2 H

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 22 / 1

slide-90
SLIDE 90

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Exercise 8.1

.

Problem

. . In 1,000 tosses of a coin, 560 heads and 440 tails appear. Is it reasonable to assume that the coin is fair? Justify your answer. .

Hypothesis

. . Let θ ∈ (0, 1) be the probability of head.

. 1 H . . 2 H

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 22 / 1

slide-91
SLIDE 91

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Exercise 8.1

.

Problem

. . In 1,000 tosses of a coin, 560 heads and 440 tails appear. Is it reasonable to assume that the coin is fair? Justify your answer. .

Hypothesis

. . Let θ ∈ (0, 1) be the probability of head.

. . 1 H0 : θ = 1/2 . . 2 H1 : θ ̸= 1/2

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 22 / 1

slide-92
SLIDE 92

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Two possible strategies

.

Performing size α Hypothesis Testing

. .

. 1 Define a level α test for a reasonably small α. . . 2 Test whether the observation rejects H or not. . 3 Conclude that H is true or false at level

.

Obtaining p-value

. . . . . . . .

. 1 Obtain a p-value function p X . . . 2 Compute p-value as a quantitative support for the null hypothesis.

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 23 / 1

slide-93
SLIDE 93

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Two possible strategies

.

Performing size α Hypothesis Testing

. .

. 1 Define a level α test for a reasonably small α. . . 2 Test whether the observation rejects H0 or not. . . 3 Conclude that H is true or false at level

.

Obtaining p-value

. . . . . . . .

. 1 Obtain a p-value function p X . . . 2 Compute p-value as a quantitative support for the null hypothesis.

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 23 / 1

slide-94
SLIDE 94

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Two possible strategies

.

Performing size α Hypothesis Testing

. .

. 1 Define a level α test for a reasonably small α. . . 2 Test whether the observation rejects H0 or not. . . 3 Conclude that H0 is true or false at level α

.

Obtaining p-value

. .

. 1 Obtain a p-value function p(X). . . 2 Compute p-value as a quantitative support for the null hypothesis.

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 23 / 1

slide-95
SLIDE 95

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Asymptotic size α test

1,000 tosses are large enough to approximate using CLT. X ∼ AN ( θ, θ(1 − θ) n ) A two-sided Wald test statistic can be defined by Z X X

X X n

At level , the H is rejected if and only if Z x z z

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 24 / 1

slide-96
SLIDE 96

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Asymptotic size α test

1,000 tosses are large enough to approximate using CLT. X ∼ AN ( θ, θ(1 − θ) n ) A two-sided Wald test statistic can be defined by Z(X) = X − θ0 √

X(1−X) n

At level , the H is rejected if and only if Z x z z

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 24 / 1

slide-97
SLIDE 97

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Asymptotic size α test

1,000 tosses are large enough to approximate using CLT. X ∼ AN ( θ, θ(1 − θ) n ) A two-sided Wald test statistic can be defined by Z(X) = X − θ0 √

X(1−X) n

At level α, the H0 is rejected if and only if |Z(x)| > zα/2 z

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 24 / 1

slide-98
SLIDE 98

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Asymptotic size α test

1,000 tosses are large enough to approximate using CLT. X ∼ AN ( θ, θ(1 − θ) n ) A two-sided Wald test statistic can be defined by Z(X) = X − θ0 √

X(1−X) n

At level α, the H0 is rejected if and only if |Z(x)| > zα/2 0.56 − 0.5 √

0.56×0.44 1000

= 3.822 > zα/2

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 24 / 1

slide-99
SLIDE 99

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Hypothesis Testing

Since zα/2 is 1.96, 2.57, and 4.42 for α = 0.05, 0.01, and 10−5, respectively, we can conclude that the coin is biased at level 0.05 and 0.01. However, at the level of 10−5, the coin can be assumed to be fair.

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 25 / 1

slide-100
SLIDE 100

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Using p-value function

If the normal approximation is used, the p-value can be obtained as Pr Z X Z x Pr Z X So, under the null hypothesis, the size of test is less than , suggesting a strong evidence for rejecting H .

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 26 / 1

slide-101
SLIDE 101

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Using p-value function

If the normal approximation is used, the p-value can be obtained as Pr(|Z(X)| ≥ |Z(x)|) = Pr Z X So, under the null hypothesis, the size of test is less than , suggesting a strong evidence for rejecting H .

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 26 / 1

slide-102
SLIDE 102

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Using p-value function

If the normal approximation is used, the p-value can be obtained as Pr(|Z(X)| ≥ |Z(x)|) = Pr(|Z(X)| ≥ 3.795) So, under the null hypothesis, the size of test is less than , suggesting a strong evidence for rejecting H .

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 26 / 1

slide-103
SLIDE 103

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Using p-value function

If the normal approximation is used, the p-value can be obtained as Pr(|Z(X)| ≥ |Z(x)|) = Pr(|Z(X)| ≥ 3.795) = 1.32 × 10−4 So, under the null hypothesis, the size of test is less than , suggesting a strong evidence for rejecting H .

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 26 / 1

slide-104
SLIDE 104

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Using p-value function

If the normal approximation is used, the p-value can be obtained as Pr(|Z(X)| ≥ |Z(x)|) = Pr(|Z(X)| ≥ 3.795) = 1.32 × 10−4 So, under the null hypothesis, the size of test is less than 1.32 × 10−4, suggesting a strong evidence for rejecting H0.

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 26 / 1

slide-105
SLIDE 105

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Exercise 8.2

.

Problem

. . In a given city, it is assume that the number of automobile accidents in a given year follows a Poisson distribution. In past years, the average number of accidents per year was 15, and this year it was 10. Is it justified to claim that the accident rate has dropped? .

Solution - Hypothesis

. . . . . . . . X Poisson , X Poisson .

. . 1 H

.

. . 2 H

.

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 27 / 1

slide-106
SLIDE 106

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Exercise 8.2

.

Problem

. . In a given city, it is assume that the number of automobile accidents in a given year follows a Poisson distribution. In past years, the average number of accidents per year was 15, and this year it was 10. Is it justified to claim that the accident rate has dropped? .

Solution - Hypothesis

. . . . . . . . X Poisson , X Poisson .

. . 1 H

.

. . 2 H

.

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 27 / 1

slide-107
SLIDE 107

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Exercise 8.2

.

Problem

. . In a given city, it is assume that the number of automobile accidents in a given year follows a Poisson distribution. In past years, the average number of accidents per year was 15, and this year it was 10. Is it justified to claim that the accident rate has dropped? .

Solution - Hypothesis

. . X1 ∼ Poisson(λ1), X2 ∼ Poisson(λ2).

. . 1 H

.

. . 2 H

.

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 27 / 1

slide-108
SLIDE 108

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Exercise 8.2

.

Problem

. . In a given city, it is assume that the number of automobile accidents in a given year follows a Poisson distribution. In past years, the average number of accidents per year was 15, and this year it was 10. Is it justified to claim that the accident rate has dropped? .

Solution - Hypothesis

. . X1 ∼ Poisson(λ1), X2 ∼ Poisson(λ2).

. . 1 H0 : λ1 = λ2. . . 2 H1 : λ1 ̸= λ2.

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 27 / 1

slide-109
SLIDE 109

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Constructing a test based on sufficient statistic

Under H0, let λ1 = λ2 = λ. fX x x Pr X x Pr X x e

x x

x x Let S X X . S is sufficient statistic for under H . S Poisson . fS s Pr S s e

s

s

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 28 / 1

slide-110
SLIDE 110

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Constructing a test based on sufficient statistic

Under H0, let λ1 = λ2 = λ. fX(x1, x2|λ) = Pr(X = x1|λ) Pr(X = x2|λ) e

x x

x x Let S X X . S is sufficient statistic for under H . S Poisson . fS s Pr S s e

s

s

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 28 / 1

slide-111
SLIDE 111

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Constructing a test based on sufficient statistic

Under H0, let λ1 = λ2 = λ. fX(x1, x2|λ) = Pr(X = x1|λ) Pr(X = x2|λ) = e−2λλx1+x2 x1!x2! Let S X X . S is sufficient statistic for under H . S Poisson . fS s Pr S s e

s

s

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 28 / 1

slide-112
SLIDE 112

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Constructing a test based on sufficient statistic

Under H0, let λ1 = λ2 = λ. fX(x1, x2|λ) = Pr(X = x1|λ) Pr(X = x2|λ) = e−2λλx1+x2 x1!x2! Let S = X1 + X2. S is sufficient statistic for λ under H0. S ∼ Poisson(2λ). fS s Pr S s e

s

s

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 28 / 1

slide-113
SLIDE 113

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Constructing a test based on sufficient statistic

Under H0, let λ1 = λ2 = λ. fX(x1, x2|λ) = Pr(X = x1|λ) Pr(X = x2|λ) = e−2λλx1+x2 x1!x2! Let S = X1 + X2. S is sufficient statistic for λ under H0. S ∼ Poisson(2λ). fS(s|λ) = Pr(S = s|2λ) e

s

s

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 28 / 1

slide-114
SLIDE 114

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Constructing a test based on sufficient statistic

Under H0, let λ1 = λ2 = λ. fX(x1, x2|λ) = Pr(X = x1|λ) Pr(X = x2|λ) = e−2λλx1+x2 x1!x2! Let S = X1 + X2. S is sufficient statistic for λ under H0. S ∼ Poisson(2λ). fS(s|λ) = Pr(S = s|2λ) = e−2λλs s!

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 28 / 1

slide-115
SLIDE 115

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Constructing a test based on sufficient statistic (cont’d)

The conditional distribution of x given s is f(x1, x2|s) = fX(x1, x2|λ) fS(s|λ)

e

x x

x x e

s

s

s

sx x s x s

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 29 / 1

slide-116
SLIDE 116

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Constructing a test based on sufficient statistic (cont’d)

The conditional distribution of x given s is f(x1, x2|s) = fX(x1, x2|λ) fS(s|λ) =

e−2λλx1+x2 x1!x2! e−2λ(2λ)s s!

s

sx x s x s

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 29 / 1

slide-117
SLIDE 117

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Constructing a test based on sufficient statistic (cont’d)

The conditional distribution of x given s is f(x1, x2|s) = fX(x1, x2|λ) fS(s|λ) =

e−2λλx1+x2 x1!x2! e−2λ(2λ)s s!

= s! 2sx1!x2! = ( s

x1

) 2s

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 29 / 1

slide-118
SLIDE 118

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Constructing a test based on sufficient statistic (cont’d)

Let W(X) = X1, then the p-value conditioned on sufficient statistic is p x Pr W X W x S S x Pr X x S s

s j x s x s x x j x x x x x x

where x , x . Therefore, H is not rejected when , and it is not reasonable to claim that the accident rate has dropped.

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 30 / 1

slide-119
SLIDE 119

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Constructing a test based on sufficient statistic (cont’d)

Let W(X) = X1, then the p-value conditioned on sufficient statistic is p(x) = Pr(W(X) ≥ W(x)|S = S(x)) Pr X x S s

s j x s x s x x j x x x x x x

where x , x . Therefore, H is not rejected when , and it is not reasonable to claim that the accident rate has dropped.

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 30 / 1

slide-120
SLIDE 120

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Constructing a test based on sufficient statistic (cont’d)

Let W(X) = X1, then the p-value conditioned on sufficient statistic is p(x) = Pr(W(X) ≥ W(x)|S = S(x)) = Pr(X1 ≥ x1|S = s)

s j x s x s x x j x x x x x x

where x , x . Therefore, H is not rejected when , and it is not reasonable to claim that the accident rate has dropped.

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 30 / 1

slide-121
SLIDE 121

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Constructing a test based on sufficient statistic (cont’d)

Let W(X) = X1, then the p-value conditioned on sufficient statistic is p(x) = Pr(W(X) ≥ W(x)|S = S(x)) = Pr(X1 ≥ x1|S = s) =

s

j=x1

( s

x1

) 2s =

x1+x2

j=x1

(x1+x2

x1

) 2x1+x2 ≈ 0.21 where x1 = 15, x2 = 10. Therefore, H is not rejected when , and it is not reasonable to claim that the accident rate has dropped.

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 30 / 1

slide-122
SLIDE 122

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Constructing a test based on sufficient statistic (cont’d)

Let W(X) = X1, then the p-value conditioned on sufficient statistic is p(x) = Pr(W(X) ≥ W(x)|S = S(x)) = Pr(X1 ≥ x1|S = s) =

s

j=x1

( s

x1

) 2s =

x1+x2

j=x1

(x1+x2

x1

) 2x1+x2 ≈ 0.21 where x1 = 15, x2 = 10. Therefore, H0 is not rejected when α < .05, and it is not reasonable to claim that the accident rate has dropped.

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 30 / 1

slide-123
SLIDE 123

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Summary

.

Today

. .

  • p-Value
  • Fisher’s Exact Test
  • Examples of Hypothesis Testing

.

Next Lectures

. . . . . . . .

  • Interval Estimation
  • Confidence Interval

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 31 / 1

slide-124
SLIDE 124

. .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. . . .. .

Summary

.

Today

. .

  • p-Value
  • Fisher’s Exact Test
  • Examples of Hypothesis Testing

.

Next Lectures

. .

  • Interval Estimation
  • Confidence Interval

Hyun Min Kang Biostatistics 602 - Lecture 22 April 9th, 2013 31 / 1