Other than going to the raw math, anyone figure out how to obtain Kertosis and Skewness measures of a univariate distribution? Macro?
Easiest and quickest way I can think of is to use Python:
First get packages:
from ayx import PackagePackage.installPackages(['pandas','scipy'])
Next:
from ayx import Alteryximport scipy.statsimport pandas as pda = Alteryx.read('#1')kurt = scipy.stats.kurtosis(a['Field1'])skew = scipy.stats.skew(a['Field1'])d = {'kurt': [kurt], 'skew': [skew]}df = pd.DataFrame(data=d)Alteryx.write(df,1)
Simple workflow using this attached.
Good idea - now to figure out Python. I see a few Python help's in the community so I'll check them out.
Thanks!
Can you help me modify the Python code to pass in another field to subgroup by when doing the kurtosis and skew calculations? Output would be 1 row per subgroup_value, with 3 fields in each row: subgroup_value, kurtosis, skew.
Super - worked flawlessly! Thanks!