From: Aslak Grinsted on
"Aslak Grinsted" <rek(a)phunck.com> wrote in message <hnvm0g$scn$1(a)fred.mathworks.com>...
>
> Both ecdf and prctile uses the rank of a sample (m) within a set of length (N) to estimate the empirical cumulative distribution (C).
>
> Makkonen (and references therein) show that the expectation value for C(x) = m/(N+1). However, this is not what prctile and ecdf uses. This results in large errors in estimated return periods from these functions.

I've submitted this as a bug to mathworks.
From: Oleg Komarov on
"Aslak Grinsted" <rek(a)phunck.com> wrote in message <ho01jr$95t$1(a)fred.mathworks.com>...
> "Aslak Grinsted" <rek(a)phunck.com> wrote in message <hnvm0g$scn$1(a)fred.mathworks.com>...
> >
> > Both ecdf and prctile uses the rank of a sample (m) within a set of length (N) to estimate the empirical cumulative distribution (C).
> >
> > Makkonen (and references therein) show that the expectation value for C(x) = m/(N+1). However, this is not what prctile and ecdf uses. This results in large errors in estimated return periods from these functions.
>
> I've submitted this as a bug to mathworks.

Please keep us posted.

Oleg