I was looking for a good tutorial or examples of using rv_continuous and I could not find it.
I read:
http://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.rv_continuous.html#scipy.stats.rv_continuous
but in fact it was not very useful (and there were no examples of how to use it).
An example of something that I would like to do is to indicate any probability distributions and the ability to call fit , and then just just have the pdf file I wanted, and be able to call expect and get the desired expected value.
Until now, I understand that to create any possible distribution, we need to create our own class for it, and then a subclass of rv_continuous . Then, specifying a custom _pdf or _cdf , we should just use every method that rv_continuous will provide us with. For example, expect and fit should be available.
However, for me, the really mysterious thing is, if we do not say rv_continy explicitly, what parameters determine the probability distribution, can it really use all these methods correctly? How to do this even with _pdf or _cdf?
Or did I just misunderstand how this works?
Also, if you can provide a simple example of how it works and how to use expect and / or fit , that would be great! Or maybe the best tutorial or link, it will be cool.
Thanks at Advance.
python numpy scipy
Pinocchio
source share