Does anyone know how to plot a skew normal distribution with scipy? I supose that stats.norm class can be used but I just can't figure out how. Furthermore, how can I estimate the parameters describing the skew normal distribution of a unidimensional dataset?
相关问题
- how to define constructor for Python's new Nam
- streaming md5sum of contents of a large remote tar
- How to get the background from multiple images by
- Evil ctypes hack in python
- Correctly parse PDF paragraphs with Python
From the Wikipedia description,
If you want to find the scale, location, and shape parameters from a dataset use
scipy.optimize.leastsq
, for example usinge=1.0
,w=2.0
anda=1.0
,should give you something like,
The accepted answer is more or less outdated, because a
skewnorm
function is now implemented in scipy. So the code can be written a lot shorter: