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.