Rhys A.D. Stewart wrote:
Hey all, I have the following table: data(pnum text, distance float8, route text). I would like to remove the outliers in distance, i.e. lets say i get the avg dist of pnum for each route and the std deviation of the distance what is the best way to identify the outliers?
i dunno. brute force, two passes, one to identify the MIN and MAX of the values, then another SELECT avg(value) .... WHERE (....) AND val != minval AND val != maxval.
you could probably do something with a standard deviation that is more accurate for large sets than just tossing the 2 outliers.
-- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general