Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|cite|improve this question
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". – Rahul May 19 '12 at 17:05
up vote 1 down vote accepted

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). $$

share|cite|improve this answer
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)}$ – Benno May 19 '12 at 13:53
The quantity $f(x,y,\hat y)$ is undefined. – Did May 19 '12 at 13:54

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.