I am following along from a proof of the central limit theorem using moment generating function from this lecture.
At one stage, we are taking derivatives of the moment generating function of an r.v. $X$, $M_X(yt) = E[e^{Xyt}]$ w.r.t $y$.
The first deriative makes sense,
$M_x(yt) = M_x(yt)'t$
by the chain rule.
Now, if we want to take the derivative again, in the lecture by the chain rule again:
$$\left(M_X(yt)'t \right)' = M_X(yt)''t^2$$
This I don't understand, taking the first derivative as a function, $g(M_X(yt))$, then should the second deriative not be (again by the chain rule):
$$g(M_X(yt)t) = g(M_X(yt))' M_X(yt)' tt = M_X(yt)''M_X(yt) t^2$$
Why is this wrong?
[EDIT]
Further to Mikes comment, I thought it would be useful to write it out the problem with full reference of what the derivative is w.r.t
$$ M_X(yt)' = \dfrac{M_X(yt)}{dy} = \dfrac{M_X(yt)}{d(yt)}\dfrac{d(yt)}{dy} = \dfrac{dM_X(yt)}{d(yt)}t $$
$$ M_X(yt)'' = t \dfrac{d \bigg( \dfrac{dM_X(yt)}{d(yt)}\bigg)}{dy} $$
This is the step I am having trouble conceptualising. I guess now, we are asking how the change in the function $M_X(yt)$ as $yt$ changes, itself changes as $y$ changes.
In this case, we care how a small change in $y$ changes $yt$ and then, now a small change in $yt$ changes the first derivative of $M_X(yt)$ w.r.t $y$.
$$ M_X(yt)'' = t \dfrac{d \bigg( \dfrac{dM_X(yt)}{d(yt)}\bigg)}{d(yt)} \dfrac{d(yt)}{dy} = M_X(yt)''t^2 $$
If this conceptualisation is correct, does anyone have further reading or way of building intuitive / proof of it?
You are way over-thinkning this. You are correct that $$ \frac{d}{dy}[M_X(yt)]=M_X'(yt)\cdot t\tag1 $$ Now, take the derivative with respect to $y$, again. $$ \begin{align} \frac{d^2}{dy^2} M_X(yt) &= \frac{d}{dy}\left[\frac{d}{dy} M_X(yt)\right] \\&=\frac{d}{dy}\left[ M_X'(yt)\cdot t\right]\tag{substitute (1)} \\&= t\cdot \frac{d}{dy}[M_X'(yt)] \tag{$t$ is constant w/r.t. $y$} \\&= t\cdot \frac{d}{dy}[ty] \cdot M_X''(yt)\tag{chain rule} \\&= t^2 M_X''(yt) \end{align} $$ Let me be crystal clear about the chain rule step. The chain rule says that $$ \frac{d}{dy} f(g(y))=g'(y)\cdot f'(g(y)) $$ I am applying this with $f(y)=M_X'(y)$ and $g(y)=yt$. By defintion of the second derivative, $$f'(y)=[M_X'(y)]'=M_X''(y).$$