We observe (X1,…,Xn) iid real valued random variables.
CLT
Fisher’s Quote
The value for which p=0.05, or 1 in 20, is 1.96 or nearly 2 ; it is convenient to take this point as a limit in judging whether a deviation is to be considered significant or not.
Multiple VS multiple test problem: H0:{μ0,σ>0} or H1:{μ≠μ0,σ>0}.
ψ(X)=√n(¯X−μ0)σ no longer test statistic.
Idea: replace σ by its estimator ˆσ(X)=√1n−1n∑i=1(Xi−μ0)2.
This gives ψ(X)=√n(¯X−μ0)ˆσ.
Is ψ(X) pivotal under H0 ? What is its distribution ?
Chi-squared distribution χ2(k)
Student distribution T(k)
Theorem
Assume Xi are iid N(μ0,σ2).
Multiple VS multiple test problem X=(X1,…,Xn): H0:{μ0,σ>0} or H1:{μ≠μ0,σ>0}.
(Student) T-test statistic: ψ(X)=√n(¯X−μ0)ˆσ(X)∼T(n−1)
Note
quantile(Chisq(n-1), 1-alpha)
1-cdf(Chisq(n-1), xobs)
quantile(Chisq(n-1), alpha)
cdf(Chisq(n-1), xobs)
We observe (X1,…,Xn1) iid N(μ1,σ21) and (Y1,…,Yn2) iid N(μ2,σ22).
σ1, σ2 are known, μ1, μ2 are unknown
Test problem: H0:μ1=μ2 or H1:μ1≠μ2
Idea: normalize ¯X−¯Y: ψ(X,Y)=¯X−¯Y√σ21n1+σ22n2
Two-tailed test for testing means: T(X,Y)=|¯X−¯Y√σ21n1+σ22n2|≥t1−α/2,
t1−α/2 is the (1−α/2)-quantile of a Gaussian distribution
Objective. Test if a new medication is efficient to lower cholesterol level
Experiment.
Test Problem.
Test Statistic. ψ(X,Y)=¯X−¯Y√σ2n1+σ2n2
Data. ¯X=24.5 mg/dL and ¯Y=21.3 mg/dL. Hence ψ(X,Y)=5.5.
Conclusion. Do not reject, and do not use this medication!
Proposition
Student T-Test for two populations with equal variance
ˆσ2=1n1+n2−2(∑n1i=1(Xi−¯X)2+∑n2i=1(Yi−¯Y)2)
Normalize ¯X−¯Y: ψ(X,Y)=¯X−¯Y√ˆσ2(1n1+1n2)∼T(n1+n2−2).
ψ(X,Y) is pivotal because σ1=σ2.
Student Welch test statistic
ψ(X,Y)=¯X−¯Y√ˆσ21n1+ˆσ22n2
CLT
Example: binomials
Good Approx for (n=100, p=0.2)
Bad Approx for (n=100, p=0.01)
Test Statistic
ψ(X,Y)=ˆp1−ˆp2√ˆp(1−ˆp)(1n1+1n2).
Non-Smokers | Smokers | Total | |
---|---|---|---|
YES | 351 | 41 | 392 |
NO | 254 | 195 | 449 |
Total | 605 | 154 | 800 |
1-cdf(Normal(0,1), 8.99)