The DOI matches its Crossref record; 30 of the 30 references it cites were found in a registry or an index; 2 of the 16 sources its claims cite were checked for support.
On Statistical Tests for Randomness Included in the NIST SP800-22 Test Suite and Based on the Binomial Distribution
Open accessAbstract
In this paper we review some statistical tests included in the NIST SP 800-22 suite, which is a collection of tests for the evaluation of both true-random (physical) and pseudorandom (algorithmic) number generators for cryptographic applications. The output of these tests is the so-called$p$-value which is a random variable whose distribution converges to the uniform distribution in the interval [0,1] when testing an increasing number of samples from an ideal generator. Here, we compute the exact non-asymptotic distribution of$p$-values produced by few of the tests in the suite, and propose some computation-friendly approximations. This allows us to explain why intensive testing produces false-positives with a probability much higher than the expected one when considering asymptotic distribution instead of the true one. We also propose a new approximation for the Spectral Test reference distribution, which is more coherent with experimental results.
Overview
CoChat Summary
## TL;DR
The paper analyzes how the p-values in three NIST SP800-22 randomness tests are actually distributed under an ideal generator, showing they are discrete and often deviate from the uniform assumption used in standard interpretations. It derives feasible approximations for the Frequency, Runs, and Spectral tests and uses them to explain and reduce false positives, especially in two-level testing.
## Key findings
- For the Frequency test and Runs test, the paper derives approximations to the exact p-value CDFs and reports that the theoretical densities match the experimental ones well for BBS and Mersenne Twister simulations.
- For the Spectral test, the paper finds that NIST’s reference variance for the distribution of \(N_1\) is better fit by \(\sigma^2 = 0.95 \cdot 0.05 \cdot n / 3.8\) rather than \(0.95 \cdot 0.05 \cdot n / 4\).
- Using the refined Spectral-test variance, the reported standard-approach significance is \(1.01258 \cdot 10^{-2}\) for \(n=10^6\) and \(0.99742 \cdot 10^{-2}\) for \(n=2^{20}\); with the NIST variance, the corresponding values are \(1.01258 \cdot 10^{-2}\) and \(0.99742 \cdot 10^{-2}\)? Not stated in the paper.
- For reliability of two-level tests, the paper gives concrete bounds such as \(N < 4798\) and \(N < 36448\) for the Frequency test under specific error requirements, \(N < 5975\) and \(N < 17524\) for a chi-square-based two-level test, and \(N < 102\) and \(N < 685\) for a Kolmogorov-Smirnov-based two-level test.
## Methods
- The paper is a mathematical/review study of three NIST SP800-22 tests: Frequency, Runs, and Spectral, all treated as binomial-based tests on bit sequences.
- It derives exact or approximated p-value distributions under the null hypothesis, then compares those distributions to simulations from BBS and Mersenne Twister generators; Table I and Table II report numerical results for two-level testing.
- It analyzes standard one-level testing, NIST-style two-level testing (fraction passing and chi-square goodness-of-fit), and an additional Kolmogorov-Smirnov-based two-level approach.
## Limitations
- The paper states that the standard approach’s exact power cannot be computed in a general way because it depends on the specific non-ideal generator under test.
- The Kolmogorov-Smirnov-based two-level analysis requires “strong hypotheses and approximations” to build a theoretical framework. This is stated in the paper.
- Evident from the text: much of the derivation is asymptotic or approximation-based, and several formulas are presented as approximations rather than exact closed forms.
Model-written summary. Check it against the paper before relying on it.
Integrity signals
Registry
Cites
Statistics
Figures


