[simulations] added random walk

This commit is contained in:
Jan Benda 2020-12-28 21:20:09 +01:00
parent d50b0be404
commit 7b61bd1e85
2 changed files with 41 additions and 2 deletions

View File

@ -46,6 +46,10 @@
% - data analysis skills way beyond basic statistical test are at the
% core of modern neuroscience
% - *understanding* of basic concepts of data analysis concepts is important
% - math is the universal language of natural sciences, including neuroscience.
% it is the most precise way to express relation.
% We therefore expose you to some mathematical equations
% that do not go beyond what you learned at school.
% - most concepts are also quite relevant for the brain itself!
% - modern approaches:
% * open source science (open data, open code, open algorithmns in contrast

View File

@ -160,6 +160,13 @@ corresponding standard deviation equal the inverse rate.
values.
\end{exercise}
\subsection{Uniformly distributed random numbers}
\begin{figure}[t]
Exponential distribution of ISIs.
\end{figure}
The \code{rand()} function returns uniformly distributed random
numbers between zero and one
\begin{equation}
@ -201,12 +208,40 @@ the event does not occur.
probability of $P=0.6$. Count the number of heads.
\end{exercise}
Random walk! Have a figure with a few 1D random walks and the
increasing standard deviation as a sheded area behind.
\subsection{Random walks}
A basic concept for stochastic models is the random walk. A walker
starts at some initial position $x_0$. It then takes steps to the
right, $x_n = x_{n-1} + 1$, with some probability $P_r$ or to the
left, $x_n = x_{n-1} - 1$, with probability $P_l = 1-P_r$.
For a symmetric random walk, the probabilities to step to the left or
to the right are the same, $P_r = P_l = \frac{1}{2}$. The average
position of many walkers is then independent of the iteration step and
equals the initial position $x_0$. The standard deviation of the
walker positions, however, grows with the square root of the number of
iteration steps $n$: $\sigma_{x_n} = \sqrt{n}$.
\begin{figure}[tb]
Have a figure with a few 1D random walks and the increasing standard
deviation as a shaded area behind. And with absorbing boundary.
\end{figure}
The sub-threshold membrane potential of a neuron can be modeled as a
one-dimensional random walk. The thousands of excitatory and
inhibitory synaptic inputs of a principal neuron in the brain make the
membrane potential to randomly step upwards or downwards. Once the
membrane potential hits a firing threshold an action potential is
generated and the membrane potential is reset to the resting
potential. The firing threshold in this context is often called an
``absorbing boundary''. The time it takes from the initial position to
cross the threshold is the ``first-passage time''. For neurons this is
the interspike interval. For symmetric random walks the first-passage
times are again exponentially distributed. ??? Is that so ???
% Gerstein and Mandelbrot 1964
Higher dimensions, Brownian motion.
The gamma distribution (\code{gamrnd()}) phenomenologically describes