Run Test | A sequence may also be tested for "runs up" and "runs down". This means that we examine the length of monotone portions of the original sequence. As example of precise definition of a run, consider the sequence of ten digits "1298536704". Putting a vertical line at the left and right and between X[j] and X[j+1] whenever Xj > X[j+1] we obtain |1 2 9 | 8 | 5 | 3 6 7 | 0 4| which displays the "run up": there is a run of length 3, followed by two runs of length 1, followed by another run of length 3, followed by a run of length 2. The program calculates the p-values for the runs up and runs down. The test is failed if any value less than 0.001 or larger than 0.999. |