« Return to Thread: Std Dev - Finding Incorrect Entries

Std Dev - Finding Incorrect Entries

by Grant Slater-2 :: Rate this Message:

Reply to Author | View in Thread

npemap,

I have compiled a list of entries which vary greatly from their
outbound's standard deviation: (worst entries at the top)

http://code.firefishy.com/files/bad-postcodes.csv

I am no statistician. Please correct me if I am off the mark.

/ Grant

------------------------
SQL:

SELECT `postcodes`.`outward`, `postcodes`.`inward`, `postcodes`.`lat`,
`postcodes`.`long`,`outbound_stats`.*,
abs(`postcodes`.`lat`-`outbound_stats`.`lat_avg`) AS `lat_offset`,
abs(`postcodes`.`long`-`outbound_stats`.`long_avg`) AS `long_offset`
FROM `postcodes` LEFT JOIN `outbound_stats` ON `postcodes`.`outward` =
`outbound_stats`.`outward` WHERE `outbound_stats`.`number` >= 10 AND (
(abs(`postcodes`.`lat`-`outbound_stats`.`lat_avg`) +
abs(`postcodes`.`long`-`outbound_stats`.`long_avg`)) >
(`outbound_stats`.`lat_stddev`*3 + `outbound_stats`.`long_stddev`*3 ))
ORDER BY (`lat_offset`+`lat_offset`) DESC


_______________________________________________
npemap-talk mailing list
npemap-talk@...
http://urchin.earth.li/mailman/listinfo/npemap-talk

 « Return to Thread: Std Dev - Finding Incorrect Entries