Question on the Bayesian equation for $ p(w|y,x)$

77 Views Asked by At

I'm new to this topic.

Suppose that

  • $ f(x) = x^Tw$, where both $x$ and $w$ are independent random variables with known probability density function.

  • $ y(x) = f(x) + \epsilon $ where $ \epsilon \sim N(0, \sigma^2_n)$, and $\epsilon$ is independent of $x$ and $w$.

I would like to show that $$ p(w|y,x) = \frac{p(y|x,w) p(w)}{p(y|x)}. $$

Here is what I have tried:

problem equation

1

There are 1 best solutions below

3
On BEST ANSWER

We have $$p(x,y,w) = p(w | x ,y) p(x,y) = p(w | x ,y) p(y|x) p(x) $$ and because $w$ and $x$ are independent $p(w|x) = p(w)$, and it holds that $$ p(x,y,w) = p(y | x ,w) p(w|x) p(x) = p(y | x ,w) p(w) p(x) $$

Therefore, equating the right hand sides, you get the desired expression.