cumulative difference sum to detect deviation from target