- hyppo.tools.chi2_approx(calc_stat, x, y)¶
Fast chi-squared approximation for the p-value.
In the case of distance and kernel methods, Dcorr (and by extension Hsic 1) can be approximated via a chi-squared distribution 2. This approximation is also applicable for the nonparametric MANOVA via independence testing method in our package 3.
callable) -- The method used to calculate the test statistic (must use hyppo API).
float) -- Input data matrices.
ymust have the same number of samples. That is, the shapes must be
(n, q)where n is the number of samples and p and q are the number of dimensions. Alternatively,
ycan be distance or similarity matrices, where the shapes must both be
Cencheng Shen and Joshua T. Vogelstein. The exact equivalence of distance and kernel methods in hypothesis testing. AStA Advances in Statistical Analysis, September 2020. doi:10.1007/s10182-020-00378-1.
Cencheng Shen, Sambit Panda, and Joshua T. Vogelstein. The Chi-Square Test of Distance Correlation. Journal of Computational and Graphical Statistics, 0(ja):1–21, June 2021. doi:10.1080/10618600.2021.1938585.
Sambit Panda, Cencheng Shen, Ronan Perry, Jelle Zorn, Antoine Lutz, Carey E. Priebe, and Joshua T. Vogelstein. Nonpar MANOVA via Independence Testing. arXiv:1910.08883 [cs, stat], April 2021. arXiv:1910.08883.