[likelihood] better exercise 2
This commit is contained in:
parent
5d46493c59
commit
fe7ae4a67b
@ -136,12 +136,13 @@ standard deviation $\sigma_i$:
|
|||||||
\lstinputlisting{mleslope.m}
|
\lstinputlisting{mleslope.m}
|
||||||
\end{solution}
|
\end{solution}
|
||||||
|
|
||||||
\part Write a script that generates data pairs that scatter around a
|
\part Write a script that generates data pairs that scatter with a normal
|
||||||
line through the origin with a given slope. Use the function from
|
distribution around a line through the origin with a given
|
||||||
\pref{mleslopefunc} to compute the slope from the generated data.
|
slope. Use the function from \pref{mleslopefunc} to compute the
|
||||||
Compare the computed slope with the true slope that has been used to
|
slope from the generated data. Compare the computed slope with the
|
||||||
generate the data. Plot the data together with the line from which
|
true slope that has been used to generate the data. Plot the data
|
||||||
the data were generated as well as the maximum-likelihood fit.
|
together with the line from which the data were generated as well as
|
||||||
|
the maximum-likelihood fit.
|
||||||
\begin{solution}
|
\begin{solution}
|
||||||
\lstinputlisting{mlepropfit.m}
|
\lstinputlisting{mlepropfit.m}
|
||||||
\includegraphics[width=1\textwidth]{mlepropfit}
|
\includegraphics[width=1\textwidth]{mlepropfit}
|
||||||
|
Reference in New Issue
Block a user