\documentclass[12pt]{book}

\input{../../header}

\lstset{inputpath=../code}
\graphicspath{{figures/}}

\typein[\pagenumber]{Number of first page}
\typein[\chapternumber]{Chapter number}
\setcounter{page}{\pagenumber}
\setcounter{chapter}{\chapternumber}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document} 

\input{statistics}

\section{TODO}
\begin{itemize}
\item Proper introduction to probabilities and densities first!
\item Cumulative propability
\item Kernel Histogramms (important for convolved PSTH)!
\end{itemize}

\end{document}



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Statistics}
What is "a statistic"? % dt. Sch\"atzfunktion
\begin{definition}[statistic]
  A statistic (singular) is a single measure of some attribute of a
  sample (e.g., its arithmetic mean value). It is calculated by
  applying a function (statistical algorithm) to the values of the
  items of the sample, which are known together as a set of data.
  
  \source{http://en.wikipedia.org/wiki/Statistic}
\end{definition}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Data types}

\subsection{Nominal scale}
\begin{itemize}
\item Binary
  \begin{itemize}
  \item ``yes/no'',
  \item ``true/false'',
  \item ``success/failure'', etc.
  \end{itemize}
\item Categorial
  \begin{itemize}
  \item cell type (``rod/cone/horizontal cell/bipolar cell/ganglion cell''),
  \item blood type (``A/B/AB/0''),
  \item parts of speech (``noun/veerb/preposition/article/...''),
  \item taxonomic groups (``Coleoptera/Lepidoptera/Diptera/Hymenoptera''), etc.
  \end{itemize}
\item Each observation/measurement/sample is put into one category
\item There is no reasonable order among the categories.\\
  example: [rods, cones] vs. [cones, rods]
\item Statistics: mode, i.e. the most common item
\end{itemize}

\subsection{Ordinal scale}
\begin{itemize}
\item Like nominal scale, but with an order
\item Examples: ranks, ratings
  \begin{itemize}
  \item ``bad/ok/good'',
  \item ``cold/warm/hot'',
  \item ``young/old'', etc.
  \end{itemize}
\item {\bf But:} there is no reasonable measure of {\em distance}
  between the classes
\item Statistics: mode, median
\end{itemize}

\subsection{Interval scale}
\begin{itemize}
\item Quantitative/metric values
\item Reasonable measure of distance between values, but no absolute zero
\item Examples: 
  \begin{itemize}
  \item Temperature in $^\circ$C ($20^\circ$C is not twice as hot as $10^\circ$C)
  \item Direction measured in degrees from magnetic or true north
  \end{itemize}
\item Statistics:
  \begin{itemize}
  \item Central tendency: mode, median, arithmetic mean
  \item Dispersion: range, standard deviation
  \end{itemize}
\end{itemize}

\subsection{Absolute/ratio scale}
\begin{itemize}
\item Like interval scale, but with absolute origin/zero
\item Examples: 
  \begin{itemize}
  \item Temperature in $^\circ$K
  \item Length, mass, duration, electric charge, ...
  \item Plane angle, etc.
  \item Count (e.g. number of spikes in response to a stimulus)
  \end{itemize}
\item Statistics:
  \begin{itemize}
  \item Central tendency: mode, median, arithmetic, geometric, harmonic mean
  \item Dispersion: range, standard deviation
  \item Coefficient of variation (ratio standard deviation/mean)
  \item All other statistical measures
  \end{itemize}
\end{itemize}

\subsection{Data types}
\begin{itemize}
\item Data type selects
  \begin{itemize}
  \item statistics 
  \item type of plots (bar graph versus x-y plot)
  \item correct tests
  \end{itemize}
\item Scales exhibit increasing information content from nominal
  to absolute.\\
  Conversion  ,,downwards'' is always possible
\item For example: size measured in meter (ratio scale) $\rightarrow$
  categories ``small/medium/large'' (ordinal scale)
\end{itemize}

\subsection{Examples from neuroscience}
\begin{itemize}
\item {\bf absolute:}
  \begin{itemize}
  \item size of neuron/brain
  \item length of axon
  \item ion concentration
  \item membrane potential
  \item firing rate
  \end{itemize}

\item {\bf interval:}
  \begin{itemize}
  \item edge orientation
  \end{itemize}

\item {\bf ordinal:}
  \begin{itemize}
  \item stages of a disease
  \item ratings
  \end{itemize}

\item {\bf nominal:}
  \begin{itemize}
  \item cell type
  \item odor
  \item states of an ion channel
  \end{itemize}

\end{itemize}

