[SciPy-User] cdf
Marian Jakubik
mjakubik at ta3.sk
Wed Feb 16 03:18:43 EST 2011
Hi Robert,
thank you very much. Now I see that it is simple, but ...
Best,
Marian
Dňa Tue, 15 Feb 2011 09:34:46 -0600
Robert Kern <robert.kern at gmail.com> napísal:
> On Tue, Feb 15, 2011 at 07:41, Marian Jakubik <mjakubik at ta3.sk> wrote:
> > Hi All,
> >
> > i would like to create cumulative distribution function (CDF) from the
> > array of data. I attempted to solve this using stats.rv_discrete.cdf()
> > - see attached script.
>
> import numpy as np
> from scipy import stats
>
> qarr = np.array([...])
> qarr.sort()
> ranks = stats.rankdata(qarr)
> ecdf = ranks / (len(qarr) + 1)
>
>
> There are a whole variety of conventions for normalizing those ranks.
> You can see them here:
>
> http://old.nabble.com/Re:-how-to-plot-the-empirical-cdf-of-an-array--p29117695.html
>
More information about the SciPy-User
mailing list