Suppose I have two continuous random variables $X, Y$ with joint probability density $f(x,y)$. Then by marginalizing over $y$ I can derive

$$ f(x| Y=y) \\ = \int{f(x, \hat{y}|Y=y) d\hat{y}} \\ = \int_{\hat{y} \neq y}{f(x, \hat{y}|Y=y) d\hat{y}} \\ = \int_{\hat{y} \neq y}{0 \, d\hat{y}} \\ = 0 $$

where I'm using the fact that it is possible to exclude single points from an integral without changing its value.

Now this is obviously not correct, but since my probability theory courses were more pragmatic than rigorous, I'm not sure where exactly the error is.

*Edit: * After Didier's question, I think I can answer this myself: The joint distribution $f(x,y,\hat{y})$ should intuitively be $f(x,y)\delta(y-\hat{y})$. Since this is not a conventional function, the usual rule "it is possible to ignore single points of an interval" does not apply any more. Correct?

  • $\begingroup$ What exactly do you mean by $f(x,y,\hat y)$, anyway? $f$ is the joint probability density function of $x$ and $y$, not simply shorthand for "the probability density of whatever is in the parentheses". $\endgroup$
    – user856
    Commented May 19, 2012 at 17:05

1 Answer 1


No clue about what your $f(x,\hat y\mid Y=y)$ could mean. Anyway, somewhere in your notes should be written the correct formula $$ f(x\mid y)=\frac{f(x,y)}{f_Y(y)}, $$ where $f_Y$ denotes the density of $Y$, given by $$ f_Y(y)=\int f(z,y)\mathrm dz. $$ Edit A part of the problem might lie in the temptation to interpret $f(x\mid y)$ as the ratio of two probabilities. This argument can be made rigorous, but with a little care. Pick $z$ such that $(y-z,y+z)$ has positive probability with respect to the distribution of $Y$, that is, $$ \int_{y-z}^{y+z}f_Y\gt0. $$ Then, for every bounded measurable function $u$, $$ \mathrm E(u(X,Y)\mid y-z\leqslant Y\leqslant y+z)=\frac{\mathrm E(u(X,Y);y-z\leqslant Y\leqslant y+z)}{\mathrm P(y-z\leqslant Y\leqslant y+z)}=\frac{a(z)}{b(z)}, $$ with $$ a(z)=\int_{y-z}^{y+z}v(t)\mathrm dt,\quad v(t)=\int u(x,t)f(x,t)\mathrm dx,\quad b(z)=\int_{y-z}^{y+z}f_Y(t)\mathrm dt. $$ Assume that $f$ is regular enough to have, when $z\to0^+$, $$ b(z)=2zf_Y(y)+o(z),\quad a(z)=2zv(y)+o(z), $$ then $$ \mathrm E(u(X,Y)\mid y-z\leqslant Y\leqslant y+z)\to\frac{v(y)}{f_Y(y)}=\int u(x,y)f(x\mid y)\mathrm dx, $$ with $$ f(x\mid y)=\frac1{f_Y(y)}f(x,y). $$

  • $\begingroup$ I was actually using this definition, so my $f(x, \hat{y} | Y=y)$ was a shorthand for $\frac{f(x,y,\hat{y})}{f_Y(y)}$ $\endgroup$
    – Benno
    Commented May 19, 2012 at 13:53
  • $\begingroup$ The quantity $f(x,y,\hat y)$ is undefined. $\endgroup$
    – Did
    Commented May 19, 2012 at 13:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .