A random-looking sequence is not the same thing as a sequence generated by a random process. People often expect short records to alternate more evenly than an independent model requires. This article explores runs and patterns using eight hypothetical fair binary observations. Its purpose is statistical literacy, not certification of a generator or prediction of future outcomes.
Define a run before counting it
For this article, a run is a maximal consecutive block of the same symbol. AAABB contains two runs: AAA and BB. The NIST description of runs analysis stresses that a coding and run definition must be specified. Other analyses may use increasing and decreasing values or signs relative to a median, so their counts are not automatically comparable. Record the exact sequence and definition rather than reporting a bare number of streaks. That makes a small calculation reproducible and prevents the interpretation from shifting after a surprising result appears.
Compare equally likely complete sequences
Under eight independent fair binary trials, each specified eight-symbol sequence has probability (1/2)^8=1/256. AAAAAAAA and ABABABAB are therefore equally likely as particular ordered records. The OpenStax independence material provides the multiplication rule underlying that result. Their visual appearance differs, but visual regularity does not change the probability of a specified sequence under this model. This statement concerns individual records; it does not say that all broad categories, such as “contains a long run” and “alternates throughout,” contain the same number of records.
Count runs in four hypothetical records
| Sequence | Number of runs | Longest run |
|---|---|---|
| AAAAAAAA | 1 | 8 |
| ABABABAB | 8 | 1 |
| AABBAABB | 4 | 2 |
| AAABABBB | 4 | 3 |
The last two rows have the same run count but different longest runs. This shows why a statistic must be matched to the question. Counting transitions measures one aspect of arrangement; measuring the longest block captures another. Neither number alone describes every feature of the record. The table is a worked classroom comparison, not sampled output from a named device.
Distinguish a named pattern from a family of patterns
Before observing data, asking for the exact record AAABABBB identifies one of 256 equally likely sequences. After observing a record, selecting whichever feature looks unusual creates a much broader search. You might notice all equal symbols, perfect alternation, symmetry, repeated pairs or an imbalance in the total count. The chance that at least one of many interesting descriptions fits is not the chance of the single description chosen afterward. Define the event category before calculating its probability, and count all records belonging to that category rather than only its most memorable representative.
Account for the number of observation windows
A pattern can be rare in one specified window while appearing somewhere in a long record with many overlapping windows. Those windows are generally dependent because they share observations, so simply multiplying independent probabilities can be wrong. Penn State’s discussion of surprising sample patterns highlights the importance of considering opportunities for an unusual event. State whether the question concerns positions one through eight, any eight consecutive positions, or any subset selected afterward. These are distinct events with different counting problems.
Do not infer a compensating next symbol
If the eight-symbol model is independent with fixed fair probabilities, the ninth symbol remains A with probability one half regardless of the runs already counted. A long block does not require a reversal, and an alternating block does not require continuation. Observing an actual process can motivate checking its assumptions, but that is a separate inference task. Keep the conditional claim narrow: within the specified independent model, history does not alter the next marginal probability. This avoids both a reversal myth and a continuation myth.
Use simulation as an illustration with complete records
A classroom simulation can generate many eight-symbol records and count their runs. Keep the generation rule, number of records and complete output summary. Repeatedly generating until a visually appealing sequence appears and displaying only that sequence introduces selection. A simulation also has sampling variation: a category with a small probability may not appear in a short run. Compare the empirical count with an exact enumeration when the space has only 256 possibilities. Enumeration answers the finite model exactly; simulation shows one collection of samples from it.
Pattern-analysis checklist
- Define symbols, order and run rules.
- State the generating model.
- Separate a specified record from a pattern family.
- Count all relevant opportunities and windows.
- Recognise overlap between windows.
- Avoid choosing the hypothesis after seeing the striking feature.
- Keep next-event claims separate from model checking.
A useful explanatory graphic would show several ordinary records, including both clusters and alternation, rather than labelling one hand-picked sequence as the visual standard for randomness. Real evidence concerns the process and the planned analysis. A short record’s appearance cannot, by itself, prove a mechanism fair, independent, secure or suitable for any consequential use.
Frequently asked questions
Are AAAAAAAA and ABABABAB equally likely?
As specified sequences under eight independent fair binary trials, yes: each has probability 1/256.
Does that make all pattern categories equally likely?
No. Categories can contain different numbers of sequences, and their probabilities depend on those counts.
Can a short sequence prove a generator is random?
No. Its appearance alone does not establish the mechanism, independence or other properties of the generator.
Sources and verification
- Runs test for detecting non-randomness — NIST/SEMATECH e-Handbook — 2026-10-23
- Independent and mutually exclusive events — OpenStax, Rice University — 2026-10-23
- The diversity of samples, STAT 100 — Penn State — 2026-10-23