# Greater than 2 standard deviations from mean for sample size 3?

For a project where I'm compiling scientific data, I'm using a criteria that we exclude any replicate data point that is greater than two standard deviations from the mean. All of the data has triplicate measurements, so each sample size is 3, and I noticed that none of the data has been excluded so far.I tested a wide range of values with this test in Excel, and I can't find a combination of values that results in a point being excluded.

My question is whether it is even possible for a data point to be excluded under this criteria?

• Close-voters: I fail to see what is unclear about this question. It's straightforward. "Given any $x, y, z$, is it possible for one of the three data points to be more than two standard deviations away from the mean?" Oct 17, 2017 at 14:55
• Your question is invariant under translation and scaling, so you can assume without loss of generality that your data are $0<1<y$. You can try expressing the mean $m$ and sd $s$ as a function of $y$ and proving that you always have $m-2s<0$ and $y<m+2s$. I think that's a straightfoward calculus exercise. Oct 17, 2017 at 15:05
• It's a mathematical fact that the largest any such deviation can be is $\sqrt{4/3}\approx 1.16$. That begs the more important issues concerning how well any such screening procedure will perform: in many cases it's more likely to throw out good data than bad and can bias the results.
– whuber
Oct 17, 2017 at 16:14

No, it is not possible to exclude any data under this criterion with $n=3.$ Samuelson's inequality is $$\bar{x} - \left( \frac{n-1}{\sqrt{n}}\right) s \le x_{i} \le \bar{x} + \left( \frac{n-1}{\sqrt{n}}\right) s$$

Using $n=3,$ you will never see a data point more than ${2 \over {\sqrt{3}} }\approx 1.1547$ standard deviations away from the mean, as whuber commented.

Note that $s$ is calculated using $n-1$ in the denominator for the above inequality.

I am not sure I can answer this rigorously, but I think you are right.

First of all, remember that one degree of freedom gets used up in calculating the mean. Suppose it is temperature you are measuring, and the 'true' temperature is zero. When you add the three data points and divide by 3, the number you get won't be zero - it will be the sample mean, which is an estimator of it.

Now, one thing to note is that if there is an outlier in the data, it pulls the sample mean toward it. Let's try a numerical example: suppose you measure values of 0, -2, and 20. Right away, your estimated value is nowhere near zero - it ends up being 6.

If you ever wondered why the calculation for variance gets divided by $n-1$ instead of $n$, it is because of this: since the centering value for calculating deviations is already skewed, it turns out dividing by n would underestimate, on average, the true variance: you would have a biased estimator. The sample mean is always closer to any outlier than the real mean, making it look like less of an outlier.

But back to our example, if you now subtract each point from the mean, square them, and add, the sum of squares is:

$(0-6)^2+(-2-6)^2+(20-6)^2 = 6^2+8^2+14^2 = 36+64+196 = 296$

now you divide that by 2 because n=3 (per the reasoning above)and $\sigma^2=148$, so $\sigma \approx 12$ or so.

As you can see, if the mean is 6 and the standard deviation is 12, the outlier at 20 is just a bit beyond one standard deviation away (which is at 12+6=18) and well within the 2-sigma bound (which is at 6+24=30).

With two data points this really obvious: imagine measuring 0 and 10. The mean is 5, and both points lie 5 away from the mean. so the sum of squared deviations is 50, the standard deviation is a little more than 7 (remember, $n-1$ is the divisor), and all points lie inside one standard deviation. Here it is pretty obvious why.

I think with three data points this is also inescapable, but would need to think how to show it rigorously.

And, by the way, you would really need to use t-tests as well to do this right. (As an interesting historical note, Student, the pen name used by the fellow who developed the t-distribution, was an employee of the Guinness brewery who was trying to make statistical claims with small amounts of data - sometimes as few as 3 or 4 data points, as I recall.)

• How exactly would one employ t-tests to screen replicate data??
– whuber
Oct 17, 2017 at 16:15
• As I said, I am not sure - as you weren't - that this makes sense to do with three data points at all. But, even if you had 10, and might do this, I was just making a note that you need to use t-tests and not assume that your smaple data is normally distributed. Oct 18, 2017 at 1:57
• Okay, how would you use t-tests to screen datasets of ten points or thirty points or whatever? Their applicability isn't at all evident. I can imagine leave-k-out methods modeled after standard outlier detection tests, but it looks a bit misleading to characterize that approach as "using t-tests." And if the data depart enough from Normality to make you question their distribution, then why would t-tests be applicable in the first place?
– whuber
Oct 18, 2017 at 13:39