http://k3qu5kyz6zhz5w64m5ez22iqcrw7rci7dccmjuofmoilhpx3gqfip4ad.onion?page_id=MultiVariateBernoulli
Therefore, we can calculate any event of the group, for example: P[X1=x1, X2=x2]=Sum[Product[pi^xi.(1-pi)^(1-xi) , {i=1..n}] + Sum[Dij.(-1)^(xi+xj), {i,j=1..n, i < j}] , {j=3..n, xj=0..1}]
=Sum[Product[pi^xi.(1-pi)^(1-xi) , {i=1..n}], {j=3..n, xj=0..1}] + Sum[Dij.(-1)^(xi+xj), {i,j=1..n, i < j}] , {j=3..n, xj=0..1}]
=p1^x1.(1-p1)^(1-x1).p2^x2.(1-p2)^(1-p2) + D12.(-1)^(x1+x2).2^(n-2)...