new \entermde function for adding terms to both indices

This commit is contained in:
Jan Benda 2019-12-06 08:45:10 +01:00
parent 16df08f9b2
commit 2a2e02b37e
6 changed files with 51 additions and 32 deletions

View File

@ -18,8 +18,9 @@
\section{TODO} \section{TODO}
\begin{itemize} \begin{itemize}
\item Proper introduction of confidence intervals \item This chapter easily covers two lectures:
\item Proper introduction of statistical tests (significance, power, etc.) \item 1. Bootstrapping with a proper introduction of of confidence intervals
\item 2. Permutation test with a proper introduction of statistical tests (dsitrubution of nullhypothesis significance, power, etc.)
\end{itemize} \end{itemize}
\end{document} \end{document}

View File

@ -33,7 +33,7 @@ population. Rather, we draw samples (\enterm{simple random sample}
then estimate a statistical measure of interest (e.g. the average then estimate a statistical measure of interest (e.g. the average
length of the pickles) within this sample and hope that it is a good length of the pickles) within this sample and hope that it is a good
approximation of the unknown and immeasurable true average length of approximation of the unknown and immeasurable true average length of
the population (\endeterm{Populationsparameter}{population the population (\entermde{Populationsparameter}{population
parameter}). We apply statistical methods to find out how precise parameter}). We apply statistical methods to find out how precise
this approximation is. this approximation is.
@ -71,17 +71,18 @@ distribution of average values around the true mean of the population
(\subfigref{bootstrapsamplingdistributionfig}{b}). (\subfigref{bootstrapsamplingdistributionfig}{b}).
Alternatively, we can use \enterm{bootstrapping} Alternatively, we can use \enterm{bootstrapping}
(\determ{Bootstrap-Verfahren}) to generate new samples from one set of (\determ[Bootstrap!Verfahren]{Bootstrapverfahren}) to generate new
measurements (\endeterm{Resampling}{resampling}). From these samples from one set of measurements
bootstrapped samples we compute the desired statistical measure and (\entermde{Resampling}{resampling}). From these bootstrapped samples
estimate their distribution (\endeterm{Bootstrapverteilung}{bootstrap we compute the desired statistical measure and estimate their
distribution}, \subfigref{bootstrapsamplingdistributionfig}{c}). distribution (\entermde{Bootstrap!Verteilung}{bootstrap distribution},
Interestingly, this distribution is very similar to the sampling \subfigref{bootstrapsamplingdistributionfig}{c}). Interestingly, this
distribution regarding its width. The only difference is that the distribution is very similar to the sampling distribution regarding
bootstrapped values are distributed around the measure of the original its width. The only difference is that the bootstrapped values are
sample and not the one of the statistical population. We can use the distributed around the measure of the original sample and not the one
bootstrap distribution to draw conclusion regarding the precision of of the statistical population. We can use the bootstrap distribution
our estimation (e.g. standard errors and confidence intervals). to draw conclusion regarding the precision of our estimation (e.g.
standard errors and confidence intervals).
Bootstrapping methods create bootstrapped samples from a SRS by Bootstrapping methods create bootstrapped samples from a SRS by
resampling. The bootstrapped samples are used to estimate the sampling resampling. The bootstrapped samples are used to estimate the sampling
@ -140,8 +141,8 @@ distribution is the standard error of the mean.
\section{Permutation tests} \section{Permutation tests}
Statistical tests ask for the probability of a measured value to Statistical tests ask for the probability of a measured value to
originate from a null hypothesis. Is this probability smaller than the originate from a null hypothesis. Is this probability smaller than the
desired \endeterm{Signifikanz}{significance level}, the desired \entermde{Signifikanz}{significance level}, the
\endeterm{Nullhypothese}{null hypothesis} may be rejected. \entermde{Nullhypothese}{null hypothesis} may be rejected.
Traditionally, such probabilities are taken from theoretical Traditionally, such probabilities are taken from theoretical
distributions which are based on assumptions about the data. Thus the distributions which are based on assumptions about the data. Thus the
@ -166,15 +167,15 @@ while we conserve all other statistical properties of the data.
\end{figure} \end{figure}
A good example for the application of a A good example for the application of a
\endeterm{Permutationstest}{permutaion test} is the statistical \entermde{Permutationstest}{permutaion test} is the statistical
assessment of \endeterm[correlation]{Korrelation}{correlations}. Given assessment of \entermde[correlation]{Korrelation}{correlations}. Given
are measured pairs of data points $(x_i, y_i)$. By calculating the are measured pairs of data points $(x_i, y_i)$. By calculating the
\endeterm[correlation!correlation \entermde[correlation!correlation
coefficient]{Korrelation!Korrelationskoeffizient}{correlation coefficient]{Korrelation!Korrelationskoeffizient}{correlation
coefficient} we can quantify how strongly $y$ depends on $x$. The coefficient} we can quantify how strongly $y$ depends on $x$. The
correlation coefficient alone, however, does not tell whether the correlation coefficient alone, however, does not tell whether the
correlation is significantly different from a random correlation. The correlation is significantly different from a random correlation. The
\endeterm[]{Nullhypothese}{null hypothesis} for such a situation is that \entermde{Nullhypothese}{null hypothesis} for such a situation is that
$y$ does not depend on $x$. In order to perform a permutation test, we $y$ does not depend on $x$. In order to perform a permutation test, we
need to destroy the correlation by permuting the $(x_i, y_i)$ pairs, need to destroy the correlation by permuting the $(x_i, y_i)$ pairs,
i.e. we rearrange the $x_i$ and $y_i$ values in a random i.e. we rearrange the $x_i$ and $y_i$ values in a random

View File

@ -36,8 +36,7 @@
\usepackage[makeindex]{splitidx} \usepackage[makeindex]{splitidx}
\makeindex \makeindex
\usepackage[totoc]{idxlayout} \usepackage[totoc]{idxlayout}
\newindex[\tr{Glossary}{Fachbegriffe}]{term} \newindex[Glossary]{enterm}
\newindex[Englische Fachbegriffe]{enterm}
\newindex[Deutsche Fachbegriffe]{determ} \newindex[Deutsche Fachbegriffe]{determ}
\newindex[\tr{MATLAB code}{MATLAB Code}]{mcode} \newindex[\tr{MATLAB code}{MATLAB Code}]{mcode}
\newindex[\tr{Python code}{Python Code}]{pcode} \newindex[\tr{Python code}{Python Code}]{pcode}
@ -214,16 +213,25 @@
\usepackage{ifthen} \usepackage{ifthen}
% \enterm[english index entry]{<english term>} % \enterm[english index entry]{<english term>}
\newcommand{\enterm}[2][]{\tr{\textit{#2}}{``#2''}\ifthenelse{\equal{#1}{}}{\tr{\protect\sindex[term]{#2}}{\protect\sindex[enterm]{#2}}}{\tr{\protect\sindex[term]{#1}}{\protect\sindex[enterm]{#1}}}} % typeset the term in italics and add it (or the optional argument) to
% the english index.
\newcommand{\enterm}[2][]{\textit{#2}\ifthenelse{\equal{#1}{}}{\protect\sindex[enterm]{#2}}{\protect\sindex[enterm]{#1}}}
% \endeterm[english index entry]{<german index entry>}{<english term>} % \endeterm[english index entry]{<german index entry>}{<english term>}
\newcommand{\endeterm}[3][]{\tr{\textit{#3}}{``#3''}\ifthenelse{\equal{#1}{}}{\tr{\protect\sindex[term]{#3}}{\protect\sindex[enterm]{#3}}}{\tr{\protect\sindex[term]{#1}}{\protect\sindex[enterm]{#1}}}\protect\sindex[determ]{#2}} % typeset the english term in italics and add it (or the first
% optional argument) to the english index. In addition add the german
% index entry to the german index without printing it.
\newcommand{\entermde}[3][]{\textit{#3}\ifthenelse{\equal{#1}{}}{\protect\sindex[enterm]{#3}}{\protect\sindex[enterm]{#1}}\protect\sindex[determ]{#2}}
% \determ[index entry]{<german term>} % \determ[index entry]{<german term>}
\newcommand{\determ}[2][]{\tr{``#2''}{\textit{#2}}\ifthenelse{\equal{#1}{}}{\tr{\protect\sindex[determ]{#2}}{\protect\sindex[term]{#2}}}{\tr{\protect\sindex[determ]{#1}}{\protect\sindex[term]{#1}}}} % typeset the term in quotes and add it (or the optional argument) to
% the german index.
\newcommand{\determ}[2][]{``#2''\ifthenelse{\equal{#1}{}}{\protect\sindex[determ]{#2}}{\protect\sindex[determ]{#1}}}
% \codeterm[index entry]{<code>} % \codeterm[index entry]{<code>}
\newcommand{\codeterm}[2][]{\textit{#2}\ifthenelse{\equal{#1}{}}{\protect\sindex[term]{#2}}{\protect\sindex[term]{#1}}} % typeset the term in italics and add it (or the optional argument) to
% the english and the german index.
\newcommand{\codeterm}[2][]{\textit{#2}\ifthenelse{\equal{#1}{}}{\protect\sindex[enterm]{#2}\protect\sindex[determ]{#2}}{\protect\sindex[enterm]{#1}\protect\sindex[determ]{#1}}}
\newcommand{\file}[1]{\texttt{#1}} \newcommand{\file}[1]{\texttt{#1}}
@ -242,10 +250,10 @@
% typeset code inline: % typeset code inline:
\newcommand{\varcode}[1]{\setlength{\fboxsep}{0.5ex}\colorbox{codeback}{\texttt{#1\protect\rule[-0.1ex]{0pt}{1.6ex}}}} \newcommand{\varcode}[1]{\setlength{\fboxsep}{0.5ex}\colorbox{codeback}{\texttt{#1\protect\rule[-0.1ex]{0pt}{1.6ex}}}}
% type set code and add it to the python index: % typeset code and add it to the python index:
\newcommand{\pcode}[2][]{\varcode{#2}\ifthenelse{\equal{#1}{}}{\protect\sindex[pcode]{#2}}{\protect\sindex[pcode]{#1}}} \newcommand{\pcode}[2][]{\varcode{#2}\ifthenelse{\equal{#1}{}}{\protect\sindex[pcode]{#2}}{\protect\sindex[pcode]{#1}}}
% type set code and add it to the matlab index: % typeset code and add it to the matlab index:
\newcommand{\mcode}[2][]{\varcode{#2}\ifthenelse{\equal{#1}{}}{\protect\sindex[mcode]{#2}}{\protect\sindex[mcode]{#1}}} \newcommand{\mcode}[2][]{\varcode{#2}\ifthenelse{\equal{#1}{}}{\protect\sindex[mcode]{#2}}{\protect\sindex[mcode]{#1}}}
% XXX typeset code and put it into matlab index: % XXX typeset code and put it into matlab index:

View File

@ -85,6 +85,8 @@
%\renewcommand{\texinputpath}{spectral/lecture/} %\renewcommand{\texinputpath}{spectral/lecture/}
%\include{spectral/lecture/spectral} %\include{spectral/lecture/spectral}
% add chapter on ROC curves
% add chapter on digital filtering % add chapter on digital filtering
% add chapter on event detection % add chapter on event detection
@ -119,10 +121,9 @@
\printallsolutions \printallsolutions
%%%% indices: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%% indices: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\printindex[term] \printindex[enterm]
\printindex[determ] % for english text \printindex[determ]
% \printindex[enterm] % for german text
%\setindexprenote{Some explanations.} %\setindexprenote{Some explanations.}
%\printindex[pcode] %\printindex[pcode]

View File

@ -16,6 +16,14 @@
\include{statistics} \include{statistics}
\section{TODO}
\begin{itemize}
\item The content of this lecture easily covers two lectures!
\item 1. mymedian and debugging, rolling a die, normalized histogram
\item 2. densities, quantiles, cumulative distribution, kernel histogram
\item Adapt the exercises to that!
\end{itemize}
\end{document} \end{document}

View File

@ -97,7 +97,7 @@ such that one half of the data is not greater and the other half is
not smaller than the median (\figref{medianfig}). not smaller than the median (\figref{medianfig}).
\begin{exercise}{mymedian.m}{} \begin{exercise}{mymedian.m}{}
Write a function \code{mymedian()} that computes the median of a vector. Write a function \varcode{mymedian()} that computes the median of a vector.
\end{exercise} \end{exercise}
\matlab{} provides the function \code{median()} for computing the median. \matlab{} provides the function \code{median()} for computing the median.