There is [a question that was asked on stackoverflow](https://stackoverflow.com/questions/2441506/how-to-generate-correlated-binary-variables/2447678#2447678) that at first sounds simple but I think it's a lot harder than it sounds.


Suppose we have a stationary random process that generates a sequence of random variables x[i] where each *individual* random variable has a [Bernoulli distribution](http://en.wikipedia.org/wiki/Bernoulli_distribution) with probability p, but the correlation between any two of the random variables x[m] and x[n] is α|m-n|.


How is it possible to generate such a process? The textbook examples of a Bernoulli process (right distribution, but independent variables) and a discrete-time IID Gaussian process passed through a low-pass filter (right correlation, but wrong distribution) are very simple by themselves, but cannot be combined in this way... can they? Or am I missing something obvious? If you take a Bernoulli process and pass it through a low-pass filter, you no longer have a discrete-valued process.


(I can't create tags, so please retag as appropriate... stochastic-process?)



discrete stochastic process: exponentially correlated Bernoulli?
Here is a construction.


* Let $\{Y\_i\}$ be independent Bernouilli random variables with probability $p$.
* Let $N(t)$ be a [Poisson process](http://en.wikipedia.org/wiki/Poisson_process) chosen so that $P(N(1)=0)=\alpha$.
* Let $X\_i = Y\_{N(i)}$.


In words, we have some radioactive decay which tells us when to flip a new (biased) coin. $X\_n$ is the last coin flipped at time $n$. The correlation between $X\_m$ and $X\_n$ comes from the possibility that there are no decays between time $m$ and time $n$, which happens with probability $\alpha^{|m-n|}$. 


The conditional correlation between $X\_m$ and $x\_n$ is $1$ if $N(m) = N(n)$, and $0$ if $N(m)\ne N(n)$, so $\text{Cor}(X\_n,X\_m) = P(N(m)=N(n)) = \alpha^{|m-n|}.$


You can simplify this by saying that $N(i) = \sum\_{t=1}^i B\_i$ where $\{B\_i\}$ are independent Bernoulli random variables which are $0$ with probability $\alpha$.