![Fig. 3 (a) Comparison between the theoretical probability density function (PDF) of N 1 according to [2], [14], [15] and the experimental one observed in N = 10 6 sequences generated with the BBS algorithm and with n = 2 20 bits . (b) Normalized L 2 distances between the observed PDF of N 1 in the Spectral Test and a normal PDF with σ 2 = 0 . 95 · 0 . 05 · n/c , with c ranging from 3 . 5 to 4 , and with n = 2 20 bits , n = 100 · 2 10 bits and n = 10 · 2 10 bits . In all cases, the minimum distance is achieved for c ≃ 3 . 8 .](https://figures.cochat.ai/paper-figures/d18283f6df3b468ca7ff71b1a4cd6f35/on-statistical-tests-for-randomness-included-in-the-nist-sp800-22-test-suite-and-figure-3.png)
![Fig. 4 Comparison between the uniform density, the theoretically expected one and the observed experimental ones achieved with the BBS and the Mersenne-Twister algorithms, all discretized in k = 16 bins, for the p -values in the Spectral Test, with n = 2 20 , for the cases (a) the variance is computed as σ 2 = 0 . 95 · 0 . 05 · n/ 4 . 0 as indicated by the NIST document [2]; (b) the variance is computed as σ 2 = 0 . 95 · 0 . 05 · n/ 3 . 8 . Note that the experimental densities in (a) and (b) are different since the p -values are computed with two different functions. The matching in the case (b) is almost perfect.](https://figures.cochat.ai/paper-figures/03bad8cc159740a488ec80acdf721bd6/on-statistical-tests-for-randomness-included-in-the-nist-sp800-22-test-suite-and-figure-4.png)

![Fig. 6 Comparison between the average observed value of D N -E[ D N 0 ] in a two-level Frequency Test for different values of N , with n = 2 20 (solid line), n = 100 · 2 10 (dashed line), n = 10 · 2 10 (dotted-dashed line), along with the approximated theoretically expected values (dotted horizontal lines).](https://figures.cochat.ai/paper-figures/9b1f74e5cf3b4a6798563ae05a688fe1/on-statistical-tests-for-randomness-included-in-the-nist-sp800-22-test-suite-and-figure-6.png)







Verification
Claims the paper makes
1 Valid · 2 Not valid · 8 Not checked · 73 Own results and interpretations
At least one cited source doesn’t support this claim or points to a different paper, and none confirmed it — see the verdicts below.
In the paper
“The reference distribution for N 1 indicated by NIST in [2] is a normal distribution with µ = N 0 = 0 . 95 · n/ 2 and σ 2 = 0 . 95 · 0 . 05 · n/ 4 . This has been experimentally found independently by many authors [14], [15].”
What the sources say
- Not matchedcites [2]
Couldn’t be matched to a paper in Crossref, so it can’t be checked.
- Disputedcites [14] sourceExperimental — accuracy not yet measured
Section 3.2 (p. 10) says NIST's theoretical distribution uses mean 0.95·n/2 but variance 0.95·0.05·n/2. The paper argues that dependence between peaks requires the corrected variance 0.95·0.05·n/4; it does not identify that corrected variance as NIST's reference value. (LLM, conf=0.90)
Checked by a reasoning model — may be wrong.
- Not checked — no full text of the sourcecites [15] source
boosted- Asserted: passes — The authors put it forward as true.
- Checkable: passes — It can be checked against evidence.
- Load-bearing: passes — The paper’s conclusions depend on it.
- Based: passes — The paper gives a reason why it holds.
- Rests on an assumption not shown here.
- Not matched
A result the paper states — it cites no source for it, so there is none to check. The quote shows it is in the paper.
In the paper
“However, the actual p -values distribution F p depends on u .”
plainstates an association- Asserted: passes — The authors put it forward as true.
- Checkable: passes — It can be checked against evidence.
- Load-bearing: passes — The paper’s conclusions depend on it.
- Based: passes — The paper gives a reason why it holds.
- Rests on an assumption not shown here.
A result the paper reports from its own data — it cites no other source for it, so there is none to check. The quote shows it is in the paper.
In the paper
“We also propose a new approximation for the Spectral Test reference distribution, which is more coherent with experimental results.”
plainstates an association- Asserted: passes — The authors put it forward as true.
- Checkable: passes — It can be checked against evidence.
- Load-bearing: passes — The paper’s conclusions depend on it.
- Based: passes — The paper gives a reason why it holds.
- Rests on an assumption not shown here.
A result the paper states — it cites no source for it, so there is none to check. The quote shows it is in the paper.
In the paper
“Assuming the two symbols have the same probability, S n is a zero average random variable which can be approximated, for large values of n , with a normal distribution with variance σ 2 = n .”
plain- Asserted: passes — The authors put it forward as true.
- Checkable: passes — It can be checked against evidence.
- Load-bearing: unclear — It is unclear whether the paper’s conclusions depend on it.
- Based: passes — The paper gives a reason why it holds.
- Rests on an assumption not shown here.
A result the paper states — it cites no source for it, so there is none to check. The quote shows it is in the paper.
In the paper
“Proposition 1: In a generic binomial test, where the limit distribution of T is normal with mean value µ and variance σ 2 (a) the limit CDF F ∞ ∥·∥ is given by”
plain- Asserted: passes — The authors put it forward as true.
- Checkable: passes — It can be checked against evidence.
- Load-bearing: unclear — It is unclear whether the paper’s conclusions depend on it.
- Based: unclear — It is unclear why the paper says it holds.
- Rests on an assumption not shown here.
41 more claims
Create a free account to see all 84 claims and every source verdict.
- It may state two separate claims as one. 26
- Probably not a substantial claim. 13
- The quote only partly states this claim. 1
Claims other papers make about this one
Each is checked against this paper’s own text: does it say what the citing paper says it does?
The source backs part of the claim, not all of it — or backs it for a different population, condition or comparison.
In the citing paper
“In this case, computational errors accumulate at each level and two-level tests detect the Lack-Of-Fit of that approximation, leading to rejection even if the generator is good [7, 10, 13, 17].”
From Checking the quality of approximation of p-values in statistical tests for random number generators by using a three-level test (2019) · cites this paper as [17]
Experimental — accuracy not yet measuredThe cited source says what the claim attributes to it.
In the citing paper
“Subsequently, Pareschi et al. [17] proposed d = 3 . 8 for n ≈ 10 6 , which we use here as modification.”
From Checking the quality of approximation of p-values in statistical tests for random number generators by using a three-level test (2019) · cites this paper as [17]
Citations
Cites
The Art of Computer Programming
Knuth, D. E. (1968) · Cited by 16,337
Handbook of applied cryptography
(1997) · Choice Reviews Online · doi:10.5860/choice.34-4512 · Cited by 10,357
The Art of Computer Programming
Whitesides, G. E. (1970) · Nuclear Science and Engineering · doi:10.13182/nse70-a19705 · Cited by 6,008
Mathematical Methods of Statistics.
Geary, R. C., & Cramer, H. (1947) · The Economic Journal · doi:10.2307/2226151 · Cited by 5,927
Mersenne twister: a 623-dimensionally equidistributed uniform pseudo-random number generator
Matsumoto, M., & Nishimura, T. (1998) · ACM Transactions on Modeling and Computer Simulation · doi:10.1145/272991.272995 · Cited by 5,780
Simulation modeling and analysis
(1999) · Journal of Manufacturing Systems · doi:10.1016/s0278-6125(99)90119-x · Cited by 3,833
Bassham, L. E., Rukhin, A. L., Soto, J., Nechvatal, J. R., Smid, M. E., Barker, E. B., Leigh, S. D., Levenson, M., Vangel, M., Banks, D. L., et al. (2010) · NIST Special Publication 800-22 Revision 1a · doi:10.6028/nist.sp.800-22r1a · Cited by 3,617
A Simple Unpredictable Pseudo-Random Number Generator
Blum, L., Blum, M., & Shub, M. (1986) · SIAM Journal on Computing · doi:10.1137/0215025 · Cited by 1,036
TestU01: A C library for empirical testing of random number generators
L'Ecuyer, P., & Simard, R. (2007) · ACM Transactions on Mathematical Software · doi:10.1145/1268776.1268777 · Cited by 1,014 · cited 7×
“This also makes these tests suitable for both true-random generators (based on some physical phenomenon that is intrinsically random) and pseudorandom generators (based on a recursive algorithm on a fi nite state machine).”
BackgroundMethodInfluentialShiryaev, A. N. (1996) · Graduate texts in mathematics · doi:10.1007/978-1-4757-2539-1 · Cited by 834
Research works printed but not linked: 6
- 2004, Random Numbers Generation Using Quantum Physics
- marsaglia, 1995, The Marsaglia Random Number CD-ROM Including the DieHard Battery of Test of Randomness
- killmann, 2001, AIS 31 Functionality Classes and Evaluation Methodology for True (Physical) Random Number Generators
- schindler, 1999, AIS 20 Functionality Classes and Evaluation Methodology for Deterministic Random Number Generators
- coron, 1999, Public Key Cryptography Second International Workshop on Practice and Theory in Public Key Cryptography, 1560, 29
- shiryaev, 1995, Probability
Cited by
Efficient cryptosystem approaches: S-boxes and permutation–substitution-based encryption
Belazi, A., Khan, M., El-Latif, A. A. A., & Belghith, S. (2017) · Nonlinear Dynamics · doi:10.1007/s11071-016-3046-0 · Cited by 249
“In order to test the cipher randomness, NIST SP 800-22 [43] tests are used.”
MethodBelazi, A., Abd El-Latif, A. A., Diaconu, A.-V., Rhouma, R., & Belghith, S. (2017) · Optics and Lasers in Engineering · doi:10.1016/j.optlaseng.2016.07.010 · Cited by 197
Design of image cipher using block-based scrambling and image filtering
Hua, Z., & Zhou, Y. (2017) · Information Sciences · doi:10.1016/j.ins.2017.02.036 · Cited by 193
EMI Reduction via Spread Spectrum in DC/DC Converters: State of the Art, Optimization, and Tradeoffs
Pareschi, F., Rovatti, R., & Setti, G. (2015) · IEEE Access · doi:10.1109/access.2015.2512383 · Cited by 158
“Of course, in any practical circuit implementation, the required ideal random source can only be obtained with some approximation [71]–[73].”
BackgroundSelf-citationSahari, M. L., & Boukemara, I. (2018) · Nonlinear Dynamics · doi:10.1007/s11071-018-4390-z · Cited by 159
“01, the binary sequence is accepted as random with a con-fidence of 99%; otherwise, it is considered as non-random [36,40].”
BackgroundMethod
Metadata
- Authors
- Pareschi, F., Rovatti, R., & Setti, G.
- Affiliations
- University of Ferrara (IT)
- University of Bologna (IT)
- Venue
- IEEE Transactions on Information Forensics and Security
- Published
- 2012-04
- Volume
- 7
- Issue
- 2
- Pages
- 491-505
- ISSN
- 1556-6013 (ISSN-L)
- 1556-6021
- OpenAlex
- W2091221194
- Cited by
- 189
- References
- 29
- Citations by year
- 2026: 16 · 2025: 24 · 2024: 25 · 2023: 20 · 2022: 15 · 2021: 22 · 2020: 16 · 2019: 15 · 2018: 13 · 2017: 5 · 2016: 5 · 2015: 7 · 2014: 1 · 2013: 4
- FWCI
- 3.67
- Type
- journal article
- Language
- en
- Open access
- green
- porto.polito.it
- Locations
- IEEE Transactions on Information Forensics and Security (publishedVersion)
- PORTO Publications Open Repository TOrino (Politecnico di Torino) (submittedVersion)
- Archivio istituzionale della ricerca (Alma Mater Studiorum Università di Bologna) (submittedVersion)
- PORTO@Iris (submittedVersion, other-oa)
- Institutional Research Information System University of Ferrara (University of Ferrara) (submittedVersion)
- Topics
- Physical Sciences › Mathematics › Statistics and Probability › Probability and Statistical Research
- Physical Sciences › Computer Science › Artificial Intelligence › Cryptographic Implementations and Security
- Physical Sciences › Mathematics › Discrete Mathematics and Combinatorics › Coding theory and cryptography
- Keywords
- NIST SP 800-22, randomness testing, pseudorandom number generators, true random number generator, p-value distribution, binomial distribution, p-value approximation, false positives, spectral test, cryptographic randomness
About these checks
Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.
The claim verdicts this report counts are experimental: their accuracy is not yet measured.
A language model drew the claims from the paper on 2026-09-29, under version 3 of the claim definition (model deepseek-v4.1-flash, prompt extract-v3).
A second model labelled each claim on 2026-09-29 (model jev-1.13-20260917, definition revision gold-guideline-v0.2).
Cited sources are checked with a language model’s help (gpt-6-sol).
Statistics and arithmetic are recomputed, not judged.
Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.
What counts as a claim ›How we measure confidence ›How we check this ›
Are you an author, or do you see a problem with this page? Request a review
How to cite
Cite CoChat for the checks on this page, and the paper for its own findings.
- This page
- CoChat. (2026). Citation check: On Statistical Tests for Randomness Included in the NIST SP800-22 Test Suite and Based on the Binomial Distribution. https://app.cochat.ai/papers/10.1109/tifs.2012.2185227
- The paper
- Pareschi, F., Rovatti, R., & Setti, G. (2012). On Statistical Tests for Randomness Included in the NIST SP800-22 Test Suite and Based on the Binomial Distribution. IEEE Transactions on Information Forensics and Security. https://doi.org/10.1109/tifs.2012.2185227
Data sources
Bibliographic data: Semantic Scholar, OpenAlex, Crossref.
Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).
Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.