\documentclass[12pt,a4paper]{article}
\usepackage{graphicx}
\graphicspath{{eps/}{pdf/}}
\pagestyle{empty}
\oddsidemargin 2.1mm
\textwidth     155mm
\topmargin     -15mm
\textheight    240mm

\def\tabstrut{\rule{0pt}{2.4ex}}

\begin{document}

%-----------------------------------------------------------------------

\noindent
{\bf Artificial Neural Networks and Deep Learning}
\hfill Summer 2018 \\
Christian Borgelt and Christoph Doell \hfill from 2018.05.22

%-----------------------------------------------------------------------

\vskip3ex
\centerline{\bf Exercise Sheet 4}

%-----------------------------------------------------------------------

\subsubsection*{Exercise 15 \quad\rm
                Method of Least Squares/Regression}

Determine the best fit straight line $y = a +bx$ (regression line)
for the following two data sets with the help of the method of least
squares:
\begin{enumerate}\itemsep0pt\parskip0pt
\item[a)] $(-2,0), (0,1), (1,3), (2,5)$
\item[b)] $(-1,3), (1,2), (2,0), (4,-2)$
\end{enumerate}
Draw the data points and the best fit straight line!

%-----------------------------------------------------------------------

\subsubsection*{Exercise 16 \quad\rm
                Method of Least Squares/Regression}

Determine and draw a best fit parabola $y = a +bx +cx^2$ for the data
of Exercise 15a!

%-----------------------------------------------------------------------

\subsubsection*{Exercise 17 \quad\rm
                Exponential Regression}

Radioactive substances decay according to the law
$N(t) = N_0 e^{-\lambda t},$ where $t$ is the time, $\lambda$ is a
substance-specific decay parameter, $N_0$ is the number of particles
at the beginning and $N(t)$ the remaining number of particles of
the substance at time~$t$. With the help of a Geiger-M\"uller counter
the following numbers~$n$ of $\alpha$-particles, which are emitted by
a small probe of a radioactive substance, are counted up to points~$t$
in time:
\begin{center}
\begin{tabular}{|l|r|r|r|r|r|r|r|r|r|}\hline
$t$ (in s) & 0 &  30 &  60 &  90 & 120 & 150 & 180 & 210 & 240%
\tabstrut \\ \hline
$n$        & 0 & 306 & 552 & 655 & 768 & 863 & 901 & 919 & 956%
\tabstrut \\ \hline
\end{tabular}
\end{center}
Each counted $\alpha$-particle indicates the decay of one particle
of the radioactive substance. Determine the half-life of the radioactive
substance! \\[1ex]
Procedure: Determine a best fit curve $n = n_0 (1 -e^{a +bt})$
for the given data points! \\ (Hint: You have to find a transformation
that reduces the problem to determining a regression line;
$n_0 = 1000$.) Even though this yields a value for $a$ that differs
from 0, one may reasonably see $-b$ as an approximation of the decay
parameter~$\lambda$, from which the half-life can be computed.

%-----------------------------------------------------------------------

\subsubsection*{Exercise 18 \quad\rm Logistic Regression}

The following table shows the number of American intercontinental
ballistic missiles (ICBMs) in the 1960s:
\begin{center}
\begin{tabular}{|l|*{10}{r|}}\hline
year, $x$\rule{0pt}{2.4ex} &
1960 & 1961 & 1962 & 1963 & 1964 & 1965 & 1966 & 1967 & 1968 & 1969 \\
\hline
number, $y$\rule{0pt}{2.4ex} &
  18 &   63 &  294 &  424 &  834 &  854 &  904 & 1054 & 1054 & 1054 \\
\hline
\end{tabular}
\end{center}
Find a best fit curve with the help of logistic regression
($Y = 1060$)! \\
Draw the original data and sketch the curve
$y = \frac{1060}{1 +e^{-(a +bx)}}$!

%-----------------------------------------------------------------------

\end{document}
