How to decompose efficiently dpoibin into its summands in R?

209 views Asked by At

The Poisson-Binomial distribution concerns the probability of the number of successes in a sequence of independent Bernoulli trials with different probabilities of success. This is a generalization of the Binomial distribution.

With the command dpoibin, in the poibin package, one can obtain the mass probability function. For instance, with this command:

library(poibin)
n <- 100
Probs_Success <- runif(n)
dpoibin(kk = 30, pp = Probs_Success)

one can obtain the probability of getting 30 successes in a sequence of 100 independent Bernoulli trials with probabilities of success contained in the vector Probs_Success. To compute this probability one has to sum the probabilities of all possible sequences of lenght 100 where there are 30 successes and 70 failures.

Question: How can I efficiently obtain all of the summands that generate the above probability in R? Thanks a lot for your help.

For those who are interested in the problem that motivated this question, please click on the following link:

https://math.stackexchange.com/questions/2924831/bivariate-poisson-binomial-distribution

1

There are 1 answers

0
Student1981 On BEST ANSWER

I solved the problem that motivated the above question. This solution is based on the paper

https://www.tandfonline.com/doi/abs/10.1080/03610918708812585

To see this solution, just click on the following link

https://math.stackexchange.com/questions/2924831/bivariate-poisson-binomial-distribution

Thank all people who provided me suggestions.