[time-nuts] Discarding outliers in two dimensions

Poul-Henning Kamp phk at phk.freebsd.dk
Wed Dec 9 14:02:20 UTC 2009


In message <20091209105308.17C67BCFE at ip-64-139-1-69.sjc.megapath.net>, Hal Murr
ay writes:

>For one dimension, you sort, compute the average, then compute the distance 
>of the first and last samples from the average.  Discard the one that is 
>farther from the average.

You want to use the median rather than the average, even if it involves
sorting your samples.  

>The problem with two dimensions is I don't know how to sort.

If the two noise-sources are orthogonal, you just do it on each
axis independently and alternately.

If they are not, things get more complicated.

In general I can highly recommend www.nr.com for stuff like this.

Poul-Henning

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.




More information about the Time-nuts_lists.febo.com mailing list