stats/change_point_cusum_utils library
Two-sided CUSUM change-point detection (roadmap #568).
CUSUM (cumulative sum) accumulates deviations of each sample from a reference level and flags a change when the running sum crosses a threshold. It detects sustained shifts in the mean far earlier than comparing raw values, because small persistent deviations add up.