Detecting outliers using standard deviations Following my question here, I am wondering if there are strong views for or against the use of standard deviation to detect outliers (e.g. any datapoint that is more than 2 standard deviation is an outlier).
I know this is dependent on the context of the study, for instance a data point, 48kg, will certainly be an outlier in a study of babies' weight but not in a study of adults' weight.
Outliers are the result of a number of factors such as data entry mistakes. In my case, these processes are robust. 
I guess the question I am asking is: Is using standard deviation a sound method for detecting outliers?
 A: Some outliers are clearly impossible. You mention 48 kg for baby weight. This is clearly an error. That's not a statistical issue, it's a substantive one. There are no 48 kg human babies. Any statistical method will identify such a point. 
Personally, rather than rely on any test (even appropriate ones, as recommended by @Michael) I would graph the data. Showing that a certain data value (or values) are unlikely under some hypothesized distribution does not mean the value is wrong and therefore values shouldn't be automatically deleted just because they are extreme. 
In addition, the rule you propose (2 SD from the mean) is an old one that was used in the days before computers made things easy. If N is 100,000, then you certainly expect quite a few values more than 2 SD from the mean, even if there is a perfect normal distribution.
But what if the distribution is wrong? Suppose, in the population, the variable in question is not normally distributed but has heavier tails than that? 
A: Yes. It is a bad way to "detect" oultiers. For normally distributed data, such a method would call 5% of the perfectly good (yet slightly extreme) observations "outliers". Also when you have a sample of size n and you look for extremely high or low observations to call them outliers, you are really looking at the extreme order statistics. The maximum and minimum of a normally distributed sample is not normally distributed.  So the test should be based on the distribution of the extremes. That is what Grubbs' test and Dixon's ratio test do as I have mention several times before.  Even when you use an appropriate test for outliers an observation should not be rejected just because it is unusually extreme. You should investigate why the extreme observation occurred first.
A: When you ask how many standard deviations from the mean a potential outlier is, don't forget that the outlier itself will raise the SD, and will also affect the value of the mean. If you have N values, the ratio of the distance from the mean divided by the SD can never exceed (N-1)/sqrt(N). This matters the most, of course, with tiny samples. For example, if N=3, no outlier can possibly be more than 1.155*SD from the mean, so it is impossible for any value to ever be more than 2 SDs from the mean. (This assumes, of course, that you are computing the sample SD from the data at hand, and don't have a theoretical reason to know the population SD).
The critical values for Grubbs test were computed to take this into account, and so depend on sample size.
A: I think context is everything. For the example given, yes clearly a 48 kg baby is erroneous, and the use of 2 standard deviations would catch this case. However, there is no reason to think that the use of 2 standard deviations (or any other multiple of SD) is appropriate for other data. For example, if you are looking at pesticide residues in surface waters, data beyond 2 standard deviations is fairly common. These particularly high values are not “outliers”, even if they reside far from the mean, as they are due to rain events, recent pesticide applications, etc. Of course, you can create other “rules of thumb” (why not 1.5 × SD, or 3.1415927 × SD?), but frankly such rules are hard to defend, and their success or failure will change depending on the data you are examining. I think using judgment and logic, despite the subjectivity, is a better method for getting rid of outliers, rather than using an arbitrary rule. In this case, you didn't need a 2 × SD to detect the 48 kg outlier - you were able to reason it out. Isn't that a superior method? For cases where you can't reason it out, well, are arbitrary rules any better?
