Statistical Inference
Hypothesis Testing
Neyman--Pearson Lemma
The cleanest optimality result in hypothesis testing is for simple vs. simple tests, where both hypotheses fully determine the distribution.
Equivalently, the null gives one distribution $p_{\theta_0}$ and the alternative gives one distribution $p_{\theta_1}$.
The rejection region has form:
\[ \Lambda(x)>c, \]where $c$ is chosen so that:
\[ P_{\theta_0}(\Lambda(X)>c)\le \alpha. \]
Composite Hypotheses
Most useful tests are not simple vs. simple. The null or alternative usually contains many possible distributions.
The null family is $\{p_\theta:\theta\in\Theta_0\}$ and the alternative family is $\{p_\theta:\theta\in\Theta_1\}$.
\[ \sup_{\theta\in\Theta_0} P_\theta(\text{reject }H_0) \le \alpha. \]
A test is UMP if it has maximal power for every $\theta\in\Theta_1$ among all level-$\alpha$ tests.
UMP tests often do not exist for composite hypotheses. A test can be best for one alternative but worse for another. To recover optimality, we usually restrict the problem using extra structure.
Gaussian Mean Tests
For Gaussian mean testing, the nuisance parameters are the unknown common mean and possibly the unknown variance.
the one-sided two-sample mean test is:
\[ H_0:\mu_X=\mu_Y \qquad H_1:\mu_X>\mu_Y. \]Equivalently:
\[ H_0:\Delta=0 \qquad H_1:\Delta>0, \qquad \Delta=\mu_X-\mu_Y. \]
If $\sigma$ is known, the nuisance variance disappears by standardizing the difference in sample means.
Under $H_0$:
\[ Z\sim N(0,1). \]Reject at level $\alpha$ when:
\[ Z>z_{1-\alpha}. \]The one-sided p-value is:
\[ p=1-\Phi(Z_{\text{obs}}). \]
Pooled and Welch t-Tests
If the variance is unknown but shared across both groups, we estimate it using the pooled sample variance.
use:
\[ S_p^2= \frac{(n-1)S_X^2+(m-1)S_Y^2}{n+m-2}. \]Then:
\[ T= \frac{\bar X-\bar Y}{S_p\sqrt{1/n+1/m}}. \]Under $H_0$:
\[ T\sim t_{n+m-2}. \]Reject at level $\alpha$ when:
\[ T>t_{n+m-2,1-\alpha}. \]
The pooled t-test is not directly a Neyman--Pearson test. Its finite-sample optimality comes from restricting to tests that respect the natural symmetries of the Gaussian problem.
\[ (X_i,Y_j)\mapsto a(X_i,Y_j)+b, \qquad a>0. \]
If the variances are unequal, the exact finite-sample problem becomes harder.
use Welch's statistic:
\[ T= \frac{\bar X-\bar Y}{\sqrt{S_X^2/n+S_Y^2/m}}. \]Approximate degrees of freedom:
\[ \nu\approx \frac{(S_X^2/n+S_Y^2/m)^2} {\frac{(S_X^2/n)^2}{n-1}+\frac{(S_Y^2/m)^2}{m-1}}. \]Then approximately:
\[ T\sim t_\nu. \]
Confidence Intervals
Bernoulli Confidence Intervals
A confidence interval is a random set $C(X)$ designed to contain the true parameter with high probability.
A confidence interval $C(X)$ has coverage $1-\alpha$ if:
\[ P_p(p\in C(X))\ge 1-\alpha \qquad \forall p\in[0,1]. \]
The simplest interval is the Wald interval, but it only has asymptotic justification.
It satisfies approximately:
\[ P_p(p\in C(X))\approx 1-\alpha \qquad n\to\infty. \]
Clopper--Pearson Interval
Clopper--Pearson fixes the finite-sample coverage issue by inverting exact binomial tests.
It satisfies:
\[ P_p(L(X)\le p\le U(X))\ge 1-\alpha \qquad \forall p\in[0,1]. \]