Lecture 9: Hypothesis testing II
Jason Mezey jgm45@cornell.edu March 3, 2016 (Th) 8:40-9:55
Quantitative Genomics and Genetics BTRY 4830/6830; PBSB.5201.01 - - PowerPoint PPT Presentation
Quantitative Genomics and Genetics BTRY 4830/6830; PBSB.5201.01 Lecture 9: Hypothesis testing II Jason Mezey jgm45@cornell.edu March 3, 2016 (Th) 8:40-9:55 Announcements Homework #3, #4 will be graded and available next week Summary of
Jason Mezey jgm45@cornell.edu March 3, 2016 (Th) 8:40-9:55
particular class of hypothesis tests (Likelihood Ratio Tests)
quantitative genetics
System Question
Experiment
Sample
Assumptions
Inference P r
. M
e l s
Statistics
Experiment
X = x , Pr(X)
Random Variable
Pr(F)
F
Ω
→ [X1 = x1, ..., Xn = xn] , Pr([X1 = x1, ..., Xn = xn])
Sample of size n Sampling Distribution
X(ω), ω ∈ Ω
T(x), P
=
θ ∈ Θ
Pr(T(X)|H0 : θ = c)
H0 : θ = c
probability distribution (from an assumed family of probability distributions indexed by parameters) on the basis of a sample
Sigma Algebra, Probability Measure, Random Vector, Parameterized Probability Model, Sample, Sampling Distribution, Statistic, Statistic Sampling Distribution, Estimator, Estimator Sampling distribution Null Hypothesis, Sampling Distribution Conditional on the Null, p-value, One-or-Two-Tailed, Type I Error, Critical Value, Reject / Do Not Reject 1 - Type I, Type II Error, Power, Alternative Hypothesis
start with a definition of hypothesis
which states that a parameter takes a specific value, i.e. a constant
distribution of the statistic, assuming the null hypothesis is true:
extreme, conditional on H0 being true:
H0 : θ = c
t Pr(T(X = x|θ = c))
), pval = Pr(|T(x)| t|H0 : θ = c) w −∞ ∞
⇥ pval(T(x)) : T(x) → [0, 1]
Pr(T(x) | H0)
is H0 : µ = 0
T(x)
Sample 1: Sample 1I:
d cα)
α =0.05
=1.64
α =0.05
d cα) d cα)
=1.96
p = 0.45
p = 0.0025
p = 0.77
T(x)= -0.755 T(x)= 2.8
two-sided test
hypothesis test: reject or cannot reject
H0 is true H0 is false cannot reject H0 1-α, (correct) β, type II error reject H0 α, type I error 1 − β, power (correct)
Pr(T(x) | H0)
T(x)
hypothesis test: reject or cannot reject
H0 is true H0 is false cannot reject H0 1-α, (correct) β, type II error reject H0 α, type I error 1 − β, power (correct)
Pr(T(x) | H0)
d cα)
=1.64
T(x)
hypothesis test: reject or cannot reject
H0 is true H0 is false cannot reject H0 1-α, (correct) β, type II error reject H0 α, type I error 1 − β, power (correct)
Pr(T(x) | H0)
T(x)
d cα)
=1.64
Pr(T(x) | H0)
is H0 : µ = 0
T(x)
Sample 1: Sample 1I:
d cα)
α=0.05
=1.64
α=0.05
d cα) d cα)
=1.96
p = 0.45 p = 0.0025
p = 0.77
T(x)= -0.755 T(x)= 2.8
two-sided test
hypothesis test: reject or cannot reject
H0 is true H0 is false cannot reject H0 1-α, (correct) β, type II error reject H0 α, type I error 1 − β, power (correct)
Pr(T(x) | H0)
H0 is true H0 is false cannot reject H0 1-α, (correct) β, type II error reject H0 α, type I error 1 − β, power (correct)
Pr(T(x) | H0)
hypothesis test: reject or cannot reject
d cα)
=1.64
T(x)
H0 is true H0 is false cannot reject H0 1-α, (correct) β, type II error reject H0 α, type I error 1 − β, power (correct)
Pr(T(x) | H0)
hypothesis test: reject or cannot reject T(x)
d cα)
=1.64
for two-sided):
1 − α = cα
−∞
Pr(T(x)|θ = c)dT(x)
∞
cα
Pr(T(x)|θ = c)dT(x)
cα
−∞
Pr(T(x)|θ)dT(x)
1 − β = ∞
cα
Pr(T(x)|θ)dT(x)
test: we reject or we cannot reject
directly (since it depends on the actual parameter value)
parameter is from the H0, we can make decisions to increase power depending on how we set up our experiment and test:
(trade-off!)
α
1 − β
1 − β
α
1 − β
hypothesis testing: the alternative hypothesis (HA)
i.e. where we suspect our true parameter value will fall if our H0 is incorrect, i.e. for our example above:
HA : µ > 0 HA : µ ⇥= 0
probability distribution (from an assumed family of probability distributions indexed by parameters) on the basis of a sample
Sigma Algebra, Probability Measure, Random Vector, Parameterized Probability Model, Sample, Sampling Distribution, Statistic, Statistic Sampling Distribution, Estimator, Estimator Sampling distribution Null Hypothesis, Sampling Distribution Conditional on the Null, p-value, One-or-Two-Tailed, Type I Error, Critical Value, Reject / Do Not Reject 1 - Type I, Type II Error, Power, Alternative Hypothesis
sample -> statistic, and a p-value is a function on a statistic, we also have a probability distribution on our p-values
the null hypothesis is true (!!) regardless of the statistic or hypothesis test:
there are an unlimited number of ways to define hypothesis tests
good power, having nice mathematical properties, etc.
concerned with in this class) are Likelihood Ratio Tests (LRT)
they have a confusing structure at first glance, however, just remember these are simply a statistic (sample in, number out) that we use like any other statistic, i.e. with the number out, we can calculate a p-value etc.
likelihood given the sample restricted to the set of parameters defined by H0, which we symbolize by
likelihood given the sample restricted to the set of parameters defined by HA or more usually the values
for example:
lihood is Θ0,
1
r Θ1 = ΘA
e cases we will consider, we if H0 : µ = c then HA : µ ⇤= c)
Λ = L(ˆ θ0|x) L(ˆ θ1|x)
| L(θ|x)
| ˆ θ0 = argmaxθ∈Θ0L(θ|x)
∈
| ˆ θ1 = argmaxθ∈Θ1L(θ|x)
∈
H0 : µ = c
L(θ|x) =
1 (2πσ2)
n 2 e
Pn
i=1 −(xi−µ)2 2σ2
LRT = Λ =
1 (2π∗MLE(ˆ σ2)) n 2 e Pn i=1 −(xi−H0(µ))2 2∗MLE(ˆ σ2) 1 (2π∗MLE(ˆ σ2)) n 2 e Pn i=1 −(xi−MLE(ˆ µ))2 2∗MLE(ˆ σ2)
MLE(ˆ µ) = mean(x) = 1
n
Pn
i=1 xi
P MLE(ˆ σ2) = 1
n
Pn
i=1(xi − mean(x))2
H0(µ) = c
under the null (note likelihood ratio tests are two-sided test)
the sampling distribution of this statistic under the null approaches (in the specific case on the last slide, the d.f. = k = 1!!):
(n → ∞)
| LRT = −2ln(Λ) = −2ln
θ0|x) L(ˆ θ1|x) ⇥
| Pr(LRT|H0 : θ = c) → χ2
d.f.
approaches a distribution as and a case where we know the exact distribution for any size n (i.e., for the former, the null distribution is approximate)
(since we need to know this distribution to do the hypothesis test!)?
properties for many types of cases
ANY sample size n is known exactly for a specified transformation of the likelihood ratio statistic
tests, tests of the linear regression slope, etc.), that is, these tests are forms of likelihood ratio test statistic!!!
(n → ∞)