The question title doesn't make a lot of sense but I'll try to explain.
I have a source of random finite integer sequences that I know always satisfies the constraint that each positive integer is followed by its negative exactly once later in the sequence.
Example:
$$(100, 120, -100, 12, -12, -120)$$
You can think of it like deposits and matching withdrawals in a bank account that must always maintain a positive balance. If you know anything about memory allocation, it's a series of mallocs followed by frees.
There may be some more constraints on the source and I want to determine whether the sequence fits some pattern. Examples of constraints I'm interested in:
$$(100, 100, -100, 100, -100, 100, -100, -100)$$
The source of this sequence always emits only 100's.
$$(1, 2, 3, -1, 4, -2, -3, 5, -4, -5)$$
The source of this sequence always emits the associated negatives in the same order as their respective positives (e.g. $(1, 2, -2, -1)$ would not be emitted from this source.)
$$(100, 120, 98, 14, -120, -98, -14, -100)$$
All negatives are emitted after all positives $-$ i.e. no positive is emitted after a negative.
Now I know nothing for sure about the source other than the original constraint that it emits negatives exactly once after each positive. So the problem is: I want to tell based on the sequence the probability that the source also has one of these other constraints. For example, if I read 20 different sequences from the source, each 100 values long, and all of them are 100 or -100, then what is the probability that this is actually a source that emits only 100/-100? Or maybe, what does my sample size need to be to say with confidence at least 0.98 that this source only emits 100/-100?
I realize this is sort of a big question and I may not be familiar enough with statistics or information theory to understand an answer - I'll appreciate anything that points me in the right direction of things to study.