I have several sensor type:

  1. Sound (Range: 0 - 20)
  2. Light (Range: 0 - 600)
  3. Temperature

Both sound and light sensors have an expected range for their values. Temperature sensors are expected to stay pretty constant for the most part. I am trying to figure out the best way to detect outlier values for these sensor types. Currently I am looking at using a normal distribution of a rolling window over the past several hours.

I believe this will work fine for temperature sensors. However, with a sound sensor, sound may not always be present. It may suddenly be present after a day of no actual sound. The same thing with light.

Do I just accept large jumps in values as 'normal'? If no sound exists, and there is a jump then how could that be detected?

I am running into a bit of a brick wall, and would appreciate any suggestions you may have.


Perhaps you are looking for something like change detection. Do look into the CUSUM method specifically. It can be applied on your rolling window.

What you are looking to do is establish a pattern that is acceptable as being NOT an outlier. If using the CUSUM algorithm, you can produce a cumulative sum of all values within each rolling window of observations. You then have to set a threshold. In your case, you can set 2 thresholds, for example, mean +- standard deviation (upper and lower bound) of all observations made so far. When a new window exceeds these thresholds, you have your outlier. If you want to make this sensitive towards the new values rather than the entire window, you can assign weights to the values.

It would be easiest if you kept constant the number of observations within each window rather than time interval of the window, but you could make adjustments for either implementation.

  • $\begingroup$ This is a little bit brief for an answer by our standards, do you think you could extend it - perhaps by adding a couple of sentences that summarise that link? $\endgroup$ – Silverfish Mar 4 '16 at 20:19
  • $\begingroup$ @Silverfish, done. This edit looks better? $\endgroup$ – Rahul Murmuria Mar 4 '16 at 20:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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