This commit is contained in:
Jan Grewe 2019-10-15 17:53:11 +02:00
commit 9e661f1951
2 changed files with 39 additions and 38 deletions

View File

@ -9,8 +9,8 @@ pythonplots : $(PYPDFFILES)
$(PYPDFFILES) : %.pdf: %.py
echo $$(which python)
#python3 $<
python $<
python3 $<
#python $<
cleanpythonplots :
rm -f $(PYPDFFILES)

View File

@ -4,60 +4,61 @@
\chapter{\tr{Maximum likelihood estimation}{Maximum-Likelihood-Sch\"atzer}}
\label{maximumlikelihoodchapter}
\selectlanguage{ngerman}
\selectlanguage{english}
In vielen Situationen wollen wir einen oder mehrere Parameter $\theta$
einer Wahrscheinlichkeitsverteilung sch\"atzen, so dass die Verteilung
die Daten $x_1, x_2, \ldots x_n$ am besten beschreibt.
\determ{Maximum-Likelihood-Sch\"atzer} (\enterm{maximum likelihood
estimator}, \determ[mle|see{Maximum-Likelihood-Sch\"atzer}]{mle})
w\"ahlen die Parameter so, dass die Wahrscheinlichkeit, dass die Daten
aus der Verteilung stammen, am gr\"o{\ss}ten ist.
There are situations in which we want to estimate one or more
parameters $\theta$ of a probability distribution that best describe
the data $x_1, x_2, \ldots x_n$. \enterm{Maximum likelihood
estimators} (\determ{Maximum-Likelihood-Sch\"atzer},
\determ[mle|see{Maximum-Likelihood-Sch\"atzer}]{mle}) choose the
parameters such that it maximizes the likelihood of $x_1, x_2, \ldots
x_n$ originating from the distribution.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Maximum Likelihood}
Sei $p(x|\theta)$ (lies ``Wahrscheinlichkeit(sdichte) von $x$ gegeben
$\theta$'') die Wahrscheinlichkeits(dichte)verteilung von $x$ mit dem
Parameter(n) $\theta$. Das k\"onnte die Normalverteilung
Let $p(x|\theta)$ (to be read as ``Probability(density) of $x$ given
$\theta$.'') the probability (density) distribution of $x$ given the
parameters $\theta$. This could be the normal distribution
\begin{equation}
\label{normpdfmean}
p(x|\theta) = \frac{1}{\sqrt{2\pi \sigma^2}}e^{-\frac{(x-\mu)^2}{2\sigma^2}}
\end{equation}
sein mit dem Mittelwert $\mu$ und der Standardabweichung $\sigma$ als
den Parametern $\theta$.
Wenn nun den $n$ unabh\"angigen Beobachtungen $x_1, x_2, \ldots x_n$
die gleiche Wahrscheinlichkeitsverteilung $p(x|\theta)$ zugrundeliegt
(\enterm{i.i.d.} independent and identically distributed), dann ist die
Verbundwahrscheinlichkeit $p(x_1,x_2, \ldots x_n|\theta)$ des
Auftretens der Werte $x_1, x_2, \ldots x_n$, gegeben ein bestimmtes
$\theta$,
defined by the mean ($\mu$) and the standard deviation $\sigma$ as
parameters $\theta$. If the $n$ independent observations of $x_1,
x_2, \ldots x_n$ originate from the same probability density
distribution (\enterm{i.i.d.} independent and identically distributed)
then is the conditional probability $p(x_1,x_2, \ldots x_n|\theta)$ of
observing $x_1, x_2, \ldots x_n$ given the a specific $\theta$,
\begin{equation}
p(x_1,x_2, \ldots x_n|\theta) = p(x_1|\theta) \cdot p(x_2|\theta)
\ldots p(x_n|\theta) = \prod_{i=1}^n p(x_i|\theta) \; .
\end{equation}
Andersherum gesehen ist das die \determ{Likelihood}
(\enterm{likelihood}) den Parameter $\theta$ zu haben, gegeben die
Me{\ss}werte $x_1, x_2, \ldots x_n$,
Vice versa, is the \enterm{likelihood} of the parameters $\theta$
given the observed data $x_1, x_2, \ldots x_n$,
\begin{equation}
{\cal L}(\theta|x_1,x_2, \ldots x_n) = p(x_1,x_2, \ldots x_n|\theta) \; .
\end{equation}
Beachte, dass die Likelihood ${\cal L}$ keine Wahrscheinlichkeit im engeren Sinne ist, da sie sich nicht zu Eins aufintegriert ($\int {\cal L}(\theta|x_1,x_2, \ldots x_n) \, d\theta \ne 1$).
Note: the likelihood ${\cal L}$ is not a probability in the
classic sense since it does not integrate to unity ($\int {\cal
L}(\theta|x_1,x_2, \ldots x_n) \, d\theta \ne 1$).
Wir sind nun an dem Wert des Parameters $\theta_{mle}$ interessiert, der die
Likelihood maximiert (Maximum-Likelihood Estimate ``mle''):
When applying maximum likelihood estimations we are interested in the
parameters $\theta$ that maximize the likelihood (``mle''):
\begin{equation}
\theta_{mle} = \text{argmax}_{\theta} {\cal L}(\theta|x_1,x_2, \ldots x_n)
\end{equation}
$\text{argmax}_xf(x)$ bezeichnet den Wert des Arguments $x$ der Funktion $f(x)$, bei
dem $f(x)$ ihr globales Maximum annimmt. Wir suchen also den Wert von $\theta$
bei dem die Likelihood ${\cal L}(\theta)$ ihr Maximum hat.
An der Stelle eines Maximums einer Funktion \"andert sich nichts, wenn
die Funktionswerte mit einer streng monoton steigenden Funktion
transformiert werden. Aus numerischen und gleich ersichtlichen mathematischen
Gr\"unden wird meistens das Maximum der logarithmierten Likelihood
(\determ{log-Likelihood}, \enterm{log-likelihood}) gesucht:
$\text{argmax}_xf(x)$ denotes the values of the argument $x$ of the
function $f(x)$ at which the function $f(x)$ reaches its global
maximum. Thus, we search the value of $\theta$ at which the
likelihood ${\cal L}(\theta)$ reaches its maximum.
The position of a function's maximum does not change when the values
of the function are transformed by a strictly monotonously rising
function such as the logarithm. For numerical and reasons that we will
discuss below, we commonly search for the maximum of the logarithm of
the likelihood (\enterm{log-likelihood}):
\begin{eqnarray}
\theta_{mle} & = & \text{argmax}_{\theta}\; {\cal L}(\theta|x_1,x_2, \ldots x_n) \nonumber \\
& = & \text{argmax}_{\theta}\; \log {\cal L}(\theta|x_1,x_2, \ldots x_n) \nonumber \\
@ -66,7 +67,7 @@ Gr\"unden wird meistens das Maximum der logarithmierten Likelihood
\end{eqnarray}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Beispiel: Das arithmetische Mittel}
\subsection{Example: the arithmetic mean}
Wenn die Me{\ss}daten $x_1, x_2, \ldots x_n$ der Normalverteilung
\eqnref{normpdfmean} entstammen, und wir den Mittelwert $\mu=\theta$ als