I have $N$ Bernoulli variables, $X_1,...,X_N$ and $X_i\sim B(1, \pi_i)$, $\pi$ is known for each $X_i$, and $Y=X_1+...+X_N$, now I need to get the destribution of $Y$.
If $X_i$ and $X_j$ are independent when $i\ne j$, then I can use the simulation:
1. Generate X1, ..., XN via their distribution, and then
get the value of Y;
2. Repeat step 1 for 10000 times, and then I can get
Y1, ..., Y10000, so I can know the distribution of Y.
But now $X_i$ and $X_j$ are dependent, so I also need to take into account the correlation, assuming that $\text{cor}(X_i, X_j)=0.2$ when $i\ne j$, how can I insert the correlation to the simulation? Or get the distribution of $Y$ via other ways?