English

Using Expander Graphs to test whether samples are i.i.d

Statistics Theory 2020-08-05 v1 Combinatorics Statistics Theory

Abstract

The purpose of this note is to point out that the theory of expander graphs leads to an interesting test whether nn real numbers x1,,xnx_1, \dots, x_n could be nn independent samples of a random variable. To any distinct, real numbers x1,,xnx_1, \dots, x_n, we associate a 4-regular graph GG as follows: using π\pi to denote the permutation ordering the elements, xπ(1)<xπ(2)<<xπ(n)x_{\pi(1)} < x_{\pi(2)} < \dots < x_{\pi(n)}, we build a graph on {1,,n}\left\{1, \dots, n\right\} by connecting ii and i+1i+1 (cyclically) and π(i)\pi(i) and π(i+1)\pi(i+1) (cyclically). If the numbers are i.i.d. samples, then a result of Friedman implies that GG is close to Ramanujan. This suggests a test for whether these numbers are i.i.d: compute the second largest (in absolute value) eigenvalue of the adjacency matrix. The larger λ23\lambda - 2\sqrt{3}, the less likely it is for the numbers to be i.i.d. We explain why this is a reasonable test and give many examples.

Keywords

Cite

@article{arxiv.2008.01153,
  title  = {Using Expander Graphs to test whether samples are i.i.d},
  author = {Stefan Steinerberger},
  journal= {arXiv preprint arXiv:2008.01153},
  year   = {2020}
}
R2 v1 2026-06-23T17:36:53.765Z