Here is the question that I am trying to do.
The number of defects per yard $Y$ for a certain fabric is known to have a Poisson distribution with parameter $x\,$ (i.e. $f(Y|X = x)$ has a Poisson distribution with parameter x$)$. However, $x$ itself is a random variable with probability density function given by
$f(x) = e^{-x},\ x\ge 0$
and $\,f(x)$ is equal to $0$ everywhere else.
Find the joint probability function for $X$ and $Y$.
So what I was thinking you know that you want a function of $f(x,y)$. Since they tell you that it follows a Poisson distribution you would need a $\lambda$ and a $k$ value where the $\lambda$ is your average number of events per interval and $k$ is the number of events that occur. The way the question is worded $\lambda$=y and $k$=$x$.
$$P(k) = \frac{\lambda^{k}e^{-\lambda}}{k!}=\frac{y^{x}e^{-y}}{x!}=f(x,y)$$
So what I think is that $f(x,y)$ is the joint probability function since $x$ and $y$ are variables and not constants. What I was wondering is whether this is right or not? I'm a bit unsure because I'm not why they gave us the information that $f(Y|X = x)$. Did I have the correct approach or not? If not can I know what is wrong with my answer and how to correctly do this problem?
Recall that a conditional probability mass/density function can be written as follows:
$ f_Y(y|X=x) = \frac{f_{Y,X}(y,x)}{f_X(x)} $
You can solve for $ f_{Y,X}(y,x) $ to get:
$ f_{Y,X}(y,x) = f_Y(y|X=x) \times f_X(x) = \frac{e^{-x}y^x}{y!} \times e^{-x} = \frac{e^{-2x}y^x}{y!} $