# Does the joint pdf $f_{x, y} (x, y)$ equal to the conditional $p_{y | x} (y | x)$ for all random variables?

So I have this question where you are given two random variables, $$X$$ and $$Y$$. $$X$$ is a continuous random variable (represented as a mean) with a distribution of $$Exp(1)$$ (exponential with $$\lambda = 1$$) and $$Y$$ is a discrete random variable (represented as the actual probability) with the distribution of $$Pois(\lambda)$$ and the parameter is $$X$$. I am asked to find the joint probability distribution.

The solution suggests that $$f_{x, y} (x, y) = p_{y | x} (y | x)$$ but I am not sure how to got to this or why. I do not even know why they use the discrete formula for this or why they even used a conditional. After, they multiple the two distribution formulae for each variable. I am not sure why this is either.

• Can you share the source, page number etc.? Nov 28 '19 at 9:27
• @gunes It's kind of a University lecture example and I am not sure if I can share it. However, I do believe I solved it but I would appreciate it if someone could confirm it. Nov 28 '19 at 10:17
• I can’t say more without explicitly seeing the solution, however I don’t think $f(x,y)=p(x|y)$. And, in your first paragraf you haven’t clearly mentioned about the dependence between the RVs. Nov 28 '19 at 10:22
• $X$ is the mean of something and is distributed as $Exp(1)$ and Y is the actual value (i.e. not the mean) with parameter $X = x$ such that $Y | X = x$ is distributed as $Pois(X = x)$. I'll give my own answer right now and hopefully, you can confirm it. Nov 28 '19 at 10:25
• @gunes Posted my own answer, please feel free to confirm or comment about it. Thanks. Nov 28 '19 at 10:36

Let me clear the notation. $$X\sim\exp(\lambda=1)$$, and given $$X$$, $$Y$$ is Poisson distributed with $$\lambda=X$$. By the definition of conditional probability, we have:$$f_{X,Y}(x,y)=f_{Y|X}(y|x)f_X(x)$$

where $$f_{Y|X}(y|x)=e^{-x}\frac{x^y}{y!},f_X(x)=e^{-x}$$ when $$x> 0, y\in \mathbb{Z^+}$$.

So, your answer is correct but $$f_{x,y}(x,y)\neq p_{y|x}(y|x)$$

• It's given in the question. $Y$ is Poisson distributed with mean $X$ defines $f_{Y|X}(y|x)$, not $f_Y(y)$. Nov 28 '19 at 17:28
• Notations differ in different textbooks. $f$ letter is not supposed to represent continuous distributions alone. Some use $p$ for both; some use $f$ for both, or as yours $f$ for cont, $p$ for discrete. Nov 28 '19 at 17:57
• Yes, $Y$ is discrete. Nov 28 '19 at 18:00
• Yes, because $X$ is exponentially distributed, which is a continuous RV. Nov 28 '19 at 18:05
• Yes, check out mixed density: en.wikipedia.org/wiki/Joint_probability_distribution#/… Nov 28 '19 at 18:09

The $$Y$$ with parameter $$X$$ just means: $$Y | X = x$$ (where $$x$$ is constant). $$Y$$ is distributed as $$Pois(X = x)$$.

Now, to find the joint probability density function of the two variables, you can use $$p_{y | x} (y | x)$$ since $$Y$$ is dependent on a constant $$X = x$$ value and the joint conditional probability has its second variable as a constant. Therefore, $$f_{x, y} (x, y) = p_{y | x} (y | x)$$. Now, since $$x$$ is constant, to find the probability for some $$y$$ given $$x$$, it is simply the probability of the $$y$$ times the probability of $$x$$ or mathematically: $$= \frac{e^{-x}x^y}{y!}\cdot e^{-x}$$ for $$x > 0$$ and $$y = 0, 1, 2, \dots$$ (all from the pdfs of the respective distributions).

The other way i.e. $$p_{x | y} (x | y)$$ is harder to get (or not possible) since you would need a random variable where $$y$$ is constant, but for this question, there is none.

• I think you need to append this text to your original question, instead of posting as an answer. Nov 28 '19 at 12:03