(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
[[Category:ECE600]]
 
[[Category:ECE600]]
 
[[Category:Lecture notes]]
 
[[Category:Lecture notes]]
 +
[[ECE600_F13_notes_mhossain|Back to all ECE 600 notes]]
 +
 +
 +
[[Category:ECE600]]
 +
[[Category:probability]]
 +
[[Category:lecture notes]]
 +
[[Category:slecture]]
  
 
<center><font size= 4>
 
<center><font size= 4>
'''Random Variables and Signals'''
+
[[ECE600_F13_notes_mhossain|'''The Comer Lectures on Random Variables and Signals''']]
 
</font size>
 
</font size>
  
<font size= 3> Topic 15: Conditional Distributions for Two Random Variables</font size>
+
[https://www.projectrhea.org/learning/slectures.php Slectures] by [[user:Mhossain | Maliha Hossain]]
</center>
+
  
  
 +
<font size= 3> Topic 15: Conditional Distributions for Two Random Variables</font size>
 +
</center>
 +
----
 
----
 
----
 
 
==Conditional Distributions==
 
==Conditional Distributions==
  
Line 19: Line 27:
 
<center><math>F_{XY}(x,y|M)=\frac{P(\{X\leq x,Y\leq y\}\cap M)}{P(M)},</math></center>
 
<center><math>F_{XY}(x,y|M)=\frac{P(\{X\leq x,Y\leq y\}\cap M)}{P(M)},</math></center>
  
A special case of great interest is:
+
A special case of great interest is: <br/>
 +
<center><math>\lim_{x\rightarrow\infty}F_{XY}(x,y|\{x_1<X\leq x_2\}) = F_Y(y|x_1<X\leq x_2)</math></center>
 +
 
 +
where x<math>_1</math> < x<math>_2</math>. In this case, we have, assuming P(x<math>_1</math> < X ≤ x<math>_2</math>), <br/>
 +
<center><math>\begin{align}
 +
F_Y(y|x_1<X\leq x_2) &= \frac{P(Y\leq y,x_1<X\leq x_2)}{P(x_1<X\leq x_2)} \\
 +
&= \frac{F_{XY}(x_2,y)-F_{XY}(x_1,y)}{F_X(x_2)-F_X(x_1)}
 +
\end{align}</math></center>
 +
 
 +
What we really want is f_<math>_Y</math>(y|x<math>_1</math> < X ≤ x<math>_2</math>), so we need to differentiate with respect to y. We do not have a name for this partial differentiation and we have not talked about how to find it, but we will need it here.
 +
 
 +
Now, writing <br/>
 +
<center><math>F_{XY}(x,y)=\int_{-\infty}^y\int_{-\infty}^xf_{XY}(x',y')dx'dy'</math></center>
 +
we have <br/>
 +
<center><math>\begin{align}
 +
f_Y(y|x_1<X\leq x_2) &= \frac{\frac{\partial}{\partial y}\left[ \int_{-\infty}^{x_2}\int_{-\infty}^yf_{XY}(x,y')dxdy'-\int_{-\infty}^{x_1}\int_{-\infty}^yf_{XY}(x,y')dxdy'\right]}{F_X(x_2)-F_X(x_1)} \\
 +
\\
 +
&=\frac{\int_{-\infty}^{x_2}f_{XY}(x,y)dx-\int_{-\infty}^{x_1}f_{XY}(x,y)dx}{F_X(x_2)-F_X(x_1)}
 +
\end{align}</math></center>
 +
 
 +
<center><math>f_Y(y|x_1<X\leq x_2)=\frac{\int_{x_1}^{x_2}f_{XY}(x,y)dx}{F_X(x_2)-F_X(x_1)}</math></center>
 +
 
 +
But what we really want is f<math>_Y</math>(y|X = x) ∀x ∈ '''R'''. We cannot set x<math>_1</math> = x<math>_2</math> in the above equation, so instead, let <br/>
 +
<center><math> f_Y(y|X=x)=\lim_{\Delta x\rightarrow 0}f_Y(y|x<X\leq x+\Delta x)</math></center>
 +
 
 +
Setting x<math>_1</math> = x and x<math>_2</math> = x + Δx, <br/>
 +
<center><math>f_Y(y|x<X\leq x+\Delta x)=\frac{\int_x^{x+\Delta x}f_{XY}(x',y)dx'}{F_X(x+\Delta x)-F_X(x)}</math></center>
 +
 
 +
Multiplying the denominator and numerator by 1/Δx and taking the limit, <br/>
 +
<center><math>f_Y(y|X=x) = \lim_{\Delta x\rightarrow 0}\frac {\frac{1}{\Delta x}\int_x^{x+\Delta x}f_{XY}(x',y)dx'} {\frac{1}{\Delta x}[F_X(x+\Delta x)-F_X(x)]}</math></center>
 +
 
 +
Now let <br/>
 +
<center><math>f_Y(y|X=x) = \frac{\lim_{\Delta x\rightarrow 0}\frac{1}{\Delta x}[F(x+\Delta x)-F(x)]}{\lim_{\Delta x\rightarrow 0}\frac{1}{\Delta x}[F_X(x+\Delta x)-F_X(x)]}</math></center>
 +
 
 +
The numerator is the derivative of F(x) with respect to x and the denominator is the derivative of F<math>_X</math>(x) with respect to x, so <br/>
 +
<center><math>f_Y(y|X=x) = \frac{f_{XY}(x,y)}{f_X(x)}</math></center>
 +
 
 +
Similarly, <br/>
 +
<center><math>f_X(x|Y=y) = \frac{f_{XY}(x,y)}{f_Y(y)}</math></center>
 +
 
 +
'''Notation''' <br/>
 +
<center><math>f_X(x|Y=y)\equiv f_{X|Y}(x|y) = f(x|y)</math></center>
 +
 
 +
 
 +
Writing two equations above in terms of f<math>_{XY}</math> and setting them equal to each other gives Bayes' formula:<br/>
 +
<center><math>f_{X|Y}(x|y) = \frac{f_{Y|X}(y|x)f_X(x)}{f_Y(y)}</math></center>
 +
 
 +
We also have a '''Total Probability Law''':<br/>
 +
<center><math>\begin{align}
 +
f_Y(y)&=\int_{-\infty}^{\infty}f_{XY}(x,y)dx \\
 +
&=\int_{-\infty}^{\infty}f_{Y|X}(y|x)f_X(x)dx
 +
\end{align}</math></center>
 +
 
 +
So we can write f<math>{X|Y}</math>(x|y) in terms of f<math>{Y|X}</math>(x|y)f<math>_X</math>(x), which can be very useful.
 +
 
 +
Note that if X and Y are independent, we have <br/>
 +
<center><math>\begin{align}
 +
f_{Y|X}(y|x)&=\frac{f_{XY}(x,y)}{f_X(x)} \\
 +
&=\frac{f_X(x)f_Y(y)}{f_X(x)} \\
 +
&=f_Y(y)
 +
\end{align}</math></center>
 +
 
 +
So f<math>{Y|X}</math>(x|y) does not depend on x.
 +
 
 +
 
 +
Summary of three forms of Bayes' formula that we have derived: <br/>
 +
:<math>\bullet P(A|B)=\frac{P(B|A)P(A)}{P(B)}\qquad A,B\in\mathcal F</math>
 +
:Use this form when X and y are discrete with A = {Y = y}, B={X = x}, so<br/>
 +
:<math>\;p_{Y|X}(y|x) =\frac{p_{X|Y}(x|y)p_Y(y)}{p_X(x)}</math>
 +
:where p<math>_{Y|X}</math>(y|x) ≡ P(Y=y|X=x) and p<math>_{X|Y}</math>(x|y) ≡ P(X=x|Y=y) are conditional pdfs.
 +
 
 +
:<math>\bullet P(M|Y=y)=\frac{f_Y(y|M)P(M)}{f_Y(y)}\qquad M\in\mathcal F</math>
 +
:Use this when Y is continuous and X is discrete with M = {X = x}, so
 +
:<math>\;p_{X|Y}(x|y) =\frac{f_{Y|X}(y|x)p_X(x)}{f_Y(y)}</math>
 +
 
 +
:<math>\bullet f_{Y|X}(y|x)=\frac{f_{X|Y}(x|y)f_Y(y)}{f_X(x)}</math>
 +
: Use this when X,Y are both continuous.
 +
 
 +
 
 +
----
 +
 
 +
== References ==
 +
 
 +
* [https://engineering.purdue.edu/~comerm/ M. Comer]. ECE 600. Class Lecture. [https://engineering.purdue.edu/~comerm/600 Random Variables and Signals]. Faculty of Electrical Engineering, Purdue University. Fall 2013.
 +
 
 +
 
 +
----
 +
 
 +
==[[Talk:ECE600_F13_Conditional_Distributions_for_Two_Random_Variables_mhossain|Questions and comments]]==
 +
 
 +
If you have any questions, comments, etc. please post them on [[Talk:ECE600_F13_Conditional_Distributions_for_Two_Random_Variables_mhossain|this page]]
 +
 
 +
 
 +
----
 +
 
 +
[[ECE600_F13_notes_mhossain|Back to all ECE 600 notes]]

Latest revision as of 12:12, 21 May 2014

Back to all ECE 600 notes

The Comer Lectures on Random Variables and Signals

Slectures by Maliha Hossain


Topic 15: Conditional Distributions for Two Random Variables



Conditional Distributions

There are many applications of probability theory where we want to know the probabilistic behavior of a random variable Y given the value of another random variable X. We get this using conditional distributions.

Definition $ \qquad $ For random variables X and Y defined on (S,F,P), the joint cdf of X and Y given an event M ∈ F, with P(M) >0, is

$ F_{XY}(x,y|M)=\frac{P(\{X\leq x,Y\leq y\}\cap M)}{P(M)}, $

A special case of great interest is:

$ \lim_{x\rightarrow\infty}F_{XY}(x,y|\{x_1<X\leq x_2\}) = F_Y(y|x_1<X\leq x_2) $

where x$ _1 $ < x$ _2 $. In this case, we have, assuming P(x$ _1 $ < X ≤ x$ _2 $),

$ \begin{align} F_Y(y|x_1<X\leq x_2) &= \frac{P(Y\leq y,x_1<X\leq x_2)}{P(x_1<X\leq x_2)} \\ &= \frac{F_{XY}(x_2,y)-F_{XY}(x_1,y)}{F_X(x_2)-F_X(x_1)} \end{align} $

What we really want is f_$ _Y $(y|x$ _1 $ < X ≤ x$ _2 $), so we need to differentiate with respect to y. We do not have a name for this partial differentiation and we have not talked about how to find it, but we will need it here.

Now, writing

$ F_{XY}(x,y)=\int_{-\infty}^y\int_{-\infty}^xf_{XY}(x',y')dx'dy' $

we have

$ \begin{align} f_Y(y|x_1<X\leq x_2) &= \frac{\frac{\partial}{\partial y}\left[ \int_{-\infty}^{x_2}\int_{-\infty}^yf_{XY}(x,y')dxdy'-\int_{-\infty}^{x_1}\int_{-\infty}^yf_{XY}(x,y')dxdy'\right]}{F_X(x_2)-F_X(x_1)} \\ \\ &=\frac{\int_{-\infty}^{x_2}f_{XY}(x,y)dx-\int_{-\infty}^{x_1}f_{XY}(x,y)dx}{F_X(x_2)-F_X(x_1)} \end{align} $
$ f_Y(y|x_1<X\leq x_2)=\frac{\int_{x_1}^{x_2}f_{XY}(x,y)dx}{F_X(x_2)-F_X(x_1)} $

But what we really want is f$ _Y $(y|X = x) ∀x ∈ R. We cannot set x$ _1 $ = x$ _2 $ in the above equation, so instead, let

$ f_Y(y|X=x)=\lim_{\Delta x\rightarrow 0}f_Y(y|x<X\leq x+\Delta x) $

Setting x$ _1 $ = x and x$ _2 $ = x + Δx,

$ f_Y(y|x<X\leq x+\Delta x)=\frac{\int_x^{x+\Delta x}f_{XY}(x',y)dx'}{F_X(x+\Delta x)-F_X(x)} $

Multiplying the denominator and numerator by 1/Δx and taking the limit,

$ f_Y(y|X=x) = \lim_{\Delta x\rightarrow 0}\frac {\frac{1}{\Delta x}\int_x^{x+\Delta x}f_{XY}(x',y)dx'} {\frac{1}{\Delta x}[F_X(x+\Delta x)-F_X(x)]} $

Now let

$ f_Y(y|X=x) = \frac{\lim_{\Delta x\rightarrow 0}\frac{1}{\Delta x}[F(x+\Delta x)-F(x)]}{\lim_{\Delta x\rightarrow 0}\frac{1}{\Delta x}[F_X(x+\Delta x)-F_X(x)]} $

The numerator is the derivative of F(x) with respect to x and the denominator is the derivative of F$ _X $(x) with respect to x, so

$ f_Y(y|X=x) = \frac{f_{XY}(x,y)}{f_X(x)} $

Similarly,

$ f_X(x|Y=y) = \frac{f_{XY}(x,y)}{f_Y(y)} $

Notation

$ f_X(x|Y=y)\equiv f_{X|Y}(x|y) = f(x|y) $


Writing two equations above in terms of f$ _{XY} $ and setting them equal to each other gives Bayes' formula:

$ f_{X|Y}(x|y) = \frac{f_{Y|X}(y|x)f_X(x)}{f_Y(y)} $

We also have a Total Probability Law:

$ \begin{align} f_Y(y)&=\int_{-\infty}^{\infty}f_{XY}(x,y)dx \\ &=\int_{-\infty}^{\infty}f_{Y|X}(y|x)f_X(x)dx \end{align} $

So we can write f$ {X|Y} $(x|y) in terms of f$ {Y|X} $(x|y)f$ _X $(x), which can be very useful.

Note that if X and Y are independent, we have

$ \begin{align} f_{Y|X}(y|x)&=\frac{f_{XY}(x,y)}{f_X(x)} \\ &=\frac{f_X(x)f_Y(y)}{f_X(x)} \\ &=f_Y(y) \end{align} $

So f$ {Y|X} $(x|y) does not depend on x.


Summary of three forms of Bayes' formula that we have derived:

$ \bullet P(A|B)=\frac{P(B|A)P(A)}{P(B)}\qquad A,B\in\mathcal F $
Use this form when X and y are discrete with A = {Y = y}, B={X = x}, so
$ \;p_{Y|X}(y|x) =\frac{p_{X|Y}(x|y)p_Y(y)}{p_X(x)} $
where p$ _{Y|X} $(y|x) ≡ P(Y=y|X=x) and p$ _{X|Y} $(x|y) ≡ P(X=x|Y=y) are conditional pdfs.
$ \bullet P(M|Y=y)=\frac{f_Y(y|M)P(M)}{f_Y(y)}\qquad M\in\mathcal F $
Use this when Y is continuous and X is discrete with M = {X = x}, so
$ \;p_{X|Y}(x|y) =\frac{f_{Y|X}(y|x)p_X(x)}{f_Y(y)} $
$ \bullet f_{Y|X}(y|x)=\frac{f_{X|Y}(x|y)f_Y(y)}{f_X(x)} $
Use this when X,Y are both continuous.



References



Questions and comments

If you have any questions, comments, etc. please post them on this page



Back to all ECE 600 notes

Alumni Liaison

has a message for current ECE438 students.

Sean Hu, ECE PhD 2009