runs¶
-
coinflip.randtests.runs.
runs
(series, candidate)[source]¶ Actual number of runs is compared to expected result
The number of runs (uninterrupted sequence of the same value) is found, and referenced to a hypothetically truly random RNG.
Parameters: - sequence (array-like) – Output of the RNG being tested
- candidate (Value present in given sequence) – The value which is counted in each block
Returns: TestResult – Dataclass that contains the test’s statistic and p-value
-
coinflip.randtests.runs.
longest_runs
(series, candidate)[source]¶ Longest runs per block is compared to expected result
The longest number of runs (uninterrupted sequence of the same value) per block is found, and referenced to a hypothetically truly random RNG.
Parameters: - sequence (array-like) – Output of the RNG being tested
- candidate (Value present in given sequence) – The value which is counted in each block
Returns: TestResult – Dataclass that contains the test’s statistic and p-value