Calculate the empirical distance variance as described in .
- xarray_like, 1-D or 2-D
If x is 1-D than it is assumed to be a vector of observations of a single random variable. If x is 2-D than the rows should be observations and the columns are treated as the components of a random vector, i.e., each column represents a different component of the random vector x.
The empirical distance variance of x.
Szekely, G.J., Rizzo, M.L., and Bakirov, N.K. (2007) “Measuring and testing dependence by correlation of distances”. Annals of Statistics, Vol. 35 No. 6, pp. 2769-2794.
>>> from statsmodels.stats.dist_dependence_measures import ... distance_variance >>> distance_variance(np.random.random(1000)) 0.21732609190659702
Last update: May 05, 2023