Detection of multiple changes in a sequence of dependent variables