\[\newcommand{\E}{\mathrm{E}} \newcommand{\Var}{\mathrm{Var}} \newcommand{\Cov}{\mathrm{Cov}} \newcommand{\se}{\text{se}} \newcommand{\Lagr}{\mathcal{L}} \newcommand{\lagr}{\mathcal{l}}\]
Test
\[H_0: \theta \in \Theta_0 \quad \text{versus} \quad H_1: \theta \in \Theta_1\]
Rejection region \(R\)
\[R = \left\{ x: T(x) > c \right\}\]
\[\beta(\theta) = \Pr_\theta (X \in R)\]
The size of a test
\[\alpha = \text{sup}_{\theta \in \Theta_0} \beta(\theta)\]
Level \(\alpha\)
Two-sided test
\[H_0: \theta = \theta_0 \quad \text{versus} \quad H_1: \theta \neq \theta_0\]
One-sided test
\[H_0: \theta \leq \theta_0 \quad \text{versus} \quad H_1: \theta > \theta_0\]
or
\[H_0: \theta \geq \theta_0 \quad \text{versus} \quad H_1: \theta < \theta_0\]
Let \(X_1, \ldots, X_n \sim N(\mu, \sigma^2)\) where \(\sigma\) is known
\[H_0: \mu \leq 0 \quad \text{versus} \quad H_1: \mu > 0\]
Consider the test
\[\text{reject } H_0 \text{ if } T>c\]
where \(T = \bar{X}\)Rejection region \[R = \left\{(x_1, \ldots, x_n): T(x_1, \ldots, x_n) > c \right\}\]
Power function
\[ \begin{align} \beta(\mu) &= \Pr_\mu (\bar{X} > c) \\ &= \Pr_\mu \left(\frac{\sqrt{n} (\bar{X} - \mu)}{\sigma} > \frac{\sqrt{n} (c - \mu)}{\sigma} \right) \\ &= \Pr_\mu \left(Z > \frac{\sqrt{n} (c - \mu)}{\sigma} \right) \\ &= 1 - \Phi \left( \frac{\sqrt{n} (c - \mu)}{\sigma} \right) \end{align} \]
\[\alpha = \text{sup}_{\mu \leq 0} \beta(\mu) = \beta(0) = 1 - \Phi \left( \frac{\sqrt{n} (c)}{\sigma} \right)\]
Solve for \(c\)
\[c = \frac{\sigma \Phi^{-1} (1 - \alpha)}{\sqrt{n}}\]
Reject \(H_0\) when
\[\bar{X} > \frac{\sigma \Phi^{-1} (1 - \alpha)}{\sqrt{n}}\]
\[\frac{\sqrt{n}(\bar{X} - 0)}{\sigma} > z_\alpha\]
Consider testing
\[H_0: \theta = \theta_0 \quad \text{versus} \quad H_1: \theta \neq \theta_0\]
Assume that \(\hat{\theta}\) is asymptotically Normal:
\[\frac{\hat{\theta} - \theta_0}{\widehat{\se}} \leadsto N(0,1)\]
Reject \(H_0\) when \(|W| > z_{\alpha / 2}\) where
\[W = \frac{\hat{\theta} - \theta_0}{\widehat{\se}}\]
Power \(\beta(\theta_*)\)
\[1 - \Phi \left( \frac{\hat{\theta} - \theta_0}{\widehat{\se}} + z_{\alpha/2} \right) + \Phi \left( \frac{\hat{\theta} - \theta_0}{\widehat{\se}} - z_{\alpha/2} \right)\]
Power is large if the sample size is large
Let \(X_1, \ldots, X_m\) and \(Y_1, \ldots, Y_n\) be two independent samples from populations with means \(\mu_1, \mu_2\) respectively
\[H_0: \delta = 0 \quad \text{versus} \quad H_1: \delta \neq 0\]
where \(\delta = \mu_1 - \mu_2\)\(\hat{\delta} = \bar{X} - \bar{Y}\)
\[\widehat{\se} = \sqrt{\frac{s_1^2}{m} + \frac{s_2^2}{n}}\]
Size \(\alpha\) Wald test rejects \(H_0\) when \(|W| > z_{\alpha / 2}\) where
\[W = \frac{\hat{\delta} - 0}{\widehat{\se}} = \frac{\bar{X} - \bar{Y}}{\sqrt{\frac{s_1^2}{m} + \frac{s_2^2}{n}}}\]
\[f(t) = \frac{\Gamma (\frac{k+1}{2})}{\sqrt{k\pi} \Gamma (\frac{k}{2}) } (1 + \frac{t^2}{k})^{-\frac{k + 1}{2}}\]
Wald test
Reject \(H_0: \theta = \theta_0 \quad \text{versus} \quad \theta \neq \theta_0\) if and only if \(\theta_0 \notin C\) where
\[C = (\hat{\theta} - \widehat{\se}z_{\alpha / 2}, \hat{\theta} + \widehat{\se}z_{\alpha / 2})\]
\(p\)-value | evidence |
---|---|
\(< .01\) | very strong evidence against \(H_0\) |
\(.01 - .05\) | strong evidence against \(H_0\) |
\(.05 - .10\) | weak evidence against \(H_0\) |
\(> .1\) | little or no evidence against \(H_0\) |
Suppose that the size \(\alpha\) test is of the form
\[\text{reject } H_0 \text{ if and only if } T(X_n) \geq c_\alpha\]
Then,
\[\text{p-value} = \text{sup}_{\theta \in \Theta_0} \Pr_\theta (T(X^n) \geq T(x^n))\]
where \(x^n\) is the observed value of \(X^n\)
If \(\Theta_0 = \{ \theta_0 \}\) then
\[\text{p-value} = \Pr_{\theta_0} (T(X^n) \geq T(x^n))\]
\(p\)-value is given by
\[\text{p-value} = \Pr_{\theta_0} (|W| > |w|) \approx \Pr (|Z| > |w| = 2 \Phi(-|w|)\]
where \(Z \sim N(0,1)\)
\(V \sim \chi_k^2\) distribution with \(k\) degrees of freedom
\[f(v) = \frac{v^{\frac{k}{2} - 1} e^{-\frac{v}{2}}}{2^{\frac{k}{2} \Gamma \left(\frac{k}{2} \right)}}\]
for \(v>0\)
\(p_0 = (p_{01}, \ldots, p_{0k})\)
\[H_0: p = p_0 \quad \text{versus} \quad H_1: p \neq p_0\]
Pearson’s \(\chi^2\) statistic
\[T = \sum_{j=1}^k \frac{(X_j - np_{0j})^2}{np_{0j}} = \sum_{j=1}^k \frac{(X_j - E_j)^2}{E_j}\]
where \(E_j = \E[X_j] = np_{0j}\) is the expected value under \(H_0\)
Right to Abortion | Liberal | Moderate | Conservative | Total |
---|---|---|---|---|
Yes | 40.8% | 40.8% | 40.8% | 40.8% |
(206.45) | (289.68) | (271.32) | (768) | |
No | 59.2% | 59.2% | 59.2% | 59.2% |
(299.55) | (420.32) | (393.68) | (1113) | |
Total | 26.9% | 37.7% | 35.4% | 100% |
(506) | (710) | (665) | (1881) |
Right to Abortion | Liberal | Moderate | Conservative | Total |
---|---|---|---|---|
Yes | 62.6% | 36.6% | 28.7% | 40.8% |
(317) | (260) | (191) | (768) | |
No | 37.4% | 63.4% | 71.28% | 59.2% |
(189) | (450) | (474) | (1113) | |
Total | 26.9% | 37.7% | 35.4% | 100% |
(506) | (710) | (665) | (1881) |
Right to Abortion | Liberal | Moderate | Conservative | |
---|---|---|---|---|
Yes | Observed Frequency (\(X_j\)) | 317.0 | 260.0 | 191.0 |
Expected Frequency (\(E_j\)) | 206.6 | 289.9 | 271.5 | |
\(X_j - E_j\) | 110.4 | -29.9 | -80.5 | |
\((X_j - E_j)^2\) | 12188.9 | 893.3 | 6482.7 | |
\(\frac{(X_j - E_j)^2}{E_j}\) | 59.0 | 4.1 | 23.9 | |
No | Observed Frequency (\(X_j\)) | 189.0 | 450.0 | 474.0 |
Expected Frequency (\(E_j\)) | 299.4 | 420.1 | 393.5 | |
\(X_j - E_j\) | -110.4 | 29.9 | 80.5 | |
\((X_j - E_j)^2\) | 12188.9 | 893.3 | 6482.7 | |
\(\frac{(X_j - E_j)^2}{E_j}\) | 40.7 | 2.1 | 16.5 |
Consider testing
\[H_0: \theta \in \Theta_0 \quad \text{versus} \quad H_1: \theta \notin \Theta_0\]
Likelihood ratio test statistic
\[\lambda = 2 \log \left( \frac{\text{sup}_{\theta \in \Theta} \Lagr (\theta)}{\text{sup}_{\theta \in \Theta_0} \Lagr (\theta)} \right) = 2 \log \left( \frac{\Lagr(\hat{\theta})}{\Lagr (\hat{\theta}_0)} \right)\]
Under \(H_0: \theta \in \Theta_0\),
\[\lambda(x^n) \leadsto \chi_{r - q, \alpha}^2\]
Mendel bred peas with round yellow seeds and wrinkled green seeds. There are four types of progeny: round yellow, wrinkled yellow, round green, and wrinkled green. The number of each type is multinomial with probability \(p = (p_1, p_2, p_3, p_4)\). His history of inheritance predicts that \(p\) is equal to
\[p_0 \equiv \left(\frac{9}{16}, \frac{3}{16}, \frac{3}{16}, \frac{1}{16} \right)\]
Consider \(m\) hypothesis tests
\[H_{0i} \quad \text{versus} \quad H_{1i}, i = 1, \ldots, m\]
Given \(p\)-values \(P_1, \ldots, P_m\), reject null hypothesis \(H_{0i}\) if
\[P_i \leq \frac{\alpha}{m}\]