Is that possible to calculate this? $$P(Y \leq \frac{1}{2} | X = 2)?$$ $X$ and $Y$ are both continuous random variables. I am asking this question because I know that we can't calculate a density function in a point, instead we should specify an interval. So how can we calculate this: $$P(Y < \frac{1}{2}, X = 2) / P(X = 2)? \quad\text{(Bayes form of the former expression)}$$ Since $X = 2$ is a point, not an interval.
-
I deleted my post because I think I was confusing you more than I was helping you. You might want to check this page which defines the conditional probability in your context. Specifically, check the definition of $P(X\in A,|,Y=y_0)$. – Ian May 06 '14 at 10:32
-
Thank you. Although I don't understand Sigma-Algebra and the page you sent me is somewhat complicated, But at least I realized that it may be possible to calculate that probability. Maybe I should investigate a little more. – Arya May 06 '14 at 10:45
-
Explaining onditional probabilities when one conditions on events of probability zero, without using sigma-algebras? Hmmm... – Did May 06 '14 at 11:21
-
It's based on taking the limit as an interval approaches zero length (ie: a point). The quotient converges to an indeterminate form ($\frac 00$), but limits of this kind can be found using l'Hopital's rule. Not sure how to explain any further without using sigma notation (or integrals). – Graham Kemp May 07 '14 at 02:27
2 Answers
Let us find a way to calculate: $$\mathsf P_{Y\mid X}(y_0\mid x_0) \mathop{:=} \mathsf P(Y \leqslant y_0 \mid X=x_0)$$
If the idea of taking the conditional at a given point is phasing you, consider the point to be an infinitesimal interval and take the limit.
$$\mathsf P(Y \leqslant y_0 \mid X=x_0) = \lim\limits_{0<h\to 0} \mathsf P(Y \leqslant y_0 \mid x_0\leqslant X\leqslant x_0+h)$$
Applying Bayes' Theorem.
$$\mathsf P(Y \leqslant y_0 \mid X=x_0) = \lim\limits_{0<h\to 0} \frac{\mathsf P(Y \leqslant y_0, x_0\leqslant X\leqslant x_0+h)}{\mathsf P(x_0\leqslant X\leqslant x_0+h)}$$
By total probability in the denominator, we obtain:
$$\mathsf P(Y \leqslant y_0 \mid X=x_0) = \lim\limits_{0<h\to 0} \frac{ \mathsf P(Y \leqslant y_0, x_0\leqslant X\leqslant x_0+h)}{\mathsf P(Y \leqslant \infty, x_0\leqslant X\leqslant x_0+h)}$$
The numerator and denominator will both converge to $0$, giving us a limit of an indeterminate form quotient. To proceed further we need a way to calculate the probabilities of the intervals; that is, we need a joint distribution function.
Now the joint probability distribution function, $f_{X,Y}$, is such that: $$\mathsf P(x_a\leqslant X\leqslant x_b, y_a \leqslant Y\leqslant y_b) = \int\limits_{x_a}^{x_b} \int\limits_{y_a}^{y_b}f_{X,Y}(x,y)\mathrm{d}y\;\mathrm{d}x$$
So we have:
$$\mathsf P(Y \leqslant y_0 \mid X=x_0) = \lim\limits_{0<h\to 0} \frac{ \int\limits_{x_0}^{x_0+h}\int\limits_{-\infty}^{y_0} f_{X,Y}(x,y)\;\mathrm{d}y\;\mathrm{d}x }{ \int\limits_{x_0}^{x_0+h}\int\limits_{-\infty}^{\infty} f_{X,Y}(x,y)\;\mathrm{d}y\;\mathrm{d}x } $$
Now for any differentiable function $G$: $\quad\int_c^{c+h} G'(z)\operatorname d z = G(c+h)-G(c)$
Hence , we have a limit towards an indeterminate form, so l'Hopital's rule can be applied:
$$\mathsf P(Y \leqslant y_0 \mid X=x_0) = \lim\limits_{0<h\to 0} \frac{ \frac{\mathrm{d}}{\mathrm{d}h} \int\limits_{x_0}^{x_0+h} \int\limits_{-\infty}^{y_0} f_{X,Y}(x,y)\;\mathrm{d}y\;\mathrm{d}x }{ \frac{\mathrm{d}}{\mathrm{d}h}\int\limits_{x_0}^{x_0+h}\int\limits_{-\infty}^{\infty} f_{X,Y}(x,y)\;\mathrm{d}y\;\mathrm{d}x }$$
Now $\frac{\mathrm d\;}{\mathrm d h} (G(c+h)-G(c)) = G'(c+h)$ so, this leaves us with an answer; that if we know the joint probability distribution function (pdf), we can evaluate:
$$\boxed{\begin{align}\mathsf P_{Y\mid X}(y_0\mid x_0) & = \mathsf P(Y \leqslant y_0 \mid X=x_0) \\ & = \dfrac{\int\limits_{-\infty}^{y_0} f_{X,Y}(x_0,y)\;\mathrm{d}y}{\int\limits_{-\infty}^{\infty} f_{X,Y}(x_0,y)\;\mathrm{d}y} \end{align}}$$
Thus we obtain the Cumulative Density Function conditioned on a single real value.
- 129,094
-
1Thanks for your detailed answer. It was so helpful. I think I'm convinced now. – Arya May 09 '14 at 07:39
If the density function is $f(x,y)$ then it is reasonable to look at the conditional cumulative probability
$$P\left(Y \leq \frac{1}{2} | X = 2\right) = \dfrac{\displaystyle \int_{y=-\infty}^{1/2} f(2,y) \, dy}{\displaystyle \int_{y=-\infty}^{\infty} f(2,y) \, dy}$$
provided that the denominator is positive. In effect you have used a conditional density when $x=2$ of $g(y)=\dfrac{f(2,y)}{\int_{y=-\infty}^{\infty} f(2,y) \, dy}$, i.e. the original density constrained and with a normalising factor to make it $1$ when integrated over $y$.
- 157,058
-
Is this a trick or a rule? Since we are not allowed to apply the formula to a point, and suppose that the density function is P(Y|X). – Arya May 06 '14 at 13:11
-
The conditional density function is not $P(Y=y|X=x)$ but $\frac{d}{dy}P(Y\le y|X=x)$ – Henry May 06 '14 at 15:55