Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I wish to average detections coming in over time.

I use the interquartile range to identify outliers and to discard them. I look at the last 30 values.

What do I do if each new value is an outlier, and hence is discarded? How do I detect that the average has significantly shifted?

I asked a fuller version of this question on

share|cite|improve this question
up vote 1 down vote accepted

I'd suggest using a t-test, or similar suitable test depending on your particular distribution. These tests can be used as indicators of whether 2 distributions have the "same" mean. Treating a pair of your measurement sets from different times (say 30 values apart so there's no overlap) as though they come from different distributions will give you a measure of whether the means are significantly different, hence the average has "changed". If your data is fairly Normal, this should work. If not, you might try reviewing the t-test wikipedia page. There are some suggestions there of non-parametric techniques to apply in other cases. Those should get you started.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.