# conditional distribution question

I have a joint distribution which factorizes as follows:

$$P(y, w, \beta) = P(y|\beta, w) P(w) P(\beta)$$

Now, I want to write the conditional distribution for $P(w|y, \beta)$, so this should be written as:

$$P(w|y, \beta) = \frac{P(y, w, \beta)}{P(y, \beta)} = \frac{P(y|\beta, w) P(w) P(\beta)}{P(y|\beta) P(\beta)} \propto P(y|\beta, w) P(w)$$

I am not sure of the last step but I am guessing the denominator does not depend on $w$, we can treat it like a constant. My question is whether I can find the maxima for $P(w|y, \beta)$ by finding the maxima of $P(y|\beta, w) P(w)$ i.e. treat the $P(y|\beta)$ denominator as a constant. I am trying to do this in the context of figuring out some variational bayes updates where I need to compute some expectations and need the conditional distributions to do that.

• Correct: $p(w\mid y,\beta)\propto p(w,y,\beta)\propto p(y\mid\beta,w)p(w)$, which is a mnemonic for "discard" things that do not depend on $w$. Normalize at the end, if necessary.
– Zen
Feb 25, 2015 at 22:11
• Luca you don't seem to actually ask question here, just make statements. What exactly do you need? Mar 6, 2015 at 1:53
• I was wondering if I could find the maxima of $P(w|y, \beta)$ by optimising just $P(y|\beta, w)P(w)$. Sorry I was not clear with that.
– Luca
Mar 6, 2015 at 7:32

I was wondering if I could find the maxima of $$P(w|y, \beta)$$ by optimizing just $$P(y|\beta, w) P(w)$$.
You can because you are doing a discriminate task and you don't need to care about the denominator which is a constant for every element you are going to compare. If you are doing a generative task you need to calculate the exact result of the $$P(w|y, \beta)$$ and hence to work out the $$p(y, \beta)$$.
So in your case $$P(w|y, \beta) = \frac{P(y, w, \beta)}{P(y, \beta)} = P(y|\beta, w) P(w) * \frac{P(\beta)}{P(y, \beta)} \propto P(y|\beta, w) P(w)$$