statistics - Algorithm for spotting the "big" value changes in a list of measurements -
i have sensor measures volume of liquid. liquid consumed , refilled when needed. want observe the times liquid "stolen" or filled. stolen mean sudden drop in volume of liquid. opposite considered filling. values taken sensor have smaller spikes should ignored given plenty measurements help so.
is there statistics method (documentation) or programming algorithm (any language) or improve sql function/query (any db) above described scenario?
you looking spot outliers.
do have baseline value maintain or want compare against current running average?
what consider sudden drop - absolute term (like 5l) or relative 1 (5% of current volume).
here approximate description if relying on running averages.
on volumechange calculate new runningaverage if (runningaverage outside allowedrange(oldrunningaverage)) raise warning oldrunningaverage := runningaverage
what need know is:
how measurements come in (can rely on them coming regularly) howallowedrange
defined here's illustration simple moving average (red) 5 measurements (blue):
algorithm statistics
No comments:
Post a Comment