3
$\begingroup$

I would like to know how the joint probability density function $p(b,r,\sigma^2)$ can be calculated for the following graph. Random variable $b$ is a latent binary variable, and random variable $\sigma^2$ is Inverse-Gamma. Random variable $r$ is observed and assumed Gaussian with two means ($\mu_0 = -1$ and $\mu_1 = 1$). In other words, $r$ can be generated from a Gaussian with mean = -1 or it can be generated from a Gaussian with mean 1.

$\sigma^2$ represents a common variance between the two Gaussians.

Bayes network

$\endgroup$
  • $\begingroup$ What happens when you try to factorize this graph? $\endgroup$ – shadowtalker Sep 26 '18 at 17:58
  • $\begingroup$ So my understanding of probability density function is that in 1-D single variable $p(r)dr$ is the probability of sampling between $r$ and $r+dr$ where $r$ is a continuous variable as a binary variable, $b$ can equal 0 with probability $\pi$ and 1 with probability $1-\pi$ seems to me that $p(r,b,\sigma^2) = \left(\pi\delta_{\beta,0}+(1-\pi)\delta_{\beta,1}\right)p(r,\sigma^2)$ $\endgroup$ – phdmba7of12 Sep 26 '18 at 18:02
1
$\begingroup$

This graph can be factorized according to the usual rules of Bayesian graphs:

$$ p(b,r,\sigma^2) = p(r|b,\sigma^2)p(b)p(\sigma^2) $$

If you want the marginal distribution $p(r, \sigma^2)$ (that is, averaged over possible $b$ outcomes), then you have the familiar mixture density:

$$ p(r,\sigma^2) = \Pr(b=1)p(r|b=1,\sigma^2)p(\sigma^2) + \Pr(b=0)p(r|b=0,\sigma^2)p(\sigma^2) $$

I'm abusing notation pretty badly here. I can clarify if any of it doesn't make sense.

$\endgroup$
  • $\begingroup$ what will $p(r|b,\sigma^2)$ be, when the means $\mu_0 = -1$ and $\mu_1 = 1$ are known and the variance unknown? $\endgroup$ – fountain3 Jan 15 at 18:10
  • $\begingroup$ @fountain3 you are conditioning on $\sigma^2$, so it must be known. Just write $\sigma^2$. For $\mu$, you can write $\mu_b$, since $b$ is also known. $\endgroup$ – shadowtalker Jan 16 at 20:08
  • $\begingroup$ Terribly sorry I meant to write $p(r,\sigma^2|b)$. If $r$ is Gaussian, $\sigma^2$ is Gamma, and $b$ is binary, I need to get the expression for $p(r,\sigma^2|b)$. $\endgroup$ – fountain3 Jan 17 at 8:06
  • $\begingroup$ @fountain3 just plug in $\mu_b$? $\endgroup$ – shadowtalker Jan 17 at 15:00
  • $\begingroup$ If I use the Normal-Gamma equation from wikipedia: en.wikipedia.org/wiki/Normal-gamma_distribution what should I use for the parameters of the Gamma part? $\endgroup$ – fountain3 Jan 17 at 15:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.