I have N bernoulli dependent variables, X1, X2, ..., XN, and Xi ~ B(1, pi), pi is already konwn. And Y=X1+X2+...+XN, I need to get the distribution of Y. If Xi, Xj is independent, then I can use the simulation, generate X1,...,XN using the bernoulli distribution, and get the Y; repeat 10000 times and then get 10000 samples of Y, so I can know the distribution of Y.

But now Xi, Xj is dependent, so I also need to take into account the correlation, assuming that corr(Xi, Xj) = 0.2, i!=j. How can I insert the correlation, or just get the distribution from the mathematics.

But now Xi, Xj is dependent, so I also need to take into account the correlation, assuming that corr(Xi, Xj) = 0.2, i!=j. How can I insert the correlation, or just get the distribution from the mathematics.

Last edited: