Assume we are collecting dichotomous data (we record a negative observation as a $0$ and a positive one as a $1$) from some kind of physical process that acts as a fair coin flip except when there are two negative observations in a row ($00$) then the next observation will be a positive one ($1$).
An example of a possible data set would be
$$\{0,1,1,0,1,0,0,1,0,0,1,1,0,1,1,1,0 \}$$
one can notice that every two negative observations there always is a positive one but this pattern is quite difficult to catch with a statistical test.
What kind of tests exist to catch a dependency of this kind in the data?
You could do a $\chi^{2}$ test of uniformity on successive words of 3 bits- this would show that the 000 pattern was missing. A K-S test could also be used and might be more sensitive.
To perform this text, break the original sequence of 0 and 1 bits up into 3-bit words:
$011010011010100 \; ... \rightarrow 011 \; 010 \; 011 \; 010 \; 100 \; ... $
Then count the number of words of each of the 8 possible types: $N_{000}$, $N_{001}$, $N_{010}$, $N_{011}$, $\ldots$, $N_{111}$. Let $M$ be the total number of 3-bit words.
The $\chi^{2}$ statistic is
$\chi^{2}_{\mbox{obs}}= \sum_{i=000}^{111} \frac{(N_{i}-E_{i})^{2}}{E_{i}}$
where $E_{i}=M/8$, $i=000, \; \ldots, \; 111$.
Under the null hypothesis that all of the words are equally likely, the $\chi^{2}$ statistic should have a $\chi^{2}$ distribution with $8-1=7$ degrees of freedom. If the test statistic exceeds the 95th %-ile of this $\chi^{2}$ distribution then we reject the null hypothesis.
You can extend this to words of 4 or more bits if you're looking for more complicated dependencies.