# Good ways to sample $n$ identical and dependent random variables

I'm wondering if there's a good way to talk about sampling identical but dependent random variables where it's also easy to see how the distribution evolves as we move from $n$ random variables to $n+1$.

I'd like to start with the binomial distribution. For $n$ variables that are 0 or 1, it's very easy to see how the probability of an event like "all zeros" changes as we add another bernouli trial if they are independent. With dependent bernouli trials, there is no obvious way to do this because there is so much freedom in how random variables can be dependent. What I'm looking for is just one or two ways to do this sensibly though. Nothing is jumping out at me, so I'd like suggestions.

I've thought about letting the bernouli outcomes be determined by an underlying Markov process, where there could be two or more states and a visit to a certain state corresponds to a bernouli outcome of 0 or 1. Are there other ways to do this where I can solve out for changes in the distribution given a change in $n$?

I know you wanted to start with the binomial, but perhaps a simpler example will help you in your approach. Consider $n$ uniform random variables that sum to 1. If $n=2,$ we can generate $X \sim U[0,1]$ and $Y = 1-X.$ Then $X$ and $Y$ are identically distributed.

Now let $n=3.$ Generate $X \sim \mathrm{Unif} [0,{2 \over 3}].$ Let $$Y = \begin{cases} X+{1/3} \ , & \text{if} \ X \le {1/3} \\ X-{1/3} \ , & \text{if} \ {1/3} \lt X \le {2/3} \end{cases}$$ Let $Z = 1 - X - Y.$ Again $X, Y,$ and $Z$ are identically distributed.

For $n=5,$ see my answer here: How to efficiently generate five numbers that add to one?

For $n=6,$ see the longer of my answers here: How to efficiently generate a set uniformly distributed numbers that add to $n$.

You can do a similar method for $n=2$ for a binomial by generating $X$ as binomial (say with $n$ trials and using the success parameter $p={1 \over 2}$), and then letting $Y=n-X.$ But I don't think you can generalize the success probability to values other than $1 \over 2$ or you will lose symmetry. It looks very limited for the binomial.

A version using pairs of random variables (for when $n$ is even) can be seen in the shorter of my answers to this question: How to efficiently generate a set uniformly distributed numbers that add to $n$.

I think that might work for you for even $n$ and $p={1 \over 2}.$

• Thanks. I recently learned of the generalized binomial model where $p_n = p(1-\gamma) + \gamma n^-1 S_n$ and some even further generalizations of that which can help me maintain identical distributions if I want. But your answer might also be helpful. – user178543 Nov 8 '14 at 15:26