Nonparametric statistical tests, k samples#

Jonckheere-Terpsta \(S\) test: p-value and confidence interval, continuous data#

ctx.jterpsta_test(x, k, n, method='default')#

where ctx is dec, mpm, or gmp.

Returns the results of the Jonckheere-Terpsta \(S\) test, under \(H_0\). See also Wikipedia [1570].

Consider \(k\) independent groups \(X_i\) of sizes \(n_i, i=1 \ldots k\). The Jonckheere-Terpsta statistic is defined as

\[J = \sum_{i<j}^{c} U_{ij} = \sum_{i=1}^{c-1} \sum_{j=i+1}^{c} U_{ij}\]

where \(U_{ij}\) is Mann-Whitney’s \(U\) calculated for groups \(X_i\) and \(X_j\).

Jonckheere-Terpsta \(S\) test, Shorack alternatives: power and sample size#

ctx.jterpsta_power_shorack(x, k, n, method='default')#

where ctx is dec, mpm, or gmp.

Returns the results of the Jonckheere-Terpsta \(S\) test, under Shorack alternatives. See also Wikipedia [1570].

Jonckheere-Terpsta \(S\) test (stratified), Milton alternatives: power and sample size#

ctx.jterpsta_power_milton(x, k, n, method='default')#

where ctx is dec, mpm, or gmp.

Returns the results of the Jonckheere-Terpsta \(S\) test, under Milton alternatives. See also Wikipedia [1570].

Spearman test for 2 correlated samples: p-value#

ctx.spearman_test(x, k, n, method='default')#

Returns the results of the Spearman test, under \(H_0\). See also: Wikipedia [1584].

Generalized Page \(L\) test: p-value#

ctx.page_l_test(x, k, n, method='default')#

where ctx is dec, mpm, or gmp.

Returns the results of the Page \(L\) test under \(H_0\). See also: Wikipedia [1579].

Page’s test (see Page, 1963) is a test for ordered alternatives in a randomised block design. We consider \(n\) independent random vectors such that \((X_{i1}, \ldots , X_{ik})\) has a continuous distribution function \(F_i\).

Within each block rank scores \(1, \ldots k\) are assigned to \(k\) treatments. Let \(\beta_j\) denote the block effect of the \(j`th treatment. The null hypothesis is `\text{H}_0: \beta_1 = \cdots = \beta_t\) and the alternative hypothesis is \(\text{H}_1: \beta_1 \le \cdots \le \beta_k\) with at least one strict inequality. Let \(\rho_i\) be Spearman’s rank correlation coefficient between \((X_{i1}, \ldots , X_{ik})\) and its own order statistic, and let \(D_i = (k-1)k(k+1)(1-\rho_i)/6\). The statistic \(L\) is defined as

\[L = \sum_{j=1}^{n} D_i = \sum_{j=1}^{n} jR_j,\]

where \(R_j\) is the sum of the \(n\) ranks assigned to treatment \(j\). The pmf of the distribution of \(S_i\) is obtained by enumeration of all permutations from \(1, \ldots k\), followed by calculation of the \(D_i\)-statistic. From the pmf, the cumulants and the probability generating function are obtained.

Generalized Page \(L\) test, Milton alternatives: power and sample size#

ctx.page_l_milton_power(x, k, n, method='default')#

where ctx is dec, mpm, or gmp.

Returns the results of the Generalized Page \(L\) test, under Milton alternatives.

Generalized Quade \(L\) test: p-value#

ctx.quade_l_test(x, k, n, method='default')#

where ctx is dec, mpm, or gmp.

Returns the results of the Quade \(L\) test under \(H_0\).