special sum of binomials distributions

273 Views Asked by At

Let $X$ be a random variable. Let $X_p$ be distributed as a Binomial distribution with number of outcomes $X$ and probability $p$, i.e. $Bin(p, X)$. Consider the random variable, $$ Y = X_p + X_{1-p}. $$ What is the probability distribution of $Z : = Y - X$? Note that by linearity of expectations, $\mathbb{E}[Z]=0$.

2

There are 2 best solutions below

0
On BEST ANSWER

First, we complete the information needed to solve the question, that is, we make the assumption that $X_p$ and $X_{1-p}$ are independent conditionally on $X$.

Thus, considering independent Bernoulli random variables $(U_i)$ with parameter $p$ and $(V_i)$ with parameter $1-p$, conditionally on $X=n$, we define $X_p=\sum\limits_{i=1}^nU_i$ and $X_{1-p}=\sum\limits_{i=1}^nV_i$, and we consider $$Z=\sum\limits_{i=1}^nU_i+\sum\limits_{i=1}^nV_i-n=\sum\limits_{i=1}^nW_i, $$ where each $W_i=U_i-(1-V_i)$ is the difference of two independent Bernoulli random variables with parameter $p$. That is, $P[W=1]=P[W=-1]=p(1-p)$ and $P[W=0]=p^2+(1-p)^2$. To write it concisely, $$ Z=\sum_{i=1}^XW_i. $$ It is difficult to say more about the distribution of $Z$ in general, the result depending very much on the distribution of $X$. A convenient (albeit indirect) description is to provide the probability generating function $g_Z$ of $Z$, defined by $$ g_Z(z)=E[z^Z]=\sum_{n\in\mathbb Z}P[Z=n]\,z^n, $$ for every complex number $z$ in the unit circle $|z|=1$. One gets $$ g_Z(z)=E[g_W(z)^X]=g_X(g_W(z)). $$ Note that $g_W(z)=1-p(1-p)(2-z-z^{-1})$. For every integer $n$, $$ P[Z=n]=\frac1{2\pi\mathrm i}\oint_{S^1}g_Z(z)\frac{\mathrm dz}{z^{n+1}}. $$

1
On

Consider the probability generating function for $Y$: $$ \mathcal{P}_Y(z) = \sum_{k=-n}^n z^k \Pr\left(Y=k\right) = \mathsf{E}\left(z^Y\right) = \mathsf{E}\left(z^{X_p + X_{1-p} -n} \right) $$ If $X_p$ and $X_{1-p}$ are independent: $$ \mathcal{P}_Y(z) = z^{-n} \mathcal{P}_{X_p}(z) \mathcal{P}_{X_{1-p}}(z) = z^{-n} \cdot \left((1-p) + p z\right)^n \cdot \left(p + (1-p) z\right)^n = z^{-n} p^n (1-p)^n \left(1 + 2 z \cdot \frac{\frac{1}{2}- p + p^2}{p(1-p)} + z^2\right)^n = z^{-n} p^n (1-p)^n \sum_{m=0}^{2n} z^m C_m^{(-n)} \left( \frac{\frac{1}{2}- p + p^2}{p(1-p)} \right) $$ where $C_{m}^{(\alpha)}(x)$ denotes the Gegenbauer polynomial.

Hence $$ \Pr\left(Y=k\right) = p^n (1-p)^n C_{k+n} ^{(-n)} \left( \frac{\frac{1}{2}- p + p^2}{p(1-p)} \right) \cdot \left[ -n \leqslant k \leqslant n \right] $$ where $[\bullet]$ denotes the Iverson bracket.

Since $X_p$ and $X_{1-p}$ are equal in distribution to sum of iid Bernoulli random variables, the $Y$ random variable equals in distribution to the sum of $2X$ independent Bernoulli random variables, making $Y+X$ the Poisson binomial distributed: $$ Y + X \sim \operatorname{Poi-Binom}\left(\underbrace{p,\ldots,p}_{X}, \underbrace{1-p,\ldots,1-p}_{X}\right) $$