On Friday, December 13, 2013 11:38:17 AM UTC+13, John D'Errico wrote: > TideMan <email@example.com> wrote in message <firstname.lastname@example.org>... > > > On Friday, December 13, 2013 7:59:28 AM UTC+13, John D'Errico wrote: > > > > "Rajin " <email@example.com> wrote in message <firstname.lastname@example.org>... > > > > > > > > My question is: why fit a curve at all? > > > Why not do numerical integration of the histogram/pdf? > > > > A valid question. One that I cannot answer, since we have > > been given no information about the purposes of this task. > > > > I suppose if one wishes to compute an approximate CDF > > given data, based on a curve fit, one might do as the OP > > has asked. Even then, a valid question is why they are > > doing it this way. Asking for a high degree of accuracy > > from a sampled histogram, then doing it using a 12th > > degree polynomial is just plain silly, IMHO. > > > > I might suggest a simple interpolation. Perhaps piecewise > > linear, or at most pchip which has nice interpolation > > properties for such a problem. Trivial to integrate. Trivial > > to use. > > > > Too often I see someone come along with a problem to > > solve that was given to them by someone above. Knowing > > no better, they try to move heaven and earth to do as they > > were told, regardless of the foolishness of the task. > > > > John
I agree, John. I was also going to mention pchip in preference to splines. In my experience, she seldom gives wild fluctuations between points, whereas splines often do (at least, with the data is use them on).