dimanche 27 décembre 2020

Unbiased skewness and kurtosis of continuous random variables in scipy.stats

As the answer here points out, scipy.stats gives biased estimates of skewnesss and kurtosis, which can only be corrected individually with the bias argument:

  • stats.skew(x, bias=False)
  • stats.kurtosis(x, bias=False)

Instead of the data variable x, how do I also enforce unbiasedness in the continuous random variable generators' attribute stats like norm.stats for the normal distribution, listed at the bottom of the documentation:

  • mean, var, skew, kurt = scipy.stats.norm.stats(loc=0, scale=1, moments=’mvsk’)

where arguments can be Mean(‘m’), variance(‘v’), skew(‘s’), and/or kurtosis(‘k’)




Aucun commentaire:

Enregistrer un commentaire