Normal location problem
Suppose $X_1, \ldots, X_n \sim N(μ, σ^2)$ iid.
-
If $μ$ is unknown but $σ^2$ is known, then a minimal sufficient statistic is $\overline{X} = \frac{1}{n}\sum_{i=1}^{n} X_i$.
-
If both $μ$ and $σ^2$ are unknown, then a minimal sufficient statistic is $(\sum_{i} X_i, \sum_{i} X_i^2)$ (or under a bijection, $(\overline{X}, S_{XX})$).
Suppose $X_1, \ldots, X_n \sim N(μ,σ^2)$ iid, and let $$ \begin{align*} \overline{X} = \frac{1}{n}\sum_{i=1}^{n} X_i, \qquad S_{XX} = \sum_{i=1}^{n} (X_i - \overline{X})^2. \end{align*} $$
Then $\overline{X} \sim N(μ, σ^2/n)$ and $S_{XX}/σ^2 \sim χ^2_{n-1}$ are independent.
The maximum likelihood estimator for $μ$ is $$ \begin{align*} \hat μ_{\text{MLE}} = \overline{X} := \frac{1}{n}\sum_{i=1}^{n} X_i \end{align*} $$ regardless of whether $σ^2$ is known. This is unbiased.
The maximum likelihood estimator for $σ^2$ is $$ \begin{align*} \hat σ^2_{\text{MLE}} = \frac{S_{XX}}{n} := \frac{1}{n}\sum_{i=1}^{n} (X_i - \overline{X})^2. \end{align*} $$ This is biased in a finite sample but asymptotically unbiased: $\expect(\hat σ^2_{\text{MLE}}) = \frac{n-1}{n}σ^2$.
Suppose $μ$ is unknown but $σ^2$ is known.
A $(1-α)$-confidence interval is $$ \begin{align*} \left[\overline{X} - \frac{σz_{α_1}}{\sqrt{n}},\; \overline{X} + \frac{σz_{α_2}}{\sqrt{n}}\right] \end{align*} $$ where $α_1 + α_2 = α$. (Derivation)
-
Choose $α_1 = α_2 = α/2$ for an interval centred around the point estimator $\overline{X}$.
-
For $α=0.05$, $z_{α/2}\approx 1.96$, so the confidence interval is $\overline{X} \pm 1.96\, σ/\sqrt{n}$.
Suppose $μ$ is unknown but $σ^2$ is known.
The conjugate prior is $μ\sim N(μ_0, λ_0\inv)$ where $μ_0\in \R$ and $λ_0>0$ are given. After observing $X_1, \ldots, X_n \sim N(μ, λ\inv)$, the posterior distribution is $$ \begin{align*} μ\mid X \sim N\biggl(\frac{λ_0 μ_0 + nλ\overline{X}}{λ_0 + nλ}, \frac{1}{λ_0 + nλ}\biggr). \end{align*} $$ (Derivation)
Suppose $σ^2$ is known.
-
The likelihood ratio test for testing $H_0: μ=μ_0$ against $H_1: μ=μ_1$ where $μ_1 > μ_0$ is the one-sided z-test: reject $H_0$ if $$ \begin{align*} Z := \frac{\sqrt{n}(\overline{X} - μ_0)}{σ} > z_α \end{align*} $$ where $z_α$ is the upper $α$ quantile of the standard normal distribution.
By the Neyman-Pearson lemma, the z-test is the size $α$ uniformly most powerful test. (Derivation)
Proposition (one-tailed z-test is UMP) open_in_newThe z-test is uniformly most powerful for testing $H_0: μ\leq μ_0$ against $H_1: μ>μ_0$ in the normal location problem.
-
The generalised likelihood ratio test for testing $H_0: μ = μ_0$ against $H_1: μ\neq μ_0$ is the two-sided z-test: reject $H_0$ if $$ \begin{align*} |Z| > z_{α/2}. \end{align*} $$ (Derivation) This is the UMP unbiased test.
The t-distribution with $k$ degrees of freedom, denoted as $t_k$, is defined as the distribution of $$ \begin{align*} T = \frac{Z}{\sqrt{Y/k}} \end{align*} $$ where $Z\sim N(0,1)$ and $Y \sim χ_k^2$ are independent.
It has a density function $$ \begin{align*} p(x) = \frac{Γ(\frac{k+1}{2})}{\sqrt{πk}\, Γ(\frac{k}{2})} \left(1+\frac{x^2}{k}\right)^{-(k+1)/2}. \end{align*} $$
-
$t_1$ is the Cauchy distribution.
-
$t_k \xrightarrow{d} N(0,1)$ as $k\to \infty$.
-
The tail behaves like $x^{-(k+1)}$, so moments $\expect(|X|^m)<\infty$ only for $0< m<k$.
Suppose $μ$ and $σ^2$ are both unknown.
Student's t-statistic for the hypothesis $H_0: μ = μ_0$ is given by $$ \begin{align*} T = \frac{\sqrt{n}(\overline{X} - μ_0)}{\sqrt{S_{XX}/(n-1)}}. \end{align*} $$ $T\sim$ $t_{n-1}$, since $\sqrt{n}(\overline{X} - μ_0)/σ \sim N(0,1)$ and $S_{XX}/σ^2 \sim χ_{n-1}^2$ are independent.
-
One-sided $t$-test: to test $H_0: μ\leq μ_0$ against $H_1: μ>μ_0$, reject $H_0$ if $$ \begin{align*} T > t_{n-1}(α) \end{align*} $$ where $t_{n-1}(α)$ is the upper $α$ quantile of $t_{n-1}$.
-
Two-sided $t$-test: to test $H_0: μ=μ_0$ against $H_1: μ\neq μ_0$, reject $H_0$ if $$ \begin{align*} |T| > t_{n-1}(α/2). \end{align*} $$
This is generalised in a normal linear model.