Explanation of this situation with two random variables - $X$ conditionally distributed on $N$?

35 Views Asked by At

Let $N$ have a Poisson distribution with parameter $\lambda = 1$. Conditional on $N = n$ let $X$ have a uniform distribution over the integers $0, 1, ..., n+1$. What is the marginal distribution of for $X$?

So I want the marginal distribution of $X$ and as I have the conditional distribution of $X$ when $N = n$ I can get it by summing over all values of $n$. I.e.

$f(x) = P(X = x) = \sum P(X = x | N = n)P(N = n)$

So my problem is what values of $n$ should be I summing over, ie. what do I put above and below the summation sign? And what is $P(X = x | N = n)?$

1

There are 1 best solutions below

0
On

You arrive at: $$P\left(X=k\right)=\sum_{n=0}^{\infty}P\left(X=k\mid N=n\right)P\left(N=n\right)$$ which is okay, but we will have $P\left(X=k\mid N=n\right)=0$ if $k\notin\left\{ 0,1,\dots,n+1\right\} $.

For a positive $P\left(X=k\mid N=n\right)$ we need $k\leq n+1$ resulting in: $$P\left(X=k\right)=\sum_{n=k-1}^{\infty}P\left(X=k\mid N=n\right)P\left(N=n\right)$$if $k>0$ and $$P\left(X=0\right)=\sum_{n=0}^{\infty}P\left(X=0\mid N=n\right)P\left(N=n\right)$$ in special case $k=0$

This way you avoid terms that equalize $0$ and are in that sense irrelevant.