Statistics > Nonparametrics > Runs Test

This utility performs calculations for the runs test, which is a non-parametric test that uses the number of runs in a sequence of sample data to test for randomness in the order of the data. A run is a sequence of data belonging to the same category. The null hypothesis H0 of a claim is that the sequence is random. The alternative hypothesis H1 is that the sequence is not random.

Each data value can be categorized into one of two separate categories. For example, the two categories can be text descriptions "a" and "b". For numerical data, the two categories can be defined to be above and below a certain numerical value, such as the mean.

Let n1 be the number of samples belonging to the first category. Let n2 be the number of samples belonging to the second category. Let G be the number of runs.

Using normal approximation, the test statistic z is

where


The two-tailed p-value and critical value are provided in the test results.

To use the utility, you must provide the sample data in a single column or provide the summary data. If a sample of fewer than ten observations is used, a note indicating the presence of small samples will be shown.