Search arXivSearch

arXiv · 1912.10602

Study on upper limit of sample sizes for a two-level test in NIST SP800-22

Abstract

NIST SP800-22 is one of the most widely used statistical testing tools for pseudorandom number generators (PRNGs). This tool consists of 15 tests (one-level tests) and two additional tests (two-level tests). Each one-level test provides one or more $p$-values. The two-level tests measure the uniformity of the obtained $p$-values for a fixed one-level test. One of the two-level tests categorizes the $p$-values into ten intervals of equal length, and apply a chi-squared goodness-of-fit test. This two-level test is often more powerful than one-level tests, but sometimes it rejects even good PRNGs when the sample size at the second level is too large, since it detects approximation errors in the computation of $p$-values. In this paper, we propose a practical upper limit of the sample size in this two-level test, for each of six tests appeared in SP800-22. These upper limits are derived by the chi-squared discrepancy between the distribution of the approximated $p$-values and the uniform distribution $U(0, 1)$. We also computed a "risky" sample size at the second level for each one-level test. Our experiments show that the two-level test with the proposed upper limit gives appropriate results, while using the risky size often rejects even good PRNGs. We also propose another improvement: to use the exact probability for the ten categories in the computation of goodness-of-fit at the two-level test. This allows us to increase the sample size at the second level, and would make the test more sensitive than the NIST's recommending usage.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Hiroshi Haramoto. 2020-07-10. Study on upper limit of sample sizes for a two-level test in NIST SP800-22. https://arxiv.org/abs/1912.10602

Cite the original work for its findings. Save a collection to share your selection of sources.

KEEP EXPLORING

Related papers

Efficient and scalable clustering of survival curves

Survival analysis encompasses a broad range of methods for analyzing time-to-event data, with one key objective being the comparison of survival curves across groups. Traditional approaches for identifying clusters of survival curves often rely on computationally intensive bootstrap techniques to approximate the null hypothesis distribution. While effective, these methods impose significant computational burdens. In this work, we propose a novel approach that leverages the k-means and log-rank test to efficiently identify and cluster survival curves. Our method eliminates the need for computationally expensive resampling, significantly reducing processing time while maintaining statistical reliability. By systematically evaluating survival curves and determining optimal clusters, the proposed method ensures a practical and scalable alternative for large-scale survival data analysis. Through simulation studies, we demonstrate that our approach achieves results comparable to existing bootstrap-based clustering methods while dramatically improving computational efficiency. These findings suggest that the log-rank-based clustering procedure offers a viable and time-efficient solution for researchers working with multiple survival curves in medical and epidemiological studies.

stat.ME

Bayesian Modular Inference for Copula Models with Potentially Misspecified Marginals

Copula models of multivariate data are popular because they allow separate specification of marginal distributions and the copula function. These components can be treated as inter-related modules in a modified Bayesian inference approach called ''cutting feedback'' that is robust to their misspecification. Recent work uses a two module approach, where all $d$ marginals form a single module, to robustify inference for the marginals against copula function misspecification, or vice versa. However, marginals can exhibit differing levels of misspecification, making it attractive to assign each its own module with an individual influence parameter controlling its contribution to a joint semi-modular inference (SMI) posterior. This generalizes existing two module SMI methods, which interpolate between cut and conventional posteriors using a single influence parameter. We develop a novel copula SMI method and select the influence parameters using Bayesian optimization. It provides an efficient continuous relaxation of the discrete optimization problem over $2^d$ cut/uncut configurations. We establish theoretical properties of the resulting semi-modular posterior and demonstrate the approach on simulated and real data. The real data application uses a skew-normal copula model of asymmetric dependence between equity volatility and bond yields, where robustifying copula estimation against marginal misspecification is strongly motivated.

stat.ME

On Asymptotic Outlier Rejection in Bayesian Mixed Poisson Regression Models Under Extreme Target and Covariate Values

Bayesian models are defined to be fully robust against outliers if observations infinitely far from the other data do not influence the posterior. In regression models, this entails a need to consider outliers in both target and covariate values. While in linear regression these cases are interchangeable, as both lead to anomalously large residuals, this symmetry does not apply to generalized linear models. Importantly, Hamura et al. (2025, arXiv:2106.10503) presented sufficient conditions for mixed Poisson count regression models to be robust against infinitely large target values and proposed a mixed Poisson-Rescaled Beta model fulfilling these conditions. We continue from their work and study the robustness properties of mixed Poisson regression models with Gaussian latent variables in the presence of outliers in covariates. We show that in count regression the symmetry between covariate and target outliers breaks: mixed Poisson models are not robust to outlier covariates even if they were robust to target outliers. Furthermore, we show that, as a covariate gets infinitely large, the corresponding regression coefficient posterior collapses to a point-mass distribution concentrated around zero. We hence introduce a novel robustified mixed Poisson model which we denote as $x$-outlier rejective ($x$-OR) mixed Poisson, and demonstrate its theoretical and practical ability to accommodate outliers in the covariates. We investigate robustness properties of alternative ($x$-OR) mixed Poisson models in the presence of moderate outliers with simulations and a real world case study and show that the $x$-OR log-$t$ and Rescaled Beta mixed Poisson models reject both types of outliers, leading to improved inference.

stat.ME