|
From: <pl...@pi...> - 2007-10-25 00:44:57
|
On Wed, 24 Oct 2007 19:20:12 +0200, Ethan Merritt <merritt@u.washington.edu> wrote: > On Wednesday 24 October 2007 05:45, pl...@pi... wrote: >> >> if you want to post that as an example it should probably by plotting >> against ($1+old_x)/2 to prevent a shift in the position of the >> derivative. >> >> BTW the running mean example also suffers from this defect as is clearly >> seen in the plot that Ethan linked to. The running mean is offset 2.5 >> data >> points to the right. > > The running mean example is correct for the typical use case. > Have a look in your local paper for the stock price reports, > or the weather summaries, etc. > > In calculating a running average you typically do not known the value of > future points, only of the points measured to date. > So you necessarily average over the previous 5 points, as stated in the > plot title. > > This is not the same as for local approximation of the derivative. > Yes the title does clearly state what is shown. I did not say it was incorrect, I said it was a defect. Hand-wavy discussions about some "typical usage" are not much help in science and I certainly would not look to my local paper for an reference on the correct way to process data. I posted that comment since it is a common pitfall in calculating a running mean which also applied to the derviative code snip. Please dont take it the wrong way. ;) |