[likelihood] fixed exercise
This commit is contained in:
parent
f111d20976
commit
4046210b43
@ -51,10 +51,10 @@ of the standard deviation.
|
|||||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
\question \qt{Maximum-likelihood estimator of a line through the origin}
|
\question \qt{Maximum-likelihood estimator of a line through the origin}
|
||||||
In the lecture we derived the following equation for an
|
In the lecture we derived the following equation for an
|
||||||
maximum-likelihood estimate of the slope $\theta$ of a straight line
|
maximum-likelihood estimate of the slope $m$ of a straight line
|
||||||
through the origin fitted to $n$ pairs of data values $(x_i|y_i)$ with
|
through the origin fitted to $n$ pairs of data values $(x_i|y_i)$ with
|
||||||
standard deviation $\sigma_i$:
|
standard deviation $\sigma_i$:
|
||||||
\[\theta = \frac{\sum_{i=1}^n \frac{x_i y_i}{\sigma_i^2}}{ \sum_{i=1}^n
|
\[ m = \frac{\sum_{i=1}^n \frac{x_i y_i}{\sigma_i^2}}{ \sum_{i=1}^n
|
||||||
\frac{x_i^2}{\sigma_i^2}} \]
|
\frac{x_i^2}{\sigma_i^2}} \]
|
||||||
\begin{parts}
|
\begin{parts}
|
||||||
\part \label{mleslopefunc} Write a function that takes two vectors
|
\part \label{mleslopefunc} Write a function that takes two vectors
|
||||||
@ -105,7 +105,7 @@ normally-distributed data. Such parameter need to be estimated
|
|||||||
numerically by means of maximum-likelihood from the data.
|
numerically by means of maximum-likelihood from the data.
|
||||||
|
|
||||||
Let us demonstrate this approach by means of data that are drawn from a
|
Let us demonstrate this approach by means of data that are drawn from a
|
||||||
gamma distribution,
|
gamma distribution.
|
||||||
\begin{parts}
|
\begin{parts}
|
||||||
\part Find out which \code{matlab} function computes the
|
\part Find out which \code{matlab} function computes the
|
||||||
probability-density function of the gamma distribution.
|
probability-density function of the gamma distribution.
|
||||||
@ -123,7 +123,7 @@ gamma distribution,
|
|||||||
\part Compute and plot a properly normalized histogram of these
|
\part Compute and plot a properly normalized histogram of these
|
||||||
random numbers.
|
random numbers.
|
||||||
|
|
||||||
\part Find out which \code{matlab} function fit a distribution to a
|
\part Find out which \code{matlab} function fits a distribution to a
|
||||||
vector of random numbers according to the maximum-likelihood method.
|
vector of random numbers according to the maximum-likelihood method.
|
||||||
How do you need to use this function in order to fit a gamma
|
How do you need to use this function in order to fit a gamma
|
||||||
distribution to the data?
|
distribution to the data?
|
||||||
|
Reference in New Issue
Block a user