# XLSTAT - Non parametric tests on two independent samples

### Principles of non-parametric tests on two independent samples

The non-parametric tests on two independent sample are used to compare the distribution of two independent samples.

Non-parametric tests have been put forward in order to get round the assumption, that a sample is normally distributed, required for using the parametric tests (z test, Student's t test, Fisher's F test, Levene's test and Bartlett's test).

### Non-parametric Tests on two independent samples

If we designate D to be the assumed difference in position between the samples (in general we test for equality, and D is therefore 0), and P_{1}-P_{2} to be the difference of position between the samples, three tests are possible depending on the alternative hypothesis chosen:

- the two-tailed test:
**H**_{0}: P_{1}- P_{2}= D and H_{a}: P_{1}- P_{2}≠ D - the left-tailed test:
**H**_{0}: P_{1}- P_{2}= D and H_{a}: P_{1}- P_{2}< D - the right-tailed test:
**H**_{0}: P_{1}- P_{2}= D and H_{a}: P_{1}- P_{2}> D

#### Mann-Whitney's test

Use the Mann-Whitney's test to determine if the samples come from a single population or from two different populations meaning that the two samples may be considered identical or not. This test is based on on the ranks. XLSTAT can perform a two-tailed or a one-tailed test.

This test is often called the Mann-Whitney test, sometimes the Wilcoxon-Mann-Whitney test or the Wilcoxon Rank-Sum test.

Let S_{1} be a sample made up of n_{1} observations (x_{1}, x_{2}, …, x_{n}_{1}) and S_{2} a second sample made up of n_{2} observations (y_{1}, y_{2}, …, y_{n2}) independent of S_{1}. Let N be the sum of n_{1} and n_{2}.

XLSTAT calculates the Wilcoxon Ws statistic which measures the difference in position between the first sample S_{1} and sample S_{2} from which D has been subtracted, we combine the values obtained for both samples, then put them in order. For XLSTAT, the Ws statistic is the sum of the ranks of the first samples.

For the expectation and variance of Ws we therefore have:

**E(Ws) = 1/2 n _{1}(N + 1)**

and

**V(Ws) = 1/12 n**

_{1}n_{2}(N + 1)The Mann-Whitney U statistic is the sum of the number of pairs (x_{i}, y_{i}) where x_{i}>y_{i}, from among all the possible pairs. We show that:

**E(U) = n _{1}n_{2}/2**

and

**V(U) = 1/12 n**

_{1}n_{2}(N + 1)We may observe that the variances of Ws and U are identical. In fact, the relationship between U and Ws is:

**Ws = U + n _{1}(n_{1} + 1) / 2**

The results offered by XLSTAT are those relating to Mann-Whitney's U statistic.

#### Kolmogorov-Smirnov's test

Use the Kolmogorov-Smirnov's test to determine if the populations from which the samples were taken have different cumulative distribution functions. XLSTAT performs a two-tailed test.

Copyright © 2014 Kovach Computing Services, Anglesey, Wales. All Rights Reserved. Portions copyright Addinsoft and Provalis Research.

Last modified 9 August, 2013