Download PSTAT 120C Probability and Statistics - Week 1

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Probability wikipedia , lookup

History of statistics wikipedia , lookup

Statistics wikipedia , lookup

Foundations of statistics wikipedia , lookup

Transcript
PSTAT 120C Probability and Statistics - Week 1
Fang-I Chu, Varvara Kulikova
University of California, Santa Barbara
April 10, 2012
Fang-I Chu, Varvara Kulikova
PSTAT 120C Probability and Statistics
Topics for review
Hypothesis testing and decision rule
Significance level and Power of the hypothesis test
Likelihood Ratio Tests
Examples similar to #3, #4 in hw1
Fang-I Chu, Varvara Kulikova
PSTAT 120C Probability and Statistics
Hypothesis testing and decision rule
Null hypothesis (H0 : θ = θ0 ) v.s alternative hypothesis
One sided test- with aim to find supporting evidence that data
tend to lay at the extreme large end ( Ha : θ > θ0 ) or at
extreme small end (Ha : θ < θ0 )
Two sided test- with aim to find supporting evidence that data
tend to lay at extreme large or small end (Ha : θ 6= θ0 )
Decision rule: the criteria to make judge on whether there is
enough evidence to support null or alternative.
ex. Reject H0 when T (X1 , . . . , Xn ) ∈ C
T (X1 , . . . , Xn ) is test statistics, as a function of data.
C is a critical (rejection) region with critical value
cα : T (x) > cα for Ha : θ > θ0 , T (x) < cα for Ha : θ < θ0 and
{T (x) < cα or T (x) > c1−α for Ha : θ 6= θ0
Fang-I Chu, Varvara Kulikova
PSTAT 120C Probability and Statistics
Significant level and power of one test
Significant level, α (Type I error )
occurs when H0 is true but our decision rule leads us to
reject H0 .
α = P(T (X) ∈ C |H0 is true)
default value α = 0.05
Power of one test
denote when Ha is true and our decision rule leads us to
reject H0
Power= P(T (X) ∈ C |Ha is true)
power of one test is the essence of hypothesis testing; it is the
probability that we have enough evidence to against our null
when null is not true.
Type II error β occurs when alternative hypothesis is true but
we fail to reject null.
Power= 1 − β
Fang-I Chu, Varvara Kulikova
PSTAT 120C Probability and Statistics
Likelihood Ratio Test (LRT)
H0 : θ ∈ Θ0 v.s. Ha : θ ∈
/ Θ0
Denote λ =
L(Θ̂0 )
L(Θ̂)
=
Q
maxθ∈Θ0 ni=1 fθ (xi )
Qn
maxθ∈Θ i=1 fθ (xi )
Decision rule: reject H0 if {λ ≤ kα } with the significance level
set as maxθ∈Θ0 Pθ (λ ≤ kα ) ≤ α. i.e. the value of kα depends
on which α we pick.
Define Θ0 as a subset of whole parameter space Θ.
Intuition behind: when the likelihood function of parameter
from ”null space” is much smaller than of parameter from
”whole space”, the ratio becomes small; when ratio is so
small, indicating that H0 is unlikely true. So we reject H0 .
Fang-I Chu, Varvara Kulikova
PSTAT 120C Probability and Statistics
Remark
The goal is to maximize the power of a fixed test level α.
Minimize type II error is equivalent to maximize the power of
one test.
The computation of type I error and power is through the
critical region of the decision rule.
The best test (Uniformly most powerful test) has critical
region C that
P(T (X) ∈ C |H0 true = α(fixed)
maximize P(T (X) ∈ C |Ha true) (max power)
Fang-I Chu, Varvara Kulikova
PSTAT 120C Probability and Statistics
Ex.1 Similar to # 3 in hw1
example 1
An experiment is conducted with only three possible outcomes:
A,B, C, or D. Four distributions on these outcomes corresponding
to θ = 0, 1, 2, 3 or 4 respectively. These distributions are
θ
A
B
C
D
0
1
2
3
4
0.25 0.5 0.11 0.8 0.9
0.25 0.25 0.14 0.1 0.06
0.25 0.13 0.25 0.05 0.02
0.25 0.12 0.5 0.05 0.02
Want a test that decides between the null hypothesis θ = 0 versus
the alternative θ 6= 0(or, in other words, the alternative that θ is
either 1, 2, 3, or 4.)
Fang-I Chu, Varvara Kulikova
PSTAT 120C Probability and Statistics
continue on example 1...
(a)
Consider the test that has the critical region {B}. Calculate the
level of this test, and calculate the power under each of the
alternatives θ = 1, 2, 3 or 4.
Answer.
The level of this test is the probability under the null hypothesis
(θ = 0) for {B}. That is P0 ({B}) = 0.25. The power of this test
when θ = 1 is P1 ({B}) = 0.25, when θ = 2 is P2 ({B}) = 0.14,
when θ = 3 is P3 ({B}) = 0.1, and when θ = 4 is P({B}) = 0.06.
Fang-I Chu, Varvara Kulikova
PSTAT 120C Probability and Statistics
continue on example 1...
(b)
Find the LRT for testing H0 : θ = 0 v.s. Ha : θ 6= 0 with level
α = 0.25.
Answer.
The GLRT takes takes the smallest values of the ratio maxPθ0 (ω)
Pθ (ω)
with ω ∈ {A, B, C , D}. It is easier to see from table below
θ
A
B
C
D
0
maxθ Pθ
0.25
0.9
0.25
0.25
0.25
0.25
0.25
0.5
The smallest ratio is for event A. Thus, the test with critical
region {A} has smallest ratio, and with level= 0.25.
Fang-I Chu, Varvara Kulikova
PSTAT 120C Probability and Statistics
continue on example 1...
(c)
Is it possible for the test with critical region {B}, {C } and {D} to
be more powerful than the LRT?
Answer.
Yes, it is possible, Notice when θ = 2, the power of the test with
critical region {B} from (a) is 0.14, the power of the test with
critical region {C } from (a) is 0.25, and the power of the test with
critical region {D} from (a) is 0.5; however, the power of the LRT
is only 0.11.
Fang-I Chu, Varvara Kulikova
PSTAT 120C Probability and Statistics
Ex. 2 #10.100 from textbook
#10.100
Let Y1 , Y2 , . . . , Yn denote a random sample from a population
having a Poisson distribution with mean λ1 . Let X1 , X2 , . . . , Xm
denote an independent random sample from a population having a
Poisson distribution with mean λ2 . Derive the most powerful test
for testing H0 : λ1 = λ2 = 2 v.s Ha : λ1 = 21 , λ2 = 3.
Fang-I Chu, Varvara Kulikova
PSTAT 120C Probability and Statistics
continue on example 2...
Answer.
Since X and Y are independent, the liklihood function to test
H0 : λ1 = λ2 = 2 vs. Ha : λ1 = 12 , λ2 = 3 is
Qn
Qm
L(λ1 = λ2 = 2)
i=1 f (yi |λ1 = 2)
j=1 f (xj |λ2 = 2)
=
Q
Q
n
m
1
L(λ1 = 12 , λ2 = 3)
i=1 f (yi |λ1 = 2 )
j=1 f (xj |λ2 = 3)
P
P
2 xj + yi exp(−2m − 2n)
= −Px Py
j3
i exp(− m − 3n)
2
2
P
yj
P
2
m
= 4 xj
exp(−3 + n) < k
3
2
For simplicity,
Pmtake log of2above
Pn equation.
0
0
Then (ln4) j=1 xj + ln( 3 ) i=1 yi < k is obtained and k is
chosen so that the test is of size α.
Fang-I Chu, Varvara Kulikova
PSTAT 120C Probability and Statistics