I have a process that can be modeled by looking at the occurrence of particular patterns in a 12 digit binary string to determine if those patterns occur more or less often than they would randomly. I am assuming that each digit has an equal chance of being 0 or 1, but throwing out the case of
00_00_00_00_00_00 since that pattern has a very high likelihood of occurring (>50%) and I'm only interested in the cases where there is a
1 somewhere in the binary string. The total number of possibilities is then
2^12 - 1 = 4095. The patterns I'm interested in are any of the following:
.1_1._.._.._.._.. .._.1_1._.._.._.. .._.._.1_1._.._.. .._.._.._.1_1._.. .._.._.._.._.1_1.
. can be any other digit. This means that the expected probability of each of these is
2^10 / (2^12 - 1), which is approximately 25.0006%. However, since there are 5 possible patterns simply summing the probabilities yields a value greater than 100%.
I have experimental data that I will be calculating the actual observations from to compare to, I want to know if any of those patterns is different than what random chance would suggest. My first thought is to use a chi-squared test with the null hypothesis being that there is no difference and the alternate hypothesis being that there is a difference. I think the degrees of freedom would be 4, but I'm not sure since a single observation can count for multiple patterns that I'm interested in.
Is chi-squared the correct method to use here? If so, would my degrees of freedom be 4?
(Note: I organized the binary string into pairs of digits because in the physical process I'm measuring that's how they're organized. There's a specific failure case I'm trying to analyze where two adjacent pairs might be experiencing some kind of interaction, but only on their adjacent digits.)