Smoothed inference and graphics via LP modeling

Sara Algeri, Xiangyu Zhang

Abstract

Classical tests of goodness-of-fit aim to validate the conformity of a postulated model to the data under study. Given their inferential nature, they can be considered a crucial step in confirmatory data analysis. In their standard formulation, however, they do not allow exploring how the hypothesized model deviates from the truth nor do they provide any insight into how the rejected model could be improved to better fit the data. The main goal of this work is to establish a comprehensive framework for goodness-of-fit which naturally integrates modeling, estimation, inference, and graphics. Modeling and estimation focus on a novel formulation of smooth tests that easily extends to arbitrary distributions, either continuous or discrete. Inference and adequate post-selection adjustments are performed via a specially designed smoothed bootstrap and the results are summarized via an exhaustive graphical tool called CD-plot.

Introduction

In classical statistics, goodness-of-fit (GoF) tests like the Kolmogorov-Smirnov or Pearson’s $\chi^2$ test often function as "black boxes." While they provide a p-value indicating whether a model should be rejected, they offer little diagnostic information. If a model fails, researchers are left wondering where it failed—in the tails, the center, or due to specific outliers. Furthermore, many existing "smooth tests" are mathematically specialized for either continuous or discrete data, making them difficult to apply universally. This paper introduces a unified framework using Linear-Polynomial (LP) modeling to bridge the gap between formal hypothesis testing and exploratory data analysis.

Methodology: The LP Framework

The core of the proposed framework is the representation of the comparison density—the ratio of the true data distribution to the hypothesized model—using a series of orthonormal basis functions known as LP score functions. This approach allows for a universal testing framework applicable to any distribution.

Comparison Density Estimators

The authors evaluate several methods for estimating the comparison density $d_m(u; G, F)$, including formulations by Neyman, Barton, and Gajek. These estimators provide the mathematical foundation for the smooth tests and subsequent visualization.

Table 1: Comparison density estimators for various smooth test formulations.

The CD-plot

A central contribution is the CD-plot (Comparison Density plot). This visualization tool plots the estimated comparison density against its confidence bands. A horizontal line at 1 represents a perfect fit; deviations from this line visually flag specific regions where the hypothesized model over- or under-estimates the data.

Figure 1: Visualization of probability/density estimates and corresponding CD-plots for discrete (left) and continuous (right) distributions.

To ensure robust inference, the authors implement an LP-smoothed Bootstrap for variance estimation and post-selection adjustments. This is supported by a Bidirectional Acceptance Sampling algorithm, which allows simultaneous simulation from both the null and smoothed alternative models, significantly reducing computational costs.

Results and Applications

The framework was validated using both synthetic and real-world datasets:

  1. Synthetic Data: Toy examples involving Binomial vs. Poisson (discrete) and Truncated Normal (continuous) distributions demonstrated the CD-plot's ability to catch specific modeling errors that traditional tests might miss.
  2. COVID-19 Hospitalization Data: Analyzing the time from symptom onset to hospitalization for 572 patients, the authors initially tested a Beta-Negative Binomial (BNB) model. The test rejected the model ($p=0.003$), and the CD-plot identified an "excess of zeros" (immediate hospitalizations). By shifting to a Zero-Inflated Negative Binomial (ZINB) model based on these insights, the new model achieved a $p$-value of 1, with the CD-plot showing a near-perfect fit.

Discussion and Key Insights

The LP framework treats GoF testing as a diagnostic step rather than an endpoint. If a null hypothesis is rejected, the LP coefficients provide the necessary "correction terms" to refine the model. By using mid-distribution functions to construct LP scores, the authors provide a "universal language" for distributions, allowing the same machinery to handle discrete and continuous data seamlessly. While powerful, the framework's reliance on data-driven model selection requires careful management of variability during bootstrapping. Future work aims to extend this univariate approach to regression models, integrating covariates to assess goodness-of-fit in more complex multivariate settings.

Summary updated

Abstract

Classical tests of goodness-of-fit aim to validate the conformity of a postulated model to the data under study. Given their inferential nature, they can be considered a crucial step in confirmatory data analysis. In their standard formulation, however, they do not allow exploring how the hypothesized model deviates from the truth nor do they provide any insight into how the rejected model could be improved to better fit the data. The main goal of this work is to establish a comprehensive framework for goodness-of-fit which naturally integrates modeling, estimation, inference, and graphics. Modeling and estimation focus on a novel formulation of smooth tests that easily extends to arbitrary distributions, either continuous or discrete. Inference and adequate post-selection adjustments are performed via a specially designed smoothed bootstrap and the results are summarized via an exhaustive graphical tool called CD-plot.
BibTeX
@article{algeri2021smoothed,
  author = {Sara Algeri and Xiangyu Zhang},
  title = {{Smoothed inference and graphics via LP modeling}},
  journal = {Journal of Computational and Graphical Statistics},
  year = {2021},
  doi = {10.1080/10618600.2021.1999826},
}
Figure