In [6]:
import numpy as np
import matplotlib.pyplot as plt

values = np.random.normal(0, 1.0, 100000)

plt.hist(values, 50)
plt.show()


Calculate the mean, variance, skew and kurtosis of a distribution.


In [7]:
np.mean(values)


Out[7]:
0.0015159083534063444

In [8]:
np.var(values)


Out[8]:
0.9925178213867264

In [9]:
import scipy.stats as sp
sp.skew(values)


Out[9]:
-0.0027389027509418414

In [10]:
sp.kurtosis(values)


Out[10]:
-0.025480576885773765

In [ ]: