frequency

coinflip.randtests.frequency.monobit(series)[source]

Proportion of values is compared to expected 1:1 ratio

The difference between the frequency of the two values is found, and referenced to a hypothetically truly random RNG.

Parameters:sequence (array-like) – Output of the RNG being tested
Returns:MonobitTestResult – Dataclass that contains the test’s statistic and p-value as well as other relevant information gathered.
coinflip.randtests.frequency.frequency_within_block(series, candidate, blocksize=8)[source]

Proportion of values per block is compared to expected 1:1 ratio

The difference between the frequency of the two values in each 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
  • blocksize (int) – Size of the blocks that partition the given series
Returns:

FrequencyWithinBlockTestResult – Dataclass that contains the test’s statistic and p-value as well as other relevant information gathered.