Bayesian Interpretation

Warning

This page is not yet finished.

Suppose you are interested in some parameters x, y, and z, but you can’t measure them directly. However, you can measure some functions of these variables up to some normally-distributed uncertainty:

\[\begin{split}A(x,y,z) &= 1.5 \pm 0.2 \\ B(x,y,z) &= 2.3 \pm 0.15 \\ C(x,y,z) &= -0.5 \pm 0.05\end{split}\]

This kind of problem pops up a lot in astronomy. For example, we often cannot measure a star’s mass, metallicity, etc. directly, but we can it’s brightness at different wavelengths, which depend on the those unmeasured properties in complicated ways. Complicating matters, these functions can be expensive to compute, so it can help to run the models across a grid of input values and interpolate them. Starlord is focused on using these grids (see Grid Management), so let’s pretend you’ve already set up a grid that looks like this:

\[\mathrm{ExampleGrid} (x, y, z \rightarrow A, B, C)\]

A Bayesian interpretation of this situation is that we have observed random variables \(A_\mathrm{obs} = 1.5\), \(B_\mathrm{obs} = 2.3\), \(C_\mathrm{obs} = -0.5\), which were generated from a normal distribution centered on their true values. These true values were in turn generated exactly from their functions of x, y, and z . If our observations are independent, the likelihood of obtaining these observations given the model parameters is:

\[p(A_\mathrm{obs}, B_\mathrm{obs}, C_\mathrm{obs} | x, y, z) = \mathcal{N}(A(x,y,z), \sigma_A) \times \mathcal{N}(B(x,y,z), \sigma_B) \times \mathcal{N}(C(x,y,z), \sigma_C)\]

This is really just restating things in fancy stats notation. Notice that there are three multiplicative terms here, one for each observation.

Still, what we really want is the probability distributions for x, y, and z, given our observations. Bayes Theorem gets us there:

\[p(x, y, z | A_\mathrm{obs}, B_\mathrm{obs}, C_\mathrm{obs}) \propto p(x, y, z | A_\mathrm{obs}, B_\mathrm{obs}, C_\mathrm{obs}) \times p(x, y, z)\]

That is, the posterior probability is proportional to the likelihood times the prior. Assuming our priors are independent, we can split them up and write the posterior as:

\[\begin{split}p(x, y, z | A_\mathrm{obs}, B_\mathrm{obs}, C_\mathrm{obs}) \propto\; &\mathcal{N}(A(x,y,z), \sigma_A) \times \mathcal{N}(B(x,y,z), \sigma_B) \times \mathcal{N}(C(x,y,z), \sigma_C) \\ &\times p(x) \times p(y) \times p(z)\end{split}\]

So in the end our model was simple enough that we’re just multiplying the three likelihood terms and the three prior terms. Now we just need to sample the distribution.