Understand the hypothesis test
Treat model checks as evidence, not proof
Runs Test for Randomness. A diagnostic test compresses one kind of departure into a statistic. Different checks emphasize tails, shape, cumulative gaps, or ordering.
1Specify the reference pattern2Measure the chosen discrepancy3Combine the result with plots and context
Test statistic and reference model
E(R)=1+2n₁n₀/n; variance uses n₁ and n₀ counts.
Too few runs suggest clustering and too many suggest alternation, but the test does not identify a mechanism.
Responsible interpretation
Failure to reject is not proof that the data are normal, random, independent, or well modeled. Small samples may have little power and huge samples may flag minor departures.
Required assumption: The sequence must be binary in its original order with fixed counts; ties from converting continuous data require a declared rule outside this tool.
Quick guide
How to use this calculator
- Enter the observations, probabilities, model parameters, or summary statistics requested by the visible labels.
- Keep every value on the same scale and confirm that the selected sampling relationship, distribution, and tail convention match the question you are investigating.
- Read the result together with its assumptions and interpretation. Statistical output summarizes uncertainty under a model; it does not repair biased data or establish causation.
Calculation method
How the runs test for randomness calculator works
E(R)=1+2n₁n₀/n; variance uses n₁ and n₀ counts.
Too few runs suggest clustering and too many suggest alternation, but the test does not identify a mechanism.
Worked example
Runs Test for Randomness example
Sequence 1,1,0,0,1,0 contains four runs.
E(R)=1+2n₁n₀/n; variance uses n₁ and n₀ counts.
Supported inputs
Precision and limits
Model and design
The sequence must be binary in its original order with fixed counts; ties from converting continuous data require a declared rule outside this tool.
Numerical scope
Inputs use double-precision numerical methods with guarded domains. Datasets accept up to 10,000 finite plain-decimal values. Extremely large parameters or probabilities deep in a numerical tail may require specialist statistical software.
Interpretation
Too few runs suggest clustering and too many suggest alternation, but the test does not identify a mechanism.
Decision boundary
The calculator does not validate how data were collected, diagnose dependence or bias, choose a scientifically meaningful effect, or replace review by a qualified statistician for consequential research, medical, regulatory, safety, or policy decisions.
Privacy
Entered values and calculated results stay in this browser and are not sent to an analytics service.
Continue calculating
Related calculators