I've been revising a bit of conditional probability theory and I came across a problem I realise I don't fully understand.
Consider two random variables $X$, $Y$ with joint probability density function $f_{X,Y}(x,y)$. What's the probability density function of $X$ given that $X=Y$?
With a condition that isn't random, we could just write $$f_{X|Y=y}(x)=\frac{f_{X,Y}(x,y)}{f_Y(y)}$$ In this case, since I have a random condition, I'm not sure what to do. I get the impression the answer should be in the form of $$f_{X|Y=X}(x)=c*f_{X,Y}(x,x)$$ where $c$ is just some scaling constant that normalises the pdf. But I'm guessing this isn't the best method of doing this and I'm not sure if this is even true, so a solution to my problem would be greatly appreciated!
If $(X, Y)$ is a two-dimensional continuous random variable with joint probability density function $f$ and if $f_X$ and $f_Y$ are the marginal density functions of $X$ and $Y$ respectively, then the conditional density function of $X$ given $Y = y$, is denoted by $f_{X | Y}(x | y)$, and is defined as $$ f_{X | Y}(x | y) = \frac{f(x, y)}{f_Y(y)}, \ \ \mbox{where} \ \ f_Y(y) \neq 0 $$ for $-\infty < x < \infty$.