Chain rule in Jeffrey prior

50 Views Asked by At

This is a working in a solution provided by a contributor Understanding the Proof for why Jeffreys' prior is invariant

\begin{align*} \frac{d^2\log p(y | \phi)}{d\phi^2} &= \frac{d}{d\phi} \left( \frac{d \log p(y|\theta(\phi))}{d \theta} \frac{d\theta}{d\phi} \right) \tag{chain rule}\\ &= \left(\frac{d^2 \log p(y|\theta(\phi))}{d \theta d\phi}\right)\left( \frac{d\theta}{d\phi}\right) + \left(\frac{d \log p(y|\theta(\phi))}{d \theta}\right) \left( \frac{d^2\theta}{d\phi^2}\right) \tag{prod. rule} \\ &= \left(\frac{d^2 \log p(y|\theta(\phi))}{d \theta^2 }\right)\left( \frac{d\theta}{d\phi}\right)^2 + \left(\frac{d \log p(y|\theta(\phi))}{d \theta}\right) \left( \frac{d^2\theta}{d\phi^2}\right) \tag{chain rule} \end{align*}

I fail to understand how the first term in the last line (chain rule) came about. Any help is appreciated.

1

There are 1 best solutions below

1
On BEST ANSWER

Yeah, the order of $\mathrm d\theta~\mathrm d\phi$ derivations is a bit confusing there.

Let's remove some distractions, so that we may see clearer how it works.

$$\begin{align} \dfrac{\mathrm d^2 f}{\mathrm d\phi~^2} &= \dfrac{\mathrm d ~~}{\mathrm d\phi}\left[\dfrac{\mathrm d f}{\mathrm d \theta}\cdot\dfrac{\mathrm d \theta}{\mathrm d \phi}\right] \tag {Chain Rule}\\&=\left(\dfrac{\mathrm d ~~}{\mathrm d\phi}\dfrac{\mathrm d f}{\mathrm d\theta}\right)\cdot\dfrac{\mathrm d \theta}{\mathrm d \phi}+\dfrac{\mathrm df}{\mathrm d \theta}\cdot\left(\dfrac{\mathrm d~~}{\mathrm d\phi}\dfrac{\mathrm d\theta}{\mathrm d \phi}\right)\tag{Product Rule}\\&=\left(\dfrac{\mathrm d~~}{\mathrm d\theta}\dfrac{\mathrm d f}{\mathrm d \theta}\cdot\dfrac{\mathrm d\theta}{\mathrm d \phi}\right)\cdot\dfrac{\mathrm d\theta}{\mathrm d \phi}+\dfrac{\mathrm d f}{\mathrm d \theta}\cdot\dfrac{\mathrm d^2\theta }{\mathrm d \phi~^2}\tag{Chain Rule}\\&=\dfrac{\mathrm d^2 f}{\mathrm d \theta~^2}\cdot\left(\dfrac{\mathrm d\theta}{\mathrm d \phi}\right)^2+\dfrac{\mathrm d f}{\mathrm d \theta}\cdot\dfrac{\mathrm d^2\theta}{\mathrm d \phi~^2} \end{align}$$