How to fit a set of parametrized data to a parametrized distribution? I have a time series $d_i(a)$ which depends on the parameter $a$. On the other hand, I have a sequence of normal distributions $\mathcal{N}(0,Q_i(a))$, where the variance $Q_i$ depends on time and depends on the parameter $a$. How do I estimate $a$ so that $d_i\sim \mathcal{N}(0,Q_i)$?
 A: You can just use a maximum likelihood estimator (MLE) $\hat a=\hat a_{\text{MLE}}$ of $a$.
Since you do not say anything about the dependence between the $d_i(a)$'s, let us assume they are independent. Let $X_i:=d_i(a)$ for $i=1,\dots,n$. Then the joint likelihood of the $d_i(a)$'s is
\begin{equation*}
    L(a)=(2\pi)^{-n/2}\prod_{i=1}^n \Big(Q_i(a)^{-1/2}\;\exp\Big(-\frac{X_i^2}{2Q_i(a)}\Big)\Big), 
\end{equation*}
which we want to maximize in $a$. This is equivalent to maximizing
\begin{equation*}
    \ell(a):=\ln L(a)+\frac n2\,\ln(2\pi)=-\frac12\,\sum_{i=1}^n \Big(\ln Q_i(a)+\frac{X_i^2}{Q_i(a)}\Big) 
\end{equation*}
in $a$.
If the set (say $A$) of all possible values of $a$ is a subset of the real line and if
the maximum of $L(a)$ is attained at a point $a_*$ in the interior of $A$ and if the functions $Q_i$ are differentiable in a neighborhood of $a_*$, then $a_*$ is a root of the equation
\begin{equation*}
    0=-2\ell'(a)=\sum_{i=1}^n \Big[\Big(\frac{1}{Q_i(a)}-\frac{X_i^2}{Q_i(a)^2}\Big)Q_i'(a)\Big]
\end{equation*}
in $a$.
For instance, if $A=(0,\infty)$ and $Q_i(a)=ia$ for $a\in A$, then $\hat a=a_*=\frac1n\,\sum_{i=1}^n \frac{X_i^2}i$.
