[SciPy-User] empirical CDF

josef.pktd@gmai... josef.pktd@gmai...
Sun Oct 14 11:25:46 CDT 2012


On Sun, Oct 14, 2012 at 12:12 PM, Kevin Gullikson
<kevin.gullikson.signup@gmail.com> wrote:
> Well, it can make a histogram (numpy.histogram), and then you could just sum
> the bins to make a cdf.
>
>
> On Sun, Oct 14, 2012 at 11:03 AM, Degang Wu <samuelandjw@gmail.com> wrote:
>>
>> Hi,
>>
>> Is Scipy able to calculate empirical CDF (calculating a CDF from a
>> sequence of random samples)? I have searched the documentation for quite a
>> while, but have found nothing useful.

depends on what you want to do with it

in the simplest case it's just sorting and (np.arange(len(data)) + 1)
/ (len(data) + 1) or similar

scipy.stats.mstats has plotting positions

statsmodels has a class for it
https://github.com/statsmodels/statsmodels/blob/master/statsmodels/distributions/empirical_distribution.py#L108
which is not in the docs.

but for example qqplot, Probability plots code it directly
http://statsmodels.sourceforge.net/devel/_modules/statsmodels/graphics/gofplots.html#ProbPlot

Josef

>> _______________________________________________
>> SciPy-User mailing list
>> SciPy-User@scipy.org
>> http://mail.scipy.org/mailman/listinfo/scipy-user
>
>
>
> _______________________________________________
> SciPy-User mailing list
> SciPy-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>


More information about the SciPy-User mailing list