Let's assume we have two graphs where:
- Each graph has 600 points per minute.
- We're allowed to get only one point per minute.
- We do not get the same point per minute in both graphs. So for example, in a given minute, for graph A we'll have the 20th point and for graph B the 517th point.
- In each minute the measurements we get are of different xTH measurement. So once it can be 20th and 517th, the next minute may be 51st and 212th.
- 99% of the time, the graphs should be fairly close (that is, if we had all the points, the difference between the Y values should be fairly low).
- Generally, these graphs are not very erratic. So you'd expect a chance of probably a fraction of a percent between two measurements and over the course of a minute no more than X% (where X is probably 20 or 30 or so). However, over the course of a day, they can go from 0 to 1.2 million and back.
I need some algorithm that within 20 minutes of the graphs straying away from one another, I know that they have done so. Where straying away needs to be defined as well (as a percentage probably). I'm allowed to keep only 60 minutes worth of measurements, which means 60 measurements per graph, including the 20 in which I need to identify the problem.