[Paper Review] Testing Consistency of Two Histograms
This paper evaluates multiple statistical tests for assessing whether two histograms are consistent with being drawn from the same underlying distribution. It compares chi-square, likelihood ratio, Kolmogorov-Smirnov, Cramér-von Mises, Anderson-Darling, and two-sample BDM tests using Monte Carlo simulations, finding no single test universally superior; the chi-square and likelihood ratio tests perform best for detecting local shape differences, while tests based on cumulative distributions (KS, CVM, AD) are ineffective for oscillatory alternatives.
Several approaches to testing the hypothesis that two histograms are drawn from the same distribution are investigated. We note that single-sample continuous distribution tests may be adapted to this two-sample grouped data situation. The difficulty of not having a fully-specified null hypothesis is an important consideration in the general case, and care is required in estimating probabilities with ``toy'' Monte Carlo simulations. The performance of several common tests is compared; no single test performs best in all situations.
Motivation & Objective
- To evaluate the performance of various two-sample goodness-of-fit tests in determining whether two histograms are drawn from the same distribution.
- To assess the reliability of Monte Carlo simulations when the null hypothesis is not fully specified.
- To identify which test statistics are most powerful for detecting deviations in histogram shape under different alternative distributions.
- To provide guidance on test selection based on the expected nature of deviations (e.g., local vs. global, oscillatory vs. monotonic).
Proposed method
- Adapts single-sample continuous distribution tests (e.g., chi-square, Kolmogorov-Smirnov, Anderson-Darling) to two-sample grouped data (histogram) scenarios.
- Uses Monte Carlo simulations with 'toy' data to estimate Type I and Type II error rates under various alternative distributions.
- Employs the chi-square test statistic $ T = \sum_{i=1}^{k} \frac{(u_i - v_i)^2}{\sigma_i^2} $, where $ \sigma_i^2 = \mu_i + \nu_i $, under the null hypothesis of equal means.
- Applies the likelihood ratio test via $ \ln \lambda = \sum_{i=1}^{k} \left[ (u_i + v_i) \ln \left( \frac{u_i + v_i}{2} \right) - u_i \ln u_i - v_i \ln v_i \right] $.
- Evaluates the power of each test by simulating data under known alternatives, such as sawtooth patterns with varying amplitudes.
- Uses the R statistical package for all computations and simulation-based p-value estimation.
Experimental results
Research questions
- RQ1Which statistical test exhibits the highest power for detecting differences in histogram shape when the true distributions differ locally?
- RQ2How do tests based on cumulative distribution functions (e.g., KS, CVM, AD) perform when the alternative distribution features local oscillations?
- RQ3What are the implications of using Monte Carlo simulations with an incompletely specified null hypothesis in two-sample histogram testing?
- RQ4Under what conditions does the likelihood ratio test outperform other tests in detecting histogram inconsistencies?
- RQ5Is there a universally optimal test for comparing two histograms, or does performance depend on the nature of the expected deviation?
Key findings
- The chi-square and likelihood ratio tests demonstrated the highest power (47.8% and 49.6% respectively) in detecting a 50% sawtooth oscillation on a one-count-per-bin background.
- Tests based on cumulative distributions—KS, CVM, and AD—performed poorly, rejecting the null hypothesis with only 1.0% to 1.2% probability under the same alternative, equivalent to random sampling from the null.
- The BDM test showed moderate power (33.6% for 50% sawtooth), outperforming KS, CVM, and AD but underperforming chi-square and likelihood ratio tests.
- The $ \ln \mathbf{L} $ test, often considered controversial, showed low power (10.0% for 50% sawtooth), performing no better than other tests in this context.
- No single test consistently outperformed others across all alternatives; performance depended heavily on the nature of the deviation (e.g., local vs. global, oscillatory vs. monotonic).
- Simulations must be carefully validated, especially when the null hypothesis is not fully specified, as naive Monte Carlo approaches can yield misleading Type I error rates.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.