Fabian projects done

This commit is contained in:
Fabian Sinz
2014-11-01 13:54:11 +01:00
parent f088ec9932
commit cc0d00a621
7 changed files with 95 additions and 5 deletions

View File

@@ -369,12 +369,12 @@ incubation. The following plot depicts the mean thymus gland weights in (mg):
the the first $80$ datapoints, and repeat the following steps
$m=500$ times:
\begin{enumerate}
\item draw $50$ data points from $x$ with replacement
\item draw $80$ data points from $x$ with replacement
\item compute their mean and store it
\end{enumerate}
Look at the standard deviation of the computed means.
\item Compare the result to the standard deviation of the original
$50$ data points and the standard error.
$80$ data points and the standard error.
\end{itemize}
\end{task}
\end{frame}

View File

@@ -1,4 +1,5 @@
function ll = invg_loglikelihood(x, p)
mu = p(1);
lambda = p(2);
ll = mean(.5*(log(lambda) - log(2*pi) - 3*log(x)) - lambda*(x-mu).^2./(2*mu^2*x));
ll = .5*(log(lambda) - log(2*pi) - 3*log(x)) - ...
lambda*(x-mu).^2./(2*mu^2*x);

View File

@@ -1,4 +1,4 @@
function [err, grad] = lserr(param, x, y)
function [err, grad] = lserr(x, y, param)
err = mean( (param(1)*x + param(2) - y).^2 );
if nargout == 2