scipy.stats.kstatvar#
- scipy.stats.kstatvar(data, n=2)[source]#
Return an unbiased estimator of the variance of the k-statistic.
See
kstat
for more details of the k-statistic.- Parameters
- dataarray_like
Input array. Note that n-D input gets flattened.
- nint, {1, 2}, optional
Default is equal to 2.
- Returns
- kstatvarfloat
The nth k-statistic variance.
See also
Notes
The variances of the first few k-statistics are given by:
\[var(k_{1}) = \frac{\kappa^2}{n} var(k_{2}) = \frac{\kappa^4}{n} + \frac{2\kappa^2_{2}}{n - 1} var(k_{3}) = \frac{\kappa^6}{n} + \frac{9 \kappa_2 \kappa_4}{n - 1} + \frac{9 \kappa^2_{3}}{n - 1} + \frac{6 n \kappa^3_{2}}{(n-1) (n-2)} var(k_{4}) = \frac{\kappa^8}{n} + \frac{16 \kappa_2 \kappa_6}{n - 1} + \frac{48 \kappa_{3} \kappa_5}{n - 1} + \frac{34 \kappa^2_{4}}{n-1} + \frac{72 n \kappa^2_{2} \kappa_4}{(n - 1) (n - 2)} + \frac{144 n \kappa_{2} \kappa^2_{3}}{(n - 1) (n - 2)} + \frac{24 (n + 1) n \kappa^4_{2}}{(n - 1) (n - 2) (n - 3)}\]