[simulations] first text
This commit is contained in:
parent
31cb4a74ae
commit
7ba1c83620
@ -18,12 +18,4 @@
|
||||
|
||||
\include{simulations}
|
||||
|
||||
\section{TODO}
|
||||
\begin{itemize}
|
||||
\item draw (and plot) random numbers
|
||||
\item draw (and plot) random functions
|
||||
\item euler forward, odeint
|
||||
\item introduce derivatives which are also needed for fitting (move box from there here)
|
||||
\end{itemize}
|
||||
|
||||
\end{document}
|
||||
|
@ -4,15 +4,45 @@
|
||||
\label{simulationschapter}
|
||||
\exercisechapter{Simulations}
|
||||
|
||||
Why simulations?
|
||||
|
||||
- Understand basic concepts (as we do in the following chapters)
|
||||
- Test your data analysis algorithms
|
||||
- Explore
|
||||
- Dynamical systems
|
||||
The real power of computers for data analysis is the possibility to
|
||||
run simulations. Experimental data of almost unlimited sample sizes
|
||||
can be simulated in no time. This allows to explore basic concepts,
|
||||
like the ones we introduce in the following chapters, with well
|
||||
controlled data sets that are free of confounding pecularities of real
|
||||
data sets. With simulated data we can also test our own analysis
|
||||
functions. More importantly, by means of simulations we can explore
|
||||
possible outcomes of our planned experiments before we even started
|
||||
the experiment or we can explore possible results for regimes that we
|
||||
cannot test experimentally. How dynamical systems, like predator-prey
|
||||
interactions or the activity of neurons, evolve in time is a central
|
||||
application for simulations. Only with the availability of computers
|
||||
in the second half of the twentieth century was the exciting field of
|
||||
nonlinear dynamical systems pushed forward. Conceptually, many kinds
|
||||
of simulations are very simple and are implemented in a few lines of
|
||||
code.
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
\section{Univariate data}
|
||||
The most basic simulation is to draw random numbers from a given
|
||||
distribution. This simulates repeated measurements of some quantity
|
||||
(e.g., weight of tigers or firing rate of a neuron). That is we take
|
||||
samples from a statistical population. Doing so we must specify from
|
||||
which probability distribution the data should originate from and what
|
||||
are the parameters (i.e. mean, standard deviation, ...) of that
|
||||
distribution.
|
||||
|
||||
For drawing numbers from a normal distribution we use the
|
||||
\code{randn()} function. This function returns normally distributed
|
||||
numbers with zero mean and unit standard deviation. For changing the
|
||||
standard deviation we need to multiply the returned data values with
|
||||
the required standard deviation. For changing the mean we just add the
|
||||
desired mean to the random numbers.
|
||||
\begin{equation}
|
||||
x_i = \mu + \sigma \xi_i
|
||||
\end{equation}
|
||||
|
||||
|
||||
|
||||
draw (and plot) random numbers
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
Reference in New Issue
Block a user