# Find the marginal probability function of Y

I get stuck on the first part of this problem and consequently am unable to solve the second part.

Problem

The number of defects per yard in a certain fabric, $Y$ , was known to have a Poisson distribution with parameter $λ$. The parameter $λ$ was assumed to be a random variable with a density function given by:

$f(λ)=e^{−λ}$ , for $λ≥0$

(a) Find the marginal probability function for $Y$.

(b) You choose a yard of fabric. What is the probability that $Y≤3$?

My Attempt

(a) $P_y(y)=P(Y=y)= \int_0^\infty f_λ(h)P(Y=y | λ=h)dh$

$=\int_0^\infty \frac{e^{-2h}h^y}{y!}dh$

$=\frac{2^{-(y+1)} Γ(y+1)}{y!}$ for $Re(y)>-1$

I have a strong suspicion that I'm doing something incorrectly since the problem requires integration by parts and results in an incomplete gamma function. Could this answer actually be the marginal probability function for $Y$?

(b) $P(Y≤3)$ would just have me plugging in values for $y$ to get $\sum_{y=0}^3P(Y=y)$ so I'd add up the four terms using the function found in part (a). In doing so, I believe I would represent the term $Γ(y+1)$ as $y!$ because $Γ(y)=\int_0^\infty x^{y-1}e^xdx=(y-1)!$

Our restriction $Re(y) > -1$ is satisfied, of course, since we cannot have negative yardage of the fabric, which results in a lower bound of 0 yards.

You're doing it right. In (a), since $y$ is a nonnegative integer, the gamma function $\Gamma(y+1)$ nicely cancels with the $y!$ in the denominator, so the marginal distribution of $Y$ is geometric.