Friday, November 22, 2024
Google search engine
HomeLanguagesstatsmodels.medcouple() in Python

statsmodels.medcouple() in Python

With the help of statsmodels.medcouple() method, we can calculate the medcouple robust measure of skew.

Syntax : statsmodels.medcouple(array, axis)
Return : Return the medcouple statistic value.

Example #1 :
In this example we can see that by using statsmodels.medcouple() method, we are able to get the value of medcouple statistic by using this method.




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


Output :

0.2857142857142857

Example #2 :




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


Output :

-0.5555555555555556

Dominic Rubhabha-Wardslaus
Dominic Rubhabha-Wardslaushttp://wardslaus.com
infosec,malicious & dos attacks generator, boot rom exploit philanthropist , wild hacker , game developer,
RELATED ARTICLES

Most Popular

Recent Comments