There is an array of numbers, approximately the same in meaning. Among them there are several numbers that differ at times. Tell me the algorithm how to find these values?

Here is a graphic example. Such bursts can be several and of different amplitudes. Graphic example. Similar illustration.

  • four
    Something like the three sigma rule? Calculate the standard deviation from the mean, and everything that falls outside a certain band, to remove? - Harry

1 answer 1

As I see it, or the goals are unknown to me and everything seems elementary:

1) Search for average values ​​of two equal intervals of time (or three intervals, to reduce the likelihood of a situation when the bursts go one after another)
2) Compare the values ​​obtained and take the smaller
3) Establish a rule for the difference of a burst, for example: if the amplitude is three or more times larger (here you still need to work out the excess value) than the lower average found, this is a surge.

According to the schedule, how it will work (values ​​by eye): I take time intervals 100..200 and 200..300. In the first interval, the average value is 0.1 (I take only significant figures, that is, to a comma), in the second interval a surge hits and the average value increases to about 0.25. We take the value of 0.1 and compare with the amplitudes according to the established rule.

If I could help, I will be glad