Sum of Binomial and Poisson

Simon de Visscher <sdevisscher@hotmail.com> wrote:
> Do you have an idea about how to add a Poisson variable and a binomial?

Let X_1∼Binomial(n, p) be independent of X_2∼Poisson(λ). We seek the distribution of the sum X_1 + X_2.

Solution: Let f(x_1, x_2) denote the joint pmf of (X_1, X_2):

               &nbs ... 955;^x_2)/x_2 ! ;   domain[f] = {{x_1, 0, n}, {x_2, 0, ∞}} && {Discrete} ;

Let Y = X_1 + X_2 and Z = X_2. Then the joint pmf of (Y, Z), say g(y, z), is given by mathStatica's Transform function as:

g = Transform[{y == x_1 + x_2, z == x_2}, f]

(^(-λ) (1 - p)^(n - y + z) p^(y - z) λ^z Binomial[n, y - z])/z !

Deriving the domain of support of Y and Z is a bit more tricky. The following diagram plots the space in the y‐z plane where g(y, z) >0.

[Graphics:HTMLFiles/index_17.gif]

Then the domain of support (the shaded region in the figure) can be defined as follows:

    When y≤n:      0<z<y
    When y>n:       y - n<z<y

The pmf of Y = X_1 + X_2 is then obtained by summing out Z in each part of the domain:

* If y≤n, the pmf of the sum Y = X_1 + X_2 is:

sol1 = Sum[Evaluate[g], {z, 0, y}]

(^(-λ) (1 - p)^(n - y) p^y Γ[1 + n] Hypergeometric1F1[-y, 1 + n - y, ((-1 + p) λ)/p])/(Γ[1 + n - y] Γ[1 + y])

* If y>n, the pmf of the sum Y = X_1 + X_2 is:

sol2 = Sum[Evaluate[g], {z, y - n, y}]

(^(-λ) p^n λ^(-n + y) Hypergeometric1F1[-n, 1 - n + y, ((-1 + p) λ)/p])/Γ[1 - n + y]

where Hypergeometric1F1[a, b, z] denotes the Kummer confluent hypergeometric function _1F_1 (a ; b ; z).