Why is my probability generating function for difference of two variables not working?

105 Views Asked by At

I am working with two probability generating functions of independent variables and want the pgf of the difference of the independent variables. Each pgf behaves normally on its own, but when I go to combine them, online calculators have a hard time computing them. I have the pgf of X as $P_X(s) = s^{k-1}(\frac{ps}{1-qs})^{k}$ where $k$ is the parameter and the support is $2k-1$ to infinity. The pgf for Y is $P_Y(s) = \frac{p^{k}(1-ps)s^{k}}{1-s+qp^{k}s^{k+1}}$ where $k$ is the parameter and the support is $k$ to infinity. I have that $P_{X-Y}(s) = s^{k-1}(\frac{ps}{1-qs})^{k} (\frac{p^{k}(1-\frac{p}{s})(\frac{1}{s})^{k}}{1-\frac{1}{s}+qp^{k}(\frac{1}{s})^{k+1}})$ I have found this simplifies to $P_{X-Y} = (\frac{ps}{1-qs})^{k}(\frac{p^{k}(s^{k}-ps^{k-1})}{s^{k+1}-s^{k}+qp^{k}})$ If anyone can tell me where the problem is as each behaves on its own but once combined I get negative values as probabilities. Could the problem be in the supports? Curious if anyone can help.

1

There are 1 best solutions below

0
On

Like OP, I use the notation $P_A(s) = \mathbb{E}[s^A]$ (with $s\geq 0$) for the probability generating function of the random variable $A$.

$P_X$ is only defined for $0\leq s<q^{-1} = (1-p)^{-1}$, and $P_Y$ is only defined on $[0,s_0)$, where $s_0$ is the smallest positive solution of $s - (1-p)p^k s^{k+1} = 1$ or $+\infty$ if there is no positive solution. Then $P_{-Y}(s) = P_Y(s^{-1})$ is defined for $s>s_0^{-1}$. Taking the product of the pgf, we obtain that $P_{X-Y}$ is defined on the interval $(s_0^{-1},(1-p)^{-1})$. On this interval, $P_{X-Y}$ is always positive. I think this addresses OP's question.

Note: Where OP’s formulas come from is really hard to understand, but we can recognize the following: $$ P_X(s) = s^{2k-1} \left( \frac{p}{1-qs} \right)^k = P_{2k-1}(s) P_{G}(s) $$ so that $X = (2k-1)+G$, where $G$ is a negative binomial distribution NB(k,p) (using the parametrization of https://en.wikipedia.org/wiki/Negative_binomial_distribution) --- and we need $p+q=1$, a condition that OP forgot. I have no idea about what $Y$ is, except that $Y-k$ is a $\mathbb{N}$-valued random variable --- I trust the OP that this is the pgf of some actual random variable.