Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
HOW TO REJECT BAD DATA????
Message
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00019169
Message ID:
00019217
Views:
34
>Say I have a set of data that is the price of a home.
>
>100,000
>125,000
>92,000
>175,000
>135,000
>10,000
>500,000
>
>Well, I know that the 10,000 fiqure is really just for a lot. So when figuring trends, I need to throw it out. I also know that the 500,000 fiqure is also way off, so it too needs to be thrown out.
>
>If each of these numbers were in a field in a dbf(one per record) How could I programmatically throw out numbers that were way off? I have tried diffrent forms of average and standard deviation, but nothing seems quite right. I need some high school algebra or statistics lessons I think.

What your describing in statistical lingo is called throwing out the outliers. Most people use a figure of 2 standard deviations off the mean to give you a range for outliers (this removes anything about 90% or more off the mean) Some also choose 3 std dev which is about 95%.

To do this in vfp use the calculate command with the std dev option to calculate the std dev for the field and the mean function to calculate the mean of the field. Then do a scan which will delete (or however you want to remove data) records that are above (2*std dev)+mean or below mean-(2*std dev).

HTH
Todd Burstain, MD
infinitydoc@delphi.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform