I have two devices that both send data (let's say temperature). I need to be able to detect if one of the devices reports an unusual/anomalous reading. The case if both of the devices report a "weird" value doesn't need to be handled. So, for example:

Device 1 reports:


Device 2 reports:


Then, a new reading comes in and for Device 1 it's 12 but for Device 2 it's 7. What's the best way (if there is any) to flag such a case?

I would usually only be looking 24h into the past and the measurements are hourly averages.


1 Answer 1


One idea is to compute first differences in each time series (the change in one measurement to the next in one series). Then, at each time step, compare the difference of series 1 and to that of series 2. (For example by subtraction.)

This method would tell you when something different happened at one location (for example a fire) even if the temperature of the two places was very different to begin with (one sensor in Antarctica and the other at the equator).


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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