some minor fixe

This commit is contained in:
Jan Benda 2019-12-01 18:24:59 +01:00
parent 51d0903d18
commit 4ee1908112
4 changed files with 15 additions and 10 deletions

View File

@ -36,9 +36,11 @@ watchpdf :
watchscript : watchscript :
while true; do ! make -s -q script && make script; sleep 0.5; done while true; do ! make -s -q script && make script; sleep 0.5; done
cleantex:
clean :
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* 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 for sd in $(SUBDIRS); do $(MAKE) -C $$sd/lecture clean; done
cleanall : clean cleanall : clean

View File

@ -42,11 +42,13 @@ $(BASENAME)-chapter.pdf : $(BASENAME)-chapter.tex $(BASENAME).tex $(wildcard $(B
watchchapter : watchchapter :
while true; do ! make -q chapter && make chapter; sleep 0.5; done while true; do ! make -q chapter && make chapter; sleep 0.5; done
cleantex:
cleanchapter : cleanpythonplots cleangnuplots
rm -f *~ rm -f *~
rm -f $(BASENAME).aux $(BASENAME).log 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 cleanallchapter : cleanchapter

View File

@ -287,10 +287,11 @@
% - 'here': solutions are printed right after the exercises in the same box % - 'here': solutions are printed right after the exercises in the same box
% - 'chapter': solutions are printed at the end of each chapter % - 'chapter': solutions are printed at the end of each chapter
% - 'end': all solutions are printed at the end of the script % - '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} \newboolean{showexercisesolutions}
\setboolean{showexercisesolutions}{true} \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: % we need this also as numbers:
\ifthenelse{\equal{\exercisesolutions}{end}}{\newcommand{\exercisesolutionsnum}{2}}{% \ifthenelse{\equal{\exercisesolutions}{end}}{\newcommand{\exercisesolutionsnum}{2}}{%
\ifthenelse{\equal{\exercisesolutions}{chapter}}{\newcommand{\exercisesolutionsnum}{1}}{% \ifthenelse{\equal{\exercisesolutions}{chapter}}{\newcommand{\exercisesolutionsnum}{1}}{%
@ -316,7 +317,7 @@
\ifnum\exercisesolutionsnum=2 \ifnum\exercisesolutionsnum=2
\def\currentjobname{\jobname} \def\currentjobname{\jobname}
\immediate\openout\solutions=\currentjobname-solutions \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 \else
\def\exercisechapter#1{} \def\exercisechapter#1{}
\fi \fi

View File

@ -300,13 +300,13 @@ the correlation coefficient $r_{x,y}$,
\eqnref{correlationcoefficient}, is the covariance normalized by the \eqnref{correlationcoefficient}, is the covariance normalized by the
product of the standard deviations of $x$ and $y$, product of the standard deviations of $x$ and $y$,
respectively. Therefore, in case the standard deviations equal one, respectively. Therefore, in case the standard deviations equal one,
the correlation coefficient equals the covariance. Consequently, for the correlation coefficient is identical to the covariance.
standardized data the slope of the regression line Consequently, for standardized data the slope of the regression line
\eqnref{whitemleslope} simplifies to \eqnref{whitemleslope} simplifies to
\begin{equation} \begin{equation}
\theta = \frac{1}{n} \sum_{i=1}^n x_i y_i = \text{cov}(x,y) = r_{x,y} \theta = \frac{1}{n} \sum_{i=1}^n x_i y_i = \text{cov}(x,y) = r_{x,y}
\end{equation} \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! correlation coefficient!