Loading…

Runs Test for Randomness

Statistics • Nonparametric Methods

View all topics
Runs are counted after converting to a + / − sequence.
Tail shading changes in the curve plot.
Exact is most useful for small samples.
Used only in binary mode.

Binary sequence input

Tips
  • Separators can be spaces, commas, or new lines.
  • A single compact string like HTHHTT is also accepted.
  • Unrecognized tokens are ignored.
CSV with headers is OK; numeric mode uses the first numeric column.
Loads into the currently selected mode’s textarea.
Ready

Results

Choose a mode, enter your data, then click Calculate.

Rate this calculator

0.0 /5 (0 ratings)
Be the first to rate.
Your rating
You can update your rating any time.

Frequently Asked Questions

What is a run in the runs test for randomness?

A run is a maximal consecutive block of identical symbols in a +/− sequence. The test counts how many runs appear and compares that count to what randomness would typically produce given the numbers of pluses and minuses.

How does this calculator convert a numeric series into + and −?

It classifies each value relative to a cutoff c using either the sample median or a user-entered threshold. Values above c become +, values below c become −, and values equal to c can be dropped or forced into + or − based on your setting.

What do “too few runs” and “too many runs” mean?

Too few runs suggests clustering or long streaks of the same symbol, which can indicate non-random grouping. Too many runs suggests frequent alternation, which can indicate oscillation or over-regularity.

When should I use the exact p-value method instead of the normal approximation?

The exact method is most useful for small samples because it uses the exact distribution of the run count given n-plus and n-minus. The normal approximation is a common choice for moderate or large samples and can optionally use a continuity correction.

Why does the calculator require both + and − to appear?

The runs test compares patterns of alternation between two categories, so it needs at least one + and one − to define runs and compute the expected run behavior under randomness.