Detect values in array that are statistically inconsistent I have a list of values:
1542 104 360 209 195 1 50

Applicable to the algorithm I am trying to write, 1542 should be thrown out of my series and therefore not considered in later processing.  This is because the preponderance of the place values of 4 of the numbers.  I keep 1 and 50 because these are not wildly out of range.
My value series may also have a much greater magnitude:
4087 5109 63 5799 4714 4377 8379

And in this case I would throw out 63.  The others fit into my "believable" category again as these are within the same place value.
The data is from an ultrasonic time measurement process.  Glitches do happen and these need to be thrown out or the end result data may spike unnecessarily.  It may be helpful to know that these values are sampled in less than 1 millisecond, and that what is being measured has no chance of changing so fast.  
However I also run the problem that my values may twiddle between two place values:
100 99 102 49 30 1930 14

In this case the preponderance of place value goes to 99, 49, 39, and 14 but 100 and 102 is not that far away and should be included.  1930 is to be excluded.  There's not enough evidence that it's value by the fact this place value occurs only once.
Maybe this is addressed in statistics?  
Is there an equation that can help me here, and/or a mathematics principle I can do more reading about which might help in fashioning a decent algorithm?
 A: Yes, this is addressed in statistics. It lies in the research field which can be called "robust statistics" for estimation, or detection or some further signal processing tasks. There is a vast literature contributed by both mathematicians as well as engineers. The contaminating data which you encountered in your application are called outliers. They dont follow your statistical model. How to attenuate or remove them is not easy in general because you will always have the risk to remove useful data as well. I dont know your mathematical background but you can check this one: http://www.shiae.cuhk.edu.hk/seminar/Zoubir%20DL%20robust%20statistics%202011.pdf
A: I think you shouldn't do this with statistics, but rather with some type of filtering. As you mention in your question, it doesn't make sense if there is a large sudden jump in the value you measure.
Option 1:
If you're looking for a quick fix, my suggestion would be to pick a reasonable threshold, either relative (e.g. 1%) or absolute (e.g. 200) and reject all values in your measurement series that change by more than this threshold when compared to the previous measurement.
Option 2:
This will take a bit more effort, but you can take a (discrete) Fourier transform of your measurement series and apply a low-pass filter to your data. This will remove all the high frequency noise from your dataset, while maintaining the low frequency measurement data.
