{{ message }}

# Two Sample Non Parametric Test of Location

The two sample non parametric test of location tests the hypothesis that

$H_0: \theta=0 \text{ versus } H_a: \theta \neq 0.$

To perform the sample size calculation for this test, we need to estimate three parameters: $$p_1$$, $$p_2$$, and $$p_3$$. If we let $$x_i$$ and $$y_j$$ be two independant samples with $$i = 1, \dots, n_1$$ and $$j = 1, \dots, n_2$$, we can estimate these parameters by:

$\hat{p}_1 = \frac{1}{n_1 n_2} \sum_{i=1}^{n_2}\sum_{j=1}^{n_1} I\{y_i \ge x_j \}$ $\hat{p}_2 = \frac{1}{n_1 n_2 (n_1 - 1)} \sum_{i=1}^{n_2}\sum_{j_1 \ne j_2} I\{y_i \ge x_{j_1} \text{ and } y_i \ge x_{j_2} \}$ $\hat{p}_3 = \frac{1}{n_1 n_2 (n_2 - 1)} \sum_{i_1 \ne i_2}\sum_{j=1}^{n_1} I\{y_{i_1} \ge x_j \text{ and } y_{i_2} \ge x_j \}$

## Power Calculation Parameters

To input multiple values, seperate them by a comma.

{{ this.errors }}

## Power Calculation Explanation

Solve For
The unknown you are interested in solving for.
N
The sample size used to test the hypothesis.
Ratio
The ratio of the sample size in arm 1 to arm 2. The total sample size is minimized for a given power when the ratio is 1 (i.e. the design is balanced).
Alpha
The $$\alpha$$ (Type I error rate) level of the hypothesis test.
Power
The power (1 - Type II error rate) of the hypothesis test.
$$p_1$$
The value of $$p_1$$ whose formula is given above.
$$p_2$$
The value of $$p_2$$ whose formula is given above.
$$p_3$$
The value of $$p_3$$ whose formula is given above.

## Calculation Results

No calculation has been generated yet.

N (Arm 1) N (Arm 2) Alpha Power $$p_1$$ $$p_2$$ $$p_3$$
{{ val }}