# Conditional probability of integer-valued random variables: (solution checking)

• Dec 5th 2011, 06:25 PM
I-Think
Conditional probability of integer-valued random variables: (solution checking)
Suppose $X$ and $Y$ are both integer-valued random variables. Let

$p(i|j)=P[X=i|Y=j], q(j|i)=P[Y=j|X=i]$

Show that $P(X=i,Y=j) = \frac{p(i|j)}{\sum_{i}\frac{(p(i|j)}{q(j|i)}}$

Solution

$p(i|j)=P[X=i|Y=j]=\frac{P[X=i,Y=j]}{P[Y=j]}$
$P[X=i,Y=j]=P[Y=j]p(i|j)$

Consider
$\frac{p(i|j)}{q(j|i)}=\frac{P[X=i]}{P[Y=j]}$
So
$\sum_{i}\frac{p(i|j)}{q(j|i)}=\sum_{i}\frac{P[X=i]}{P[Y=j]}=\frac{1}{P[Y=j]}\sum_{i}P[X=i]}=\frac{1}{P[Y=j]}$ as $\sum_{i}P[X=i]}=1$
So
$P[Y=j]=\frac{1}{\sum_{i}\frac{(p(i|j)}{q(j|i)}}$

So our result is proven
$P(X=i,Y=j) = \frac{p(i|j)}{\sum_{i}\frac{(p(i|j)}{q(j|i)}}$
• Dec 6th 2011, 11:47 AM
Moo
Re: Conditional probability of integer-valued random variables: (solution checking)
Hello,

I corrected some LaTeX errors and a typo in the way you defined q (it's the conditional probability, not the joint probability as you initially wrote). And your solution is perfect :p