From 4ee190811202915c5e3c7035693c6a56054e8c40 Mon Sep 17 00:00:00 2001 From: Jan Benda Date: Sun, 1 Dec 2019 18:24:59 +0100 Subject: [PATCH] some minor fixe --- Makefile | 6 ++++-- chapter.mk | 8 +++++--- header.tex | 5 +++-- likelihood/lecture/likelihood.tex | 6 +++--- 4 files changed, 15 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 938a933..0a1723b 100644 --- a/Makefile +++ b/Makefile @@ -36,9 +36,11 @@ watchpdf : watchscript : while true; do ! make -s -q script && make script; sleep 0.5; done - -clean : +cleantex: rm -f *~ $(BASENAME).aux $(BASENAME).log $(BASENAME).out $(BASENAME)-solutions.tex $(BASENAME).toc $(BASENAME).lo? $(BASENAME).idx $(BASENAME)-term.i* $(BASENAME)-enterm.i* $(BASENAME)-code.i* + for sd in $(SUBDIRS); do $(MAKE) -C $$sd/lecture cleantex; done + +clean : cleantex for sd in $(SUBDIRS); do $(MAKE) -C $$sd/lecture clean; done cleanall : clean diff --git a/chapter.mk b/chapter.mk index 3c7da22..e2f9044 100644 --- a/chapter.mk +++ b/chapter.mk @@ -42,11 +42,13 @@ $(BASENAME)-chapter.pdf : $(BASENAME)-chapter.tex $(BASENAME).tex $(wildcard $(B watchchapter : while true; do ! make -q chapter && make chapter; sleep 0.5; done - -cleanchapter : cleanpythonplots cleangnuplots +cleantex: rm -f *~ rm -f $(BASENAME).aux $(BASENAME).log - rm -f $(BASENAME)-chapter.aux $(BASENAME)-chapter.log $(BASENAME)-chapter.out $(BASENAME)-chapter.idx $(BASENAME)-chapter-solutions.tex $(BASENAME)-solutions.tex + rm -f $(BASENAME)-chapter.aux $(BASENAME)-chapter.log $(BASENAME)-chapter.out $(BASENAME)-chapter.idx $(BASENAME)-solutions.tex $(BASENAME)-solutions.tex + + +cleanchapter : cleanpythonplots cleangnuplots cleantex cleanallchapter : cleanchapter diff --git a/header.tex b/header.tex index a016de6..458ed26 100644 --- a/header.tex +++ b/header.tex @@ -287,10 +287,11 @@ % - 'here': solutions are printed right after the exercises in the same box % - 'chapter': solutions are printed at the end of each chapter % - 'end': all solutions are printed at the end of the script +% if you change this you probably need to run make cleantex before % \newboolean{showexercisesolutions} \setboolean{showexercisesolutions}{true} -\newcommand{\exercisesolutions}{end} % 0: here, 1: chapter, 2: end +\newcommand{\exercisesolutions}{chapter} % 0: here, 1: chapter, 2: end % we need this also as numbers: \ifthenelse{\equal{\exercisesolutions}{end}}{\newcommand{\exercisesolutionsnum}{2}}{% \ifthenelse{\equal{\exercisesolutions}{chapter}}{\newcommand{\exercisesolutionsnum}{1}}{% @@ -316,7 +317,7 @@ \ifnum\exercisesolutionsnum=2 \def\currentjobname{\jobname} \immediate\openout\solutions=\currentjobname-solutions - \def\exercisechapter#1{\immediate\write\solutions{\unexpanded{\section}{\thechapter. #1}}} + \def\exercisechapter#1{\immediate\write\solutions{\unexpanded{\pagebreak[3]\section}{\thechapter. #1}}} \else \def\exercisechapter#1{} \fi diff --git a/likelihood/lecture/likelihood.tex b/likelihood/lecture/likelihood.tex index 492beb0..a505450 100644 --- a/likelihood/lecture/likelihood.tex +++ b/likelihood/lecture/likelihood.tex @@ -300,13 +300,13 @@ the correlation coefficient $r_{x,y}$, \eqnref{correlationcoefficient}, is the covariance normalized by the product of the standard deviations of $x$ and $y$, respectively. Therefore, in case the standard deviations equal one, -the correlation coefficient equals the covariance. Consequently, for -standardized data the slope of the regression line +the correlation coefficient is identical to the covariance. +Consequently, for standardized data the slope of the regression line \eqnref{whitemleslope} simplifies to \begin{equation} \theta = \frac{1}{n} \sum_{i=1}^n x_i y_i = \text{cov}(x,y) = r_{x,y} \end{equation} -For standardized data the slope of the regression line equals the +For standardized data the slope of the regression line is the same as the correlation coefficient!