# Probability mass function and conditional probabilities

If $p_X(k)$ and $p_{Y|X}(y|k)$ are given, how can we calculate $p_Y(y)$? We cannot assume that $p_Y(y)$ and $p_X(k)$ are independent.

I know that $p_X(k) \cdot p_{Y|X}(y|k) = p_{Y,X}(y,k)$ but how can I isolate $p_Y(y)$?

-
What do you mean by $p_X(k)$ and $p_{X|Y}(y|k)$? What probabilities (or densities) of what exactly are those? Of $X$ respectively $X|Y$? Of $k$? – fgp Oct 11 '12 at 22:23
X and Y are random variables. y and k are the values that you put into the probability mass functions. – Dimme Oct 11 '12 at 22:27
Also there is a typo by you, $p_X(x) \cdot p_{Y|X}(y|x)=p_{X,Y}(x,y)$ and not the way you wrote. – TheJoker Oct 11 '12 at 22:28
Thanks I corrected it – Dimme Oct 11 '12 at 22:28
Just integrate the product w.r.t. $x$ to getthe answer. It is standard way to find marginal density from joint density. – TheJoker Oct 11 '12 at 22:30

Since you are dealing with discrete random variables, the way you find $p_Y(y)$ is using summations:

$$p_Y(y) = \sum_k p_{Y,X}(y,k) = \sum_k p_{Y\mid X}(y\mid k)p_X(k)$$

where the sum on the right should be recognized as coming from the law of total probability. Note that $p_{Y\mid X}(y\mid k)$ is the conditional probability of the event $A = \{Y = y\}$ given that the event $B_k = \{X = k\}$ has occurred, while $p_X(k) = P\{X = k\}$ is just $P(B_k)$. The law of total probability tells us that

$$P(A) = \sum_k P(A\mid B_k)P(B_k)$$

where the events $B_k$ are a (countable) partition of the sample space.

-

Hint:

Use $$p_Y(y)=\int_x p_{Y,X}(y,x) dx = \int_x p_X(x) \cdot p_{Y|X}(y|x) dx$$

EDIT:

For discrete case, just replace integration by summation as pointed out by Dilip.

P.S: How come you knew that he meant discrete and not continuous random variable??

-
The title of the question is "Probability mass function and conditional probabilities" and so I assumed that the OP meant to ask about discrete random variables. – Dilip Sarwate Oct 12 '12 at 1:27
Thanks.You have keen sense of observation. – TheJoker Oct 13 '12 at 13:08