# Identify changepoints in 1/0 sequence [duplicate]

Say I have a sequence that looks like this:

0 0 0 0 0 1 0 0 0 0 1 0 1 1 1 0 0 0 0 0 0 0 0 0 0


In general terms, I am interested in determining when there is an over-abundance of 1's in close proximity. Not necessarily in a row, but within a sliding window. In this example, the 0's and 1's represent whether a system is stable or unstable at regular time intervals.

Currently, I don't have any fixed notion of what exactly should constitute a significant or meaningful change in the sequence from 0's to more 1's, I am trying to work that out from some exploratory analyses.

I appreciate that this is somewhat general - however, if anyone has any ideas as to what literature to look at I would be grateful.

• You could make set windows, then sum the values in each window and test the differences. – VCG Aug 19 '16 at 16:08
• You will get more insight when you follow @frage_man's advice if you replace "test" by "plot." (Formal tests of the differences can be formulated but are tricky to carry out due to the serial correlation among overlapping windows and the suspicion of correlation among nearby windows.) – whuber Aug 19 '16 at 17:48
• – Tim Oct 17 '16 at 20:22