Suppose you have $100$ coins whose probabilities of obtaining the outcome "head" are $p\_1,\ldots,\,p\_{100}$. These probabilities are not necessarily equal each other. Consider the following random experiment divided into rounds.


* **Round 1:** Throw simultaneously the $100$ coins and observe the number of heads.
* **Round 2:** Throw only those coins you obtained the outcome "tail" in Round 1, and observe the number of heads.
* **Round 3:** Throw only those coins you obtained the outcome "tail" in Round 2, and observe the number of heads.


... and so on. The experiment ends when no coins remain to throw. For all $k\in\{1,\,2,\,3,\ldots\}$, define the random variables


$X\_k$: number of outcomes "head" in Round $k$, and


$Y\_k=X\_1+\cdots+X\_k$.


I learned that 


* $X\_1\sim\text{Poisson-Binomial}(n=100,\,\{p\_1,\ldots,\,p\_{100}\})$ and that
* $Y\_k\sim\text{Poisson-Binomial}(n=100,\,\{q\_1,\ldots,\,q\_{100}\})$, where $q\_j=p\_j+(1-p\_j)\cdot p\_j+\cdots+(1-p\_j)^{k-1}\cdot p\_j$, for all $j\in\{1,\ldots,\,100\}$.


I would like to obtain the joint probability distribution of the random vector $(Y\_k,\,Y\_{k+1})$. 


For the case $k=1$, I noted that $\mathbb{P}(Y\_1=y\_1,\,Y\_2=y\_2)=\mathbb{P}(X\_1=y\_1,\,X\_2=y\_2-y\_1)$. To compute this probability, I have to sum the probabilities of all ${100\choose y\_1}\cdot{100-y\_1\choose y\_2-y\_1}$ pairs $(X\_1,\,X\_2)$ that produce the event $\{X\_1=y\_1,\,X\_2=y\_2-y\_1\}$. However, I believe this method is inefficient.


**Question:** Is there any efficient method or any approximation to obtain the probability distribution of the random vector $(Y\_k,\,Y\_{k+1})$, for all $k\in\{1,\,2,\,3,\ldots\}$?


Any suggestion will be very welcomed. 
Thanks a lot for your help.



Bivariate Poisson-Binomial distribution
I found a solution to my problem. This solution builds on the paper 


Nelsen, R. B. (1987). Discrete bivariate distributions with given marginals and correlation. *Communications in Statistics-Simulation and Computation*, 16(1), 199-208.


Since $\mathbb{P}(Y\_1=y\_1,\,Y\_2=y\_2)=\mathbb{P}(Y\_1=y\_1,\,X\_2=y\_2-y\_1)$, obtaining the joint probability distribution of the random vector $(Y\_1,\,X\_2)$ is enough.


Note that $\mathbb{C}\mbox{ov}(Y\_1,\,X\_2)=0.5\cdot(\mathbb{V}\mbox{ar}(Y\_2)-\mathbb{V}\mbox{ar}(Y\_1)-\mathbb{V}\mbox{ar}(X\_2))$, with 


* $\displaystyle\mathbb{V}\mbox{ar}(Y\_1)=\sum\_{j=1}^{100}(p\_j\cdot(1-p\_j))$,
* $\displaystyle\mathbb{V}\mbox{ar}(X\_2)=\sum\_{j=1}^{100}(q\_j\cdot(1-q\_j))$, and
* $\displaystyle\mathbb{V}\mbox{ar}(Y\_2)=\sum\_{j=1}^{100}(r\_j\cdot(1-r\_j))$.


Following notation of Nelsen (1987), one can


* obtain $f(x)$ and $f(y)$ efficiently with ${\tt dpoibin}$ in ${\tt R}$-software,
* obtain $F(x)$ and $F(y)$ efficiently with ${\tt ppoibin}$ in ${\tt R}$-software, and
* use $\rho=\frac{\mathbb{C}\text{ov}(Y\_1,\,X\_2)}{\sqrt{\mathbb{V}\mbox{ar}(Y\_1)\cdot\mathbb{V}\mbox{ar}(X\_2)}}$.


Thus, according to the sign for $\rho$, one can obtain the joint probability distribution of $(Y\_1,\,X\_2)$ with Nelsen's approach faster than with the approach I provided in my question.


Finally, one can use the same approach to obtain the joint probability distribution of $(Y\_k,\,Y\_{k+1})$, for all $k$.


If you have comments or corrections concerning this solution, please let me know. Thanks a lot.


