[SciPy-user] scipy.stats rv objects from data
Stéfan van der Walt
Mon Apr 28 02:29:20 CDT 2008
2008/4/28 Erik Tollerud <email@example.com>:
> I'm finding the scipy.stats documentation somewhat difficult to
> follow, so maybe the answer to this question is in there... I can't
> really find it, though.
> What I have is a sequence of numbers X_i . Two things I'd like to be
> able to do with this:
> 1. Create a discrete probability distribution (class rv_discrete) from
> this data so as to use the utility functions that take rv_discrete
> The rv_discrete documentation suggests should be easy. I did the following
> >>>ddist=rv_discrete(values=(x,[1/len(x) for i in x]),name='test')
That should be 1.0/len(x), otherwise all the probabilities are 0.
More information about the SciPy-user