User:Stellar-oscillation/sandbox

Our exact log likelihood is

\log{L} = -\frac{N}{2}\log{2\pi}+\frac{1}{2}\log{\det{C(\xi)^{-1}}}-\frac{1}{2}f(\theta)^TC(\xi)^{-1}f(\theta), $$ where $$N$$ is the data size, $$C(\xi)$$ is the covariance matrix between all the data points with $$\xi$$ being the oscillation parameters and $$f(\theta)$$ is the residual of the data after fit with $$\theta$$ being the orbit parameters.

We want to approximate this log likelihood function as a gaussian near the best fit location of all the parameters so we can run importance sampling to determine the evidence integral. We perturb all the parameters (to 2nd order). The 2nd term in the perturbed log likelihood would be

\mathrm{2nd\,\,term} = \frac{1}{2}\log{\det{\left.\left(C^{-1}+\Delta C^{-1}+\Delta^2 C^{-1}\right)\right|_{\xi_0}}}, $$ where $$C^{-1}$$ is just the Hessian. This term only involves $$\xi$$ and $$\xi_0$$ is the best fit for $$\xi$$. For convience, I will write the 2nd term as

\mathrm{2nd\,\,term} = \frac{1}{2}\left[\log{\det{C^{-1}}}+\Delta\left(\log{\det{C^{-1}}}\right)+\Delta^2\left(\log{\det{C^{-1}}}\right)\right], $$ where the details we have already worked out last summer. The 3rd term in the perturbed log likelihood would be

\mathrm{3rd\,\,term} = -\frac{1}{2}\left.\left[f+\Delta f+\Delta^2 f\right]^T\right|_{\theta_0}\left(\left.\left(C^{-1}+\Delta C^{-1}+\Delta^2 C^{-1}\right)\right|_{\xi_0}\right)\left.\left[f+\Delta f+\Delta^2 f\right]\right|_{\theta_0} $$ So overall, the 1st order perturbation is

\mathrm{1st\,\,order} = \frac{1}{2}\Delta\left(\log{\det{C^{-1}}}\right)-\frac{1}{2}\left(f^T\Delta C^{-1}f + 2f^T C^{-1} \Delta f\right) \approx 0, $$ which should be approximately zero. The 2nd order perturbation is

\mathrm{2nd\,\,order} = \frac{1}{2}\Delta^2\left(\log{\det{C^{-1}}}\right) - \frac{1}{2}\left(f^T\Delta^2 C^{-1}f + 2f^T C^{-1} \Delta^2 f + \Delta f^T C^{-1}\Delta f + 2f^T\Delta C^{-1} \Delta f \right). $$