Related Articles

# statsmodels.robust_skewness() in python

• Last Updated : 22 Apr, 2020

With the help of `statsmodels.robust_skewness()` method, we can calculate the four skewness measures in Kim & White.

Syntax : `statsmodels.robust_skewness(array, axis)`
Return : Return the four skewness measures value.

Example #1 :
In this example we can see that by using `statsmodels.robust_skewness()` method, we are able to get the value of the four skewness measure by using this method.

 `# import numpy and statsmodels``import` `numpy as np``from` `statsmodels.stats.stattools ``import` `robust_skewness``  ` `g ``=` `np.array([``1``, ``2``, ``3``, ``4``, ``7``, ``8``])``# Using statsmodels.robust_skewness() method``gfg ``=` `medcouple(g)``  ` `print``(gfg)`

Output :

0.2857142857142857

Example #2 :

 `# import numpy and statsmodels``import` `numpy as np``from` `statsmodels.stats.stattools ``import` `robust_skewness``  ` `g ``=` `np.array([``1``, ``2``, ``8``, ``9``, ``10``])``# Using statsmodels.robust_skewness() method``gfg ``=` `medcouple(g)``  ` `print``(gfg)`

Output :

-0.5555555555555556

Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.

To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course. And to begin with your Machine Learning Journey, join the Machine Learning – Basic Level Course

My Personal Notes arrow_drop_up