Table of Contents
Fetching ...

A unified framework for multivariate two-sample and k-sample kernel-based quadratic distance goodness-of-fit tests

Marianthi Markatou, Giovanni Saraceno

TL;DR

This work introduces a unified matrix-distance framework for multivariate two-sample and $k$-sample goodness-of-fit tests based on kernel-based quadratic distances (KBQD). By centering kernels with respect to a pooled or weighted reference distribution and formulating a $k\times k$ matrix distance, the authors derive the asymptotic behavior of the test statistics under the null via infinite sums of Wishart variables and provide two concrete statistics (trace and $T_n$) whose two-sample case aligns with the MMD. The paper details numerical aspects, including diffusion kernels with bandwidth $h$, nonparametric centering, and resampling-based critical values (bootstrap, permutation, subsampling), and proposes a grid-search method to select $h$. Through extensive simulations and a real-data penguin example, KBQD demonstrates competitive or superior power to existing methods, particularly for asymmetric, heavy-tailed, and high-dimensional scenarios, and the methods are implemented in QuadratiK for R and Python. Overall, the framework offers a scalable, versatile toolkit for distributional goodness-of-fit in multivariate settings.

Abstract

In the statistical literature, as well as in artificial intelligence and machine learning, measures of discrepancy between two probability distributions are largely used to develop measures of goodness-of-fit. We concentrate on quadratic distances, which depend on a non-negative definite kernel. We propose a unified framework for the study of two-sample and k-sample goodness of fit tests based on the concept of matrix distance. We provide a succinct review of the goodness of fit literature related to the use of distance measures, and specifically to quadratic distances. We show that the quadratic distance kernel-based two-sample test has the same functional form with the maximum mean discrepancy test. We develop tests for the $k$-sample scenario, where the two-sample problem is a special case. We derive their asymptotic distribution under the null hypothesis and discuss computational aspects of the test procedures. We assess their performance, in terms of level and power, via extensive simulations and a real data example. The proposed framework is implemented in the QuadratiK package, available in both R and Python environments.

A unified framework for multivariate two-sample and k-sample kernel-based quadratic distance goodness-of-fit tests

TL;DR

This work introduces a unified matrix-distance framework for multivariate two-sample and -sample goodness-of-fit tests based on kernel-based quadratic distances (KBQD). By centering kernels with respect to a pooled or weighted reference distribution and formulating a matrix distance, the authors derive the asymptotic behavior of the test statistics under the null via infinite sums of Wishart variables and provide two concrete statistics (trace and ) whose two-sample case aligns with the MMD. The paper details numerical aspects, including diffusion kernels with bandwidth , nonparametric centering, and resampling-based critical values (bootstrap, permutation, subsampling), and proposes a grid-search method to select . Through extensive simulations and a real-data penguin example, KBQD demonstrates competitive or superior power to existing methods, particularly for asymmetric, heavy-tailed, and high-dimensional scenarios, and the methods are implemented in QuadratiK for R and Python. Overall, the framework offers a scalable, versatile toolkit for distributional goodness-of-fit in multivariate settings.

Abstract

In the statistical literature, as well as in artificial intelligence and machine learning, measures of discrepancy between two probability distributions are largely used to develop measures of goodness-of-fit. We concentrate on quadratic distances, which depend on a non-negative definite kernel. We propose a unified framework for the study of two-sample and k-sample goodness of fit tests based on the concept of matrix distance. We provide a succinct review of the goodness of fit literature related to the use of distance measures, and specifically to quadratic distances. We show that the quadratic distance kernel-based two-sample test has the same functional form with the maximum mean discrepancy test. We develop tests for the -sample scenario, where the two-sample problem is a special case. We derive their asymptotic distribution under the null hypothesis and discuss computational aspects of the test procedures. We assess their performance, in terms of level and power, via extensive simulations and a real data example. The proposed framework is implemented in the QuadratiK package, available in both R and Python environments.
Paper Structure (17 sections, 6 theorems, 77 equations, 16 figures, 2 tables, 2 algorithms)

This paper contains 17 sections, 6 theorems, 77 equations, 16 figures, 2 tables, 2 algorithms.

Key Result

Proposition 1

Let $F,G$ be two probability distributions and $K(\boldsymbol{x},\boldsymbol{y})$ the kernel matrix given in (eqn:matrix-kernel), with $\boldsymbol{k}^\top(\boldsymbol{x},\boldsymbol{t})$ being a vector of nonnegative definite kernels. Then, the matrix distance $d_K(F,G)$ is symmetric.

Figures (16)

  • Figure 1: Average computational time (seconds) for computing the KBQD test for increasing number of replications $B$ for the bootstrap and subsampling algorithms. One sample is generated from the $d$-dimensional standard normal distribution, while the second sample is generated from the skew-normal distribution $SN_d(\boldsymbol{0},I_d,\boldsymbol{\lambda})$, with $\boldsymbol{\lambda} = \lambda \boldsymbol{1}$ and $\lambda = 0.1$. Similar trends were observed for $\lambda = 0, 0.2, 0.3$. The sample size $n=100, 500, 1000$ and dimension $d=2,6$, are indicated as headers. For the subsampling algorithm we use $b=0.8$. The permutation method exhibits the same computational time as bootstrap, and it is reported in Section S6 of the Supplementary Material.
  • Figure 2: Boxplots of critical values of the KBQD test statistics, $T_n$ and $\mathrm{trace}$, with $h=2.2$, for increasing $B$ with respect to the bootstrap and subsampling algorithms. The two samples are generated from the $d$-dimensional standard normal distribution. The dimension $d$ and sample size $n$ are indicated as headers. The boxplots for the permutation sampling are similar to the bootstrap, and are reported in Section S6 of the Supplementary Material.
  • Figure 3: Level of KBQD tests for increasing $h$ with respect to the bootstrap and subsampling algorithm, for different values of $n$, $N = 1000$ replications, $d=2$. The two samples are generated from the $d$-dimensional standard normal distribution. The dashed line denotes the nominal level $\alpha = 0.05$.
  • Figure 4: Power of KBQD tests for increasing $h$ with respect to the bootstrap, permutation and subsampling algorithm. One sample is generated from the $d$-dimensional standard normal distribution, while the second sample is generated from the skew-normal distribution $SN_d(\boldsymbol{0},I_d,\boldsymbol{\lambda})$, with $\boldsymbol{\lambda} = 0.3$, for $n=100, 500$, $N = 1000$ replications and $d=6$. The dashed line denotes the nominal level $\alpha = 0.05$.
  • Figure 5: Level of KBQD tests for increasing $h$ with respect to the bootstrap, permutation and subsampling algorithm. The two samples are generated from the $d$-dimensional standard normal distribution, for $n=500, 1000$, $d=2,6$ and $N = 10000$ replications. The dashed line denotes the nominal level $\alpha = 0.05$.
  • ...and 11 more figures

Theorems & Definitions (15)

  • Definition 1
  • Proposition 1
  • proof
  • Example 1: $\mathbf{k=3}$
  • Proposition 2
  • proof
  • Proposition 3
  • proof
  • Example 2: k=3 -- Continued
  • Proposition 4
  • ...and 5 more