Online CUSUM implementation