1 hypothesis testing

Null hypothesis H_0. New alternatives emerging from the previous hypothesis are alternative hypothesis H_1.

1.1 testing procedure

Testing to check whether H_0 should be rejected or failed to reject.

1.1.1 test statistic

Distance between the sample data we have collected and the null hypothesis.

1.1.2 rejection region (RR)

Set of all values of test statistic for which H_0 would be rejected. If the test statistic falls into RR then H_0 will be rejected.

1.1.3 error type

When an erroneous conclusion is reached about the population parameter.

1.1.3.1 Type 1 error

To reject a true null hypothesis

\alpha = P(\text{reject } H_0|H_0 \text{ is true})

1.1.3.2 Type 2 error

To fail to reject a false null hypothesis

\beta = P(\text{accept } H_0|H_0 \text{ is false})

1.1.3.3 power

\text{power} = 1 - \beta = P(\text{reject } H_0|H_0 \text{ is false})

1.2 p-value

Probability of obtaining a test statistic at least as extreme as the observed one (given H_0 is true)

1.3 simple hypothesis

1.3.1 Nyeman-Pearson theorem

For testing H_0: \theta = \theta_0 versus a simple alternative hypothesis H_1: \theta = \theta_1, let c be a positive fixed number. Then:

R^* = \{(x_1, \cdots, x_n) : \frac{f(x_1, \cdots, x_n; \theta_1)}{f(x_1, \cdots, x_n; \theta_0)} \ge c \}

is the rejection region.

\alpha^* = P((X_1, \cdots, X_n) \in R^* | H_0)

\beta^* = P((X_1, \cdots, X_n) \notin R^* | H_1)

Are type 1 and 2 errors respectively.

1.4 uniformly most powerful tests (UMP tests)

Let H_0: \theta \in \Omega_0 vs H_1: \theta \in \Omega_1. The power function is defined as

\pi(\theta') = P((X_1, \cdots, X_n) \in R|\theta = \theta')

UMP test is one for which \pi(\theta') is maximized for any \theta' \in \Omega_1 subject to \pi(\theta') \le \alpha for any \theta' \in \Omega_0

1.4.1 likelihood ratio test

TODO

1.5 Wilcoxon Signed-Rank test

We wish to test H_0 be \tilde \mu = 0 (median or mean) without normality assumptions.

Let R_1, \cdots, R_n be ranks of |X_1|, \cdots, |X_n| (ascending order), then

W_+ = \sum_{X_i:sign(X_i)=1} R_i

Is the sum of all positive signed-ranks.

For H_0 \tilde \mu = \mu_0 then just subtract \mu_0 from each observation and consider the Wilcoxon test for the modified sample.

1.5.1 Mann-Whitney test

Two independent samples, we wish to test H_0 \mu_X = \mu_Y. We order the pooled sample and assign ranks R_1, \cdots, R_{m+n}. Set

W = \text{Sum of } R_i \text{ associated with } X-\text{sample}