What is an efficient method for determining skew / kurtosis of a histogram in python? Given that the histograms are not clogged (unlike the histograms), this question does not make much sense, but what I'm trying to do is to determine the symmetry of the height of the graph compared to the distance (and not by frequency versus bins). In other words, given the value of the heights (y) measured along the distance (x), i.e.
y = [6.18, 10.23, 33.15, 55.25, 84.19, 91.09, 106.6, 105.63, 114.26, 134.24, 137.44, 144.61, 143.14, 150.73, 156.44, 155.71, 145.88, 120.77, 99.81, 85.81, 55.81, 49.81, 37.81, 25.81, 5.81] x = [0.03, 0.08, 0.14, 0.2, 0.25, 0.31, 0.36, 0.42, 0.48, 0.53, 0.59, 0.64, 0.7, 0.76, 0.81, 0.87, 0.92, 0.98, 1.04, 1.09, 1.15, 1.2, 1.26, 1.32, 1.37]
What is the symmetry of the height distribution (y) (asymmetry) and the peak (excess) measured at a distance (x)? Are asymmetries / excesses appropriate measurements to determine the normal distribution of real values? Or does scipy / numpy offer something similar for this type of measurement?
I can get a skew / kurtosis estimate of the height (y) values โโaligned along the distance (x) as follows
freq=list(chain(*[[x_v]*int(round(y_v)) for x_v,y_v in zip(x,y)])) x.extend([x[-1:][0]+x[0]]) #add one extra bin edge hist(freq,bins=x) ylabel("Height Frequency") xlabel("Distance(km) Bins") print "Skewness,","Kurtosis:",stats.describe(freq)[4:] Skewness, Kurtosis: (-0.019354300509997705, -0.7447085398785758)

In this case, the height distribution is symmetrical (skew 0.02) around the average distance and is characterized by a platurktic (-0.74 kurtiza, i.e. wide) distribution.
Given that I multiply each x value by their y height to create a frequency, the size of the list of results can sometimes be very large. I was wondering if there is a better method to solve this problem? I believe that I could always try to normalize the dataset y to a range, possibly 0โ100, without losing too much information about the distortions / excesses of the datasets.