我有 N 个伯努利变量,X1, ...,XN和,对于每个,和Xi~B(1, pi),都是已知的, 现在我需要得到 的分布。piXiY=X1+...XNY
如果Xi和Xj时 是独立i!=j的,那么我可以使用模拟:
1. Generate `X1`, ..., `XN` via their distribution, and then get the value of `Y`;
2. Repet step 1 for 10000 times, and then I can get `Y1`, ..., `Y10000`, so I can konw the distribution of `Y`.
但是现在Xi和Xj是依赖的,所以我还需要考虑相关性,假设什么corr(Xi, Xj)=0.2时候i!=j,我怎样才能将相关性插入到模拟中?或者通过其他方式得到 Y 的分布?
感谢您的帮助和建议。