From 08382f94d45feeca9b18e96ae40df2668fd99944 Mon Sep 17 00:00:00 2001 From: Jan Benda Date: Mon, 7 Dec 2020 19:21:17 +0100 Subject: [PATCH] updated statistics exercise instructions --- README.fonts | 14 + .../lecture/pointprocessscetchA.eps | 120 ++++-- .../lecture/pointprocessscetchA.pdf | Bin 2786 -> 2924 bytes .../lecture/pointprocessscetchB.eps | 389 ++++++++++++------ .../lecture/pointprocessscetchB.pdf | Bin 4694 -> 4877 bytes statistics/exercises/exercises01.tex | 5 +- statistics/lecture/diehistograms.py | 12 +- 7 files changed, 379 insertions(+), 161 deletions(-) diff --git a/README.fonts b/README.fonts index ab7a941..638013d 100644 --- a/README.fonts +++ b/README.fonts @@ -1,6 +1,20 @@ Fonts for matplotlib -------------------- +Install Humor Sans font +``` +sudo apt install fonts-humor-sans +``` + +Clear matplotlib font cache: +``` +cd ~/.cache/matplotlib/ +rm -r * +``` + +Older problems +-------------- + Make sure the right fonts are installed: ``` sudo apt-get install ttf-lyx2.0 diff --git a/pointprocesses/lecture/pointprocessscetchA.eps b/pointprocesses/lecture/pointprocessscetchA.eps index 2383569..67537f6 100644 --- a/pointprocesses/lecture/pointprocessscetchA.eps +++ b/pointprocesses/lecture/pointprocessscetchA.eps @@ -1,7 +1,7 @@ %!PS-Adobe-2.0 EPSF-2.0 %%Title: pointprocessscetchA.tex -%%Creator: gnuplot 4.6 patchlevel 4 -%%CreationDate: Tue Oct 27 23:58:04 2020 +%%Creator: gnuplot 5.2 patchlevel 8 +%%CreationDate: Mon Dec 7 16:09:58 2020 %%DocumentFonts: %%BoundingBox: 50 50 373 135 %%EndComments @@ -18,6 +18,7 @@ gnudict begin /Dashlength 1 def /Landscape false def /Level1 false def +/Level3 false def /Rounded true def /ClipToBoundingBox false def /SuppressPDFMark false def @@ -29,11 +30,11 @@ gnudict begin % /vshift -73 def /dl1 { - 10.0 Dashlength mul mul + 10.0 Dashlength userlinewidth gnulinewidth div mul mul mul Rounded { currentlinewidth 0.75 mul sub dup 0 le { pop 0.01 } if } if } def /dl2 { - 10.0 Dashlength mul mul + 10.0 Dashlength userlinewidth gnulinewidth div mul mul mul Rounded { currentlinewidth 0.75 mul add } if } def /hpt_ 31.5 def @@ -47,7 +48,7 @@ gnudict begin } if } def % -% Gnuplot Prolog Version 4.6 (September 2012) +% Gnuplot Prolog Version 5.2 (Dec 2017) % %/SuppressPDFMark true def % @@ -64,11 +65,11 @@ gnudict begin /vpt2 vpt 2 mul def /hpt2 hpt 2 mul def /Lshow {currentpoint stroke M 0 vshift R - Blacktext {gsave 0 setgray show grestore} {show} ifelse} def + Blacktext {gsave 0 setgray textshow grestore} {textshow} ifelse} def /Rshow {currentpoint stroke M dup stringwidth pop neg vshift R - Blacktext {gsave 0 setgray show grestore} {show} ifelse} def + Blacktext {gsave 0 setgray textshow grestore} {textshow} ifelse} def /Cshow {currentpoint stroke M dup stringwidth pop -2 div vshift R - Blacktext {gsave 0 setgray show grestore} {show} ifelse} def + Blacktext {gsave 0 setgray textshow grestore} {textshow} ifelse} def /UP {dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def} def /DL {Color {setrgbcolor Solid {pop []} if 0 setdash} @@ -82,7 +83,7 @@ gnudict begin /PL {stroke userlinewidth setlinewidth Rounded {1 setlinejoin 1 setlinecap} if} def 3.8 setmiterlimit -% Default Line colors +% Classic Line colors (version 5.0) /LCw {1 1 1} def /LCb {0 0 0} def /LCa {0 0 0} def @@ -95,19 +96,21 @@ gnudict begin /LC6 {0 0 0} def /LC7 {1 0.3 0} def /LC8 {0.5 0.5 0.5} def -% Default Line Types +% Default dash patterns (version 5.0) +/LTB {BL [] LCb DL} def /LTw {PL [] 1 setgray} def -/LTb {BL [] LCb DL} def +/LTb {PL [] LCb DL} def /LTa {AL [1 udl mul 2 udl mul] 0 setdash LCa setrgbcolor} def /LT0 {PL [] LC0 DL} def -/LT1 {PL [4 dl1 2 dl2] LC1 DL} def -/LT2 {PL [2 dl1 3 dl2] LC2 DL} def -/LT3 {PL [1 dl1 1.5 dl2] LC3 DL} def -/LT4 {PL [6 dl1 2 dl2 1 dl1 2 dl2] LC4 DL} def -/LT5 {PL [3 dl1 3 dl2 1 dl1 3 dl2] LC5 DL} def -/LT6 {PL [2 dl1 2 dl2 2 dl1 6 dl2] LC6 DL} def -/LT7 {PL [1 dl1 2 dl2 6 dl1 2 dl2 1 dl1 2 dl2] LC7 DL} def -/LT8 {PL [2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 4 dl2] LC8 DL} def +/LT1 {PL [2 dl1 3 dl2] LC1 DL} def +/LT2 {PL [1 dl1 1.5 dl2] LC2 DL} def +/LT3 {PL [6 dl1 2 dl2 1 dl1 2 dl2] LC3 DL} def +/LT4 {PL [1 dl1 2 dl2 6 dl1 2 dl2 1 dl1 2 dl2] LC4 DL} def +/LT5 {PL [4 dl1 2 dl2] LC5 DL} def +/LT6 {PL [1.5 dl1 1.5 dl2 1.5 dl1 1.5 dl2 1.5 dl1 6 dl2] LC6 DL} def +/LT7 {PL [3 dl1 3 dl2 1 dl1 3 dl2] LC7 DL} def +/LT8 {PL [2 dl1 2 dl2 2 dl1 6 dl2] LC8 DL} def +/SL {[] 0 setdash} def /Pnt {stroke [] 0 setdash gsave 1 setlinecap M 0 0 V stroke grestore} def /Dia {stroke [] 0 setdash 2 copy vpt add M hpt neg vpt neg V hpt vpt neg V @@ -302,7 +305,7 @@ gnudict begin ColR ColG ColB setrgbcolor} def /BoxColFill {gsave Rec PolyFill} def /PolyFill {gsave Density fill grestore grestore} def -/h {rlineto rlineto rlineto gsave closepath fill grestore} bind def +/h {rlineto rlineto rlineto closepath gsave fill grestore stroke} bind def % % PostScript Level 1 Pattern Fill routine for rectangles % Usage: x y w h s a XX PatternFill @@ -329,9 +332,14 @@ gnudict begin % /languagelevel where {pop languagelevel} {1} ifelse - 2 lt - {/InterpretLevel1 true def} - {/InterpretLevel1 Level1 def} +dup 2 lt + {/InterpretLevel1 true def + /InterpretLevel3 false def} + {/InterpretLevel1 Level1 def + 2 gt + {/InterpretLevel3 Level3 def} + {/InterpretLevel3 false def} + ifelse } ifelse % % PostScript level 2 pattern fill definitions @@ -420,6 +428,7 @@ Level1 {Level1PatternFill} {Level2PatternFill} ifelse /Symbol-Oblique /Symbol findfont [1 0 .167 1 0 0] makefont dup length dict begin {1 index /FID eq {pop pop} {def} ifelse} forall currentdict end definefont pop +% Level1 SuppressPDFMark or {} { /SDict 10 dict def @@ -429,14 +438,39 @@ systemdict /pdfmark known not { SDict begin [ /Title (pointprocessscetchA.tex) /Subject (gnuplot plot) - /Creator (gnuplot 4.6 patchlevel 4) - /Author (jan) + /Creator (gnuplot 5.2 patchlevel 8) % /Producer (gnuplot) % /Keywords () - /CreationDate (Tue Oct 27 23:58:04 2020) + /CreationDate (Mon Dec 7 16:09:58 2020) /DOCINFO pdfmark end } ifelse +% +% Support for boxed text - Ethan A Merritt Sep 2016 +% +/InitTextBox { userdict /TBy2 3 -1 roll put userdict /TBx2 3 -1 roll put + userdict /TBy1 3 -1 roll put userdict /TBx1 3 -1 roll put + /Boxing true def } def +/ExtendTextBox { dup type /stringtype eq + { Boxing { gsave dup false charpath pathbbox + dup TBy2 gt {userdict /TBy2 3 -1 roll put} {pop} ifelse + dup TBx2 gt {userdict /TBx2 3 -1 roll put} {pop} ifelse + dup TBy1 lt {userdict /TBy1 3 -1 roll put} {pop} ifelse + dup TBx1 lt {userdict /TBx1 3 -1 roll put} {pop} ifelse + grestore } if } + {} ifelse} def +/PopTextBox { newpath TBx1 TBxmargin sub TBy1 TBymargin sub M + TBx1 TBxmargin sub TBy2 TBymargin add L + TBx2 TBxmargin add TBy2 TBymargin add L + TBx2 TBxmargin add TBy1 TBymargin sub L closepath } def +/DrawTextBox { PopTextBox stroke /Boxing false def} def +/FillTextBox { gsave PopTextBox fill grestore /Boxing false def} def +0 0 0 0 InitTextBox +/TBxmargin 20 def +/TBymargin 20 def +/Boxing false def +/textshow { ExtendTextBox Gshow } def +% end %%EndProlog %%Page: 1 1 @@ -450,27 +484,33 @@ newpath 2.000 UL LTb LCb setrgbcolor -0.00 0.00 0.00 C 1.000 UP -LTb +[] 0 setdash +0.00 0.00 0.00 C +1.000 UP LCb setrgbcolor -LTb 1.000 UL -LTb +[] 0 setdash gsave 6208 824 N 0 -32 V 121 32 V -121 32 V 0 -32 V 1 PolyFill 6208 824 M +stroke +6208 824 N 0 -32 V 121 32 V -121 32 V 0 -32 V +Z stroke 528 824 M 5680 0 V stroke -2.000 UL LTb -0.00 0.00 0.00 C 10.000 UL -LT0 -LC0 setrgbcolor -0.00 0.00 0.00 C 910 573 M +0.00 0.00 0.00 C +% Begin plot #1 +10.000 UL +LTb +LCb setrgbcolor +[] 0 setdash +0.00 0.00 0.00 C +910 573 M 0 503 V 1412 573 M 0 503 V @@ -488,12 +528,18 @@ LC0 setrgbcolor 0 503 V 5685 573 M 0 503 V -1.000 UP stroke +LTw +% End plot #1 2.000 UL LTb LCb setrgbcolor -0.00 0.00 0.00 C stroke +[] 0 setdash +1.000 UP +2.000 UL +LTb +0.00 0.00 0.00 C +stroke grestore end showpage diff --git a/pointprocesses/lecture/pointprocessscetchA.pdf b/pointprocesses/lecture/pointprocessscetchA.pdf index 59b05836210d0388b698c5ca52f9fff0e76a8257..6154f40cf355478e936160beb372f4f6d2d68ea2 100644 GIT binary patch delta 1092 zcma)+e@GKi9Kf0RgIy{Tlu{5cY-Hi-d*|Kmw%lTEce-21*S-^a_Y zU0jzk`CJl>nmEezc=5sw%4BlK1~oZ|BU;P~`gA}a2DIXLNMbkXySzR}k6$FCosNLB zo%Bv^AWq~^BpSg-cd3JF)J7HqwC)mjyPcvfu7r;yB3LEFo5b-XmLgHrwuAgh;`+sa z5^#65`RkkG36(UR#8WzhL;hq)SFumVHUuF-zvq$`!@3P8l4LbS90;k3BO3h&I+9rH z)^HH3zF?oK*Ee@*F(QvuZ%NJD!ErO`-=+emphcOM#`FBwjJ-E(|wX@h~yR2q&NRZ&spXq9h<`;K6y|0obZ*F9;egg z7j8N^?ViI2UKy@=3J(kSmgmdz|KC38-OA8*!F( zvAGkckZ9-Iv2V6c1_obAevzF`QA(OsaB3lhk&|hcm6&Iv4-y2jAq=preoC?xRL|x& z?D>qUMrN8^`pzIzGV}9X5=&AwK>qhnE>SQtSAd3#$>au3aZUpxb0cF@3t%WM;IuM9 z4+x+s!KF!AsmUc8>3O9EIr$|DAOa}tSXz>iU!(za&}2p~{dyBKQw31e87Sl_aDf>H zMn(p}m`4>eFu@{bWR9uMz!1Yc10z#&4D(ElEJ0!_$QB!znj2s$w6vUjnad{D&DGi5 z#M#K%5@@TXi=m^lo2!eni>rx+p|iQGnSraF4M7#LTy}O`#U+VFB^5=fXQN# Js;>TSTmWFbAXWeX diff --git a/pointprocesses/lecture/pointprocessscetchB.eps b/pointprocesses/lecture/pointprocessscetchB.eps index d55c96f..6ef7b10 100644 --- a/pointprocesses/lecture/pointprocessscetchB.eps +++ b/pointprocesses/lecture/pointprocessscetchB.eps @@ -1,7 +1,7 @@ %!PS-Adobe-2.0 EPSF-2.0 %%Title: pointprocessscetchB.tex -%%Creator: gnuplot 4.6 patchlevel 4 -%%CreationDate: Tue Oct 27 23:58:04 2020 +%%Creator: gnuplot 5.2 patchlevel 8 +%%CreationDate: Mon Dec 7 16:09:59 2020 %%DocumentFonts: %%BoundingBox: 50 50 373 237 %%EndComments @@ -18,6 +18,7 @@ gnudict begin /Dashlength 1 def /Landscape false def /Level1 false def +/Level3 false def /Rounded true def /ClipToBoundingBox false def /SuppressPDFMark false def @@ -29,11 +30,11 @@ gnudict begin % /vshift -73 def /dl1 { - 10.0 Dashlength mul mul + 10.0 Dashlength userlinewidth gnulinewidth div mul mul mul Rounded { currentlinewidth 0.75 mul sub dup 0 le { pop 0.01 } if } if } def /dl2 { - 10.0 Dashlength mul mul + 10.0 Dashlength userlinewidth gnulinewidth div mul mul mul Rounded { currentlinewidth 0.75 mul add } if } def /hpt_ 31.5 def @@ -47,7 +48,7 @@ gnudict begin } if } def % -% Gnuplot Prolog Version 4.6 (September 2012) +% Gnuplot Prolog Version 5.2 (Dec 2017) % %/SuppressPDFMark true def % @@ -64,11 +65,11 @@ gnudict begin /vpt2 vpt 2 mul def /hpt2 hpt 2 mul def /Lshow {currentpoint stroke M 0 vshift R - Blacktext {gsave 0 setgray show grestore} {show} ifelse} def + Blacktext {gsave 0 setgray textshow grestore} {textshow} ifelse} def /Rshow {currentpoint stroke M dup stringwidth pop neg vshift R - Blacktext {gsave 0 setgray show grestore} {show} ifelse} def + Blacktext {gsave 0 setgray textshow grestore} {textshow} ifelse} def /Cshow {currentpoint stroke M dup stringwidth pop -2 div vshift R - Blacktext {gsave 0 setgray show grestore} {show} ifelse} def + Blacktext {gsave 0 setgray textshow grestore} {textshow} ifelse} def /UP {dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def} def /DL {Color {setrgbcolor Solid {pop []} if 0 setdash} @@ -82,7 +83,7 @@ gnudict begin /PL {stroke userlinewidth setlinewidth Rounded {1 setlinejoin 1 setlinecap} if} def 3.8 setmiterlimit -% Default Line colors +% Classic Line colors (version 5.0) /LCw {1 1 1} def /LCb {0 0 0} def /LCa {0 0 0} def @@ -95,19 +96,21 @@ gnudict begin /LC6 {0 0 0} def /LC7 {1 0.3 0} def /LC8 {0.5 0.5 0.5} def -% Default Line Types +% Default dash patterns (version 5.0) +/LTB {BL [] LCb DL} def /LTw {PL [] 1 setgray} def -/LTb {BL [] LCb DL} def +/LTb {PL [] LCb DL} def /LTa {AL [1 udl mul 2 udl mul] 0 setdash LCa setrgbcolor} def /LT0 {PL [] LC0 DL} def -/LT1 {PL [4 dl1 2 dl2] LC1 DL} def -/LT2 {PL [2 dl1 3 dl2] LC2 DL} def -/LT3 {PL [1 dl1 1.5 dl2] LC3 DL} def -/LT4 {PL [6 dl1 2 dl2 1 dl1 2 dl2] LC4 DL} def -/LT5 {PL [3 dl1 3 dl2 1 dl1 3 dl2] LC5 DL} def -/LT6 {PL [2 dl1 2 dl2 2 dl1 6 dl2] LC6 DL} def -/LT7 {PL [1 dl1 2 dl2 6 dl1 2 dl2 1 dl1 2 dl2] LC7 DL} def -/LT8 {PL [2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 2 dl2 2 dl1 4 dl2] LC8 DL} def +/LT1 {PL [2 dl1 3 dl2] LC1 DL} def +/LT2 {PL [1 dl1 1.5 dl2] LC2 DL} def +/LT3 {PL [6 dl1 2 dl2 1 dl1 2 dl2] LC3 DL} def +/LT4 {PL [1 dl1 2 dl2 6 dl1 2 dl2 1 dl1 2 dl2] LC4 DL} def +/LT5 {PL [4 dl1 2 dl2] LC5 DL} def +/LT6 {PL [1.5 dl1 1.5 dl2 1.5 dl1 1.5 dl2 1.5 dl1 6 dl2] LC6 DL} def +/LT7 {PL [3 dl1 3 dl2 1 dl1 3 dl2] LC7 DL} def +/LT8 {PL [2 dl1 2 dl2 2 dl1 6 dl2] LC8 DL} def +/SL {[] 0 setdash} def /Pnt {stroke [] 0 setdash gsave 1 setlinecap M 0 0 V stroke grestore} def /Dia {stroke [] 0 setdash 2 copy vpt add M hpt neg vpt neg V hpt vpt neg V @@ -302,7 +305,7 @@ gnudict begin ColR ColG ColB setrgbcolor} def /BoxColFill {gsave Rec PolyFill} def /PolyFill {gsave Density fill grestore grestore} def -/h {rlineto rlineto rlineto gsave closepath fill grestore} bind def +/h {rlineto rlineto rlineto closepath gsave fill grestore stroke} bind def % % PostScript Level 1 Pattern Fill routine for rectangles % Usage: x y w h s a XX PatternFill @@ -329,9 +332,14 @@ gnudict begin % /languagelevel where {pop languagelevel} {1} ifelse - 2 lt - {/InterpretLevel1 true def} - {/InterpretLevel1 Level1 def} +dup 2 lt + {/InterpretLevel1 true def + /InterpretLevel3 false def} + {/InterpretLevel1 Level1 def + 2 gt + {/InterpretLevel3 Level3 def} + {/InterpretLevel3 false def} + ifelse } ifelse % % PostScript level 2 pattern fill definitions @@ -420,6 +428,7 @@ Level1 {Level1PatternFill} {Level2PatternFill} ifelse /Symbol-Oblique /Symbol findfont [1 0 .167 1 0 0] makefont dup length dict begin {1 index /FID eq {pop pop} {def} ifelse} forall currentdict end definefont pop +% Level1 SuppressPDFMark or {} { /SDict 10 dict def @@ -429,14 +438,39 @@ systemdict /pdfmark known not { SDict begin [ /Title (pointprocessscetchB.tex) /Subject (gnuplot plot) - /Creator (gnuplot 4.6 patchlevel 4) - /Author (jan) + /Creator (gnuplot 5.2 patchlevel 8) % /Producer (gnuplot) % /Keywords () - /CreationDate (Tue Oct 27 23:58:04 2020) + /CreationDate (Mon Dec 7 16:09:59 2020) /DOCINFO pdfmark end } ifelse +% +% Support for boxed text - Ethan A Merritt Sep 2016 +% +/InitTextBox { userdict /TBy2 3 -1 roll put userdict /TBx2 3 -1 roll put + userdict /TBy1 3 -1 roll put userdict /TBx1 3 -1 roll put + /Boxing true def } def +/ExtendTextBox { dup type /stringtype eq + { Boxing { gsave dup false charpath pathbbox + dup TBy2 gt {userdict /TBy2 3 -1 roll put} {pop} ifelse + dup TBx2 gt {userdict /TBx2 3 -1 roll put} {pop} ifelse + dup TBy1 lt {userdict /TBy1 3 -1 roll put} {pop} ifelse + dup TBx1 lt {userdict /TBx1 3 -1 roll put} {pop} ifelse + grestore } if } + {} ifelse} def +/PopTextBox { newpath TBx1 TBxmargin sub TBy1 TBymargin sub M + TBx1 TBxmargin sub TBy2 TBymargin add L + TBx2 TBxmargin add TBy2 TBymargin add L + TBx2 TBxmargin add TBy1 TBymargin sub L closepath } def +/DrawTextBox { PopTextBox stroke /Boxing false def} def +/FillTextBox { gsave PopTextBox fill grestore /Boxing false def} def +0 0 0 0 InitTextBox +/TBxmargin 20 def +/TBymargin 20 def +/Boxing false def +/textshow { ExtendTextBox Gshow } def +% end %%EndProlog %%Page: 1 1 @@ -450,27 +484,33 @@ newpath 2.000 UL LTb LCb setrgbcolor -0.00 0.00 0.00 C 1.000 UP -LTb +[] 0 setdash +0.00 0.00 0.00 C +1.000 UP LCb setrgbcolor -LTb 1.000 UL -LTb +[] 0 setdash gsave 6208 3165 N 0 -32 V 121 32 V -121 32 V 0 -32 V 1 PolyFill 6208 3165 M +stroke +6208 3165 N 0 -32 V 121 32 V -121 32 V 0 -32 V --5680 0 R +Z stroke +528 3165 M 5680 0 V stroke -2.000 UL LTb -0.00 0.00 0.00 C 10.000 UL -LT0 -LC0 setrgbcolor -0.00 0.00 0.00 C 910 3029 M +0.00 0.00 0.00 C +% Begin plot #1 +10.000 UL +LTb +LCb setrgbcolor +[] 0 setdash +0.00 0.00 0.00 C +910 3029 M 0 272 V 502 -272 R 0 272 V @@ -488,99 +528,167 @@ LC0 setrgbcolor 0 272 V 5685 3029 M 0 272 V -1.000 UP stroke +LTw +% End plot #1 2.000 UL LTb LCb setrgbcolor -0.00 0.00 0.00 C 2.000 UL +[] 0 setdash +1.000 UP +2.000 UL LTb -LCb setrgbcolor -0.00 0.00 0.00 C 1.000 UP +0.00 0.00 0.00 C +2.000 UL LTb LCb setrgbcolor -LTb +[] 0 setdash +0.00 0.00 0.00 C +1.000 UP +LCb setrgbcolor 1.000 UL -LTb +[] 0 setdash gsave 6208 2043 N 0 -32 V 121 32 V -121 32 V 0 -32 V 1 PolyFill 6208 2043 M +stroke +6208 2043 N 0 -32 V 121 32 V -121 32 V 0 -32 V --5680 0 R +Z stroke +528 2043 M 5680 0 V +stroke +1.000 UL +[] 0 setdash 1291 1929 M +stroke +1291 1929 N 121 32 V -121 32 V --260 -64 R --121 32 V -121 32 V -910 1961 M +-260 0 R +stroke +1031 1993 N +910 1961 L +121 -32 V +-121 32 R 502 0 V -590 -32 R +stroke +1.000 UL +[] 0 setdash +2002 1929 M +stroke +2002 1929 N 121 32 V -121 32 V --469 -64 R --121 32 V -121 32 V --121 -32 R +-469 0 R +stroke +1533 1993 N +-121 -32 V +121 -32 V +-121 32 R 711 0 V -206 -22 R +stroke +1.000 UL +[] 0 setdash +2329 1939 M +stroke +2329 1939 N 84 22 V -84 22 V --122 -44 R --84 22 V -84 22 V --84 -22 R +-122 0 R +stroke +2207 1983 N +-84 -22 V +84 -22 V +-84 22 R 290 0 V -216 -23 R +stroke +1.000 UL +[] 0 setdash +2629 1938 M +stroke +2629 1938 N 88 23 V -88 23 V --128 -46 R --88 23 V -88 23 V --88 -23 R +-128 0 R +stroke +2501 1984 N +-88 -23 V +88 -23 V +-88 23 R 304 0 V -329 -32 R +stroke +1.000 UL +[] 0 setdash +3046 1929 M +stroke +3046 1929 N 121 32 V -121 32 V --208 -64 R --121 32 V -121 32 V --121 -32 R +-208 0 R +stroke +2838 1993 N +-121 -32 V +121 -32 V +-121 32 R 450 0 V -745 -32 R +stroke +1.000 UL +[] 0 setdash +3912 1929 M +stroke +3912 1929 N 121 32 V -121 32 V --624 -64 R --121 32 V -121 32 V --121 -32 R +-624 0 R +stroke +3288 1993 N +-121 -32 V +121 -32 V +-121 32 R 866 0 V -496 -32 R +stroke +1.000 UL +[] 0 setdash +4529 1929 M +stroke +4529 1929 N 121 32 V -121 32 V --375 -64 R --121 32 V -121 32 V --121 -32 R +-375 0 R +stroke +4154 1993 N +-121 -32 V +121 -32 V +-121 32 R 617 0 V -914 -32 R +stroke +1.000 UL +[] 0 setdash +5564 1929 M +stroke +5564 1929 N 121 32 V -121 32 V --793 -64 R --121 32 V -121 32 V --121 -32 R +-793 0 R +stroke +4771 1993 N +-121 -32 V +121 -32 V +-121 32 R 1035 0 V stroke -2.000 UL LTb -0.00 0.00 0.00 C 10.000 UL -LT0 -LC0 setrgbcolor -0.00 0.00 0.00 C 910 1907 M +0.00 0.00 0.00 C +% Begin plot #1 +10.000 UL +LTb +LCb setrgbcolor +[] 0 setdash +0.00 0.00 0.00 C +910 1907 M 0 272 V 502 -272 R 0 272 V @@ -598,74 +706,100 @@ LC0 setrgbcolor 0 272 V 5685 1907 M 0 272 V -1.000 UP stroke +LTw +% End plot #1 2.000 UL LTb LCb setrgbcolor -0.00 0.00 0.00 C 2.000 UL +[] 0 setdash +1.000 UP +2.000 UL +LTb +0.00 0.00 0.00 C +2.000 UL LTb LCb setrgbcolor -0.00 0.00 0.00 C 528 268 M +[] 0 setdash +0.00 0.00 0.00 C +528 268 M -63 0 V stroke LTb LCb setrgbcolor -0.00 0.00 0.00 C 528 460 M +[] 0 setdash +0.00 0.00 0.00 C +528 460 M -63 0 V stroke LTb LCb setrgbcolor -0.00 0.00 0.00 C 528 652 M +[] 0 setdash +0.00 0.00 0.00 C +528 652 M -63 0 V stroke LTb LCb setrgbcolor -0.00 0.00 0.00 C 528 844 M +[] 0 setdash +0.00 0.00 0.00 C +528 844 M -63 0 V stroke LTb LCb setrgbcolor -0.00 0.00 0.00 C 528 1036 M +[] 0 setdash +0.00 0.00 0.00 C +528 1036 M -63 0 V stroke LTb LCb setrgbcolor -0.00 0.00 0.00 C 528 1228 M +[] 0 setdash +0.00 0.00 0.00 C +528 1228 M -63 0 V stroke LTb LCb setrgbcolor -0.00 0.00 0.00 C 2.000 UL +[] 0 setdash +0.00 0.00 0.00 C +2.000 UL LTb LCb setrgbcolor -0.00 0.00 0.00 C 528 1276 M +[] 0 setdash +0.00 0.00 0.00 C +528 1276 M 528 220 L 5801 0 R 0 1056 R -5801 0 R 1.000 UP stroke -LTb LCb setrgbcolor -LTb 1.000 UL -LTb +[] 0 setdash gsave 6208 268 N 0 -32 V 121 32 V -121 32 V 0 -32 V 1 PolyFill 6208 268 M +stroke +6208 268 N 0 -32 V 121 32 V -121 32 V 0 -32 V +Z stroke 528 268 M 5680 0 V stroke -2.000 UL LTb -0.00 0.00 0.00 C 3.000 UL -LT0 -LC0 setrgbcolor -0.00 0.00 0.00 C 528 268 M +0.00 0.00 0.00 C +% Begin plot #1 +3.000 UL +LTb +LCb setrgbcolor +[] 0 setdash +0.00 0.00 0.00 C +528 268 M 382 0 V 0 96 R 502 0 V @@ -685,12 +819,17 @@ LC0 setrgbcolor 1035 0 V 0 96 R 533 0 V -1.500 UP stroke +LTw +% End plot #1 +% Begin plot #2 +1.500 UP 2.000 UL -LT0 -LC0 setrgbcolor -0.00 0.00 0.00 C 910 268 CircleF +LTb +LCb setrgbcolor +[] 0 setdash +0.00 0.00 0.00 C +910 268 CircleF 1412 364 CircleF 2123 460 CircleF 2413 556 CircleF @@ -699,11 +838,16 @@ LC0 setrgbcolor 4033 844 CircleF 4650 940 CircleF 5685 1036 CircleF +LTw +% End plot #2 +% Begin plot #3 1.000 UP 2.000 UL -LT0 -LC0 setrgbcolor -1.00 1.00 1.00 C 910 268 CircleF +LTb +LCb setrgbcolor +[] 0 setdash +1.00 1.00 1.00 C +910 268 CircleF 1412 364 CircleF 2123 460 CircleF 2413 556 CircleF @@ -712,11 +856,16 @@ LC0 setrgbcolor 4033 844 CircleF 4650 940 CircleF 5685 1036 CircleF +LTw +% End plot #3 +% Begin plot #4 1.500 UP 2.000 UL -LT0 -LC0 setrgbcolor -0.00 0.00 0.00 C 910 364 CircleF +LTb +LCb setrgbcolor +[] 0 setdash +0.00 0.00 0.00 C +910 364 CircleF 1412 460 CircleF 2123 556 CircleF 2413 652 CircleF @@ -725,11 +874,17 @@ LC0 setrgbcolor 4033 940 CircleF 4650 1036 CircleF 5685 1132 CircleF -1.000 UP +LTw +% End plot #4 2.000 UL LTb LCb setrgbcolor -0.00 0.00 0.00 C stroke +[] 0 setdash +1.000 UP +2.000 UL +LTb +0.00 0.00 0.00 C +stroke grestore end showpage diff --git a/pointprocesses/lecture/pointprocessscetchB.pdf b/pointprocesses/lecture/pointprocessscetchB.pdf index 205565805ff79bbb04692d7dda387c0c89c38943..1f5548d3dd891119f31f208cdaf3e96a08f1625d 100644 GIT binary patch delta 3077 zcmb7GdpK0<8rLY73EO4sqGU;;GUmcujL={PO$NE7n95ujx0zvPgfOHwYNL#(WGk0a zLZRF$b*e3wawoTli4ZC>^v?vK-1&wAGTt>5~+-~0aF^}OHnc5X@BD%5qf zCc%(~XsB-O+vIGhuC5(BghTh@`*PTLz=sFGf&du9nLr}$1uezFk>Kh~1Xq>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z<-7JJA@K@39#bIq%x>i?*4 zMQdK9j;!&m4QiW_0u<6_tTIx?24rqY+Envtm#&6uH#$eLtdUJT#P-%|yQAgdi(@<( zojw5zhnA{(rfyfLv)Kizipxi(cC*B)`Uv^P z7q0@&obf~5O?MNJrV|qW971{2WH=>wRN?cHTFEyyzp55prfHcBihWAv?+O39RH15y z-X|Fm5b9Y|c$(uERV6)L&rs4BRDilF=hQo*jPnypAD9Gd`FG7F`$Ig%*jvn0i|Ovy zzZ}*V2PsFn-2yj`4!n9(6LiefK0p>aqp-nTc{(4EPy7S)h)z0Z`GPU*dncjja<#l* zk%^`fDT=cm8T*^EKRe_8s=hs}zeviq&i@JNRQYsc#T4&vn&!UPO)J;Fm4QW#4(G5p zU4og#USg8|QPoFvI~+2qPPwp_b8LD}XAsjxkt9ovHJj z!H2lX2OVRT&t$ERL$%4CTnbjB(7Zy-yi&vH!=9M%xYCTH5!_)LhG?M8lp0SWlyUH*4cDq!^TT;$s@L5ZmpYCEN}HO4@fE?dO+ zzA#34Lr}I#z<5t>7IxKJ`rGeUx};lHhj=T3B$Rp-UD6d=!@sDP%>&}QJTXR5 z-Phi(oz3ER%{;2aOVJ(>-MiyW(9`&rFO?SsWqTEs*K3-oWf#U$!PvWy&gxKzOw z&m2-krl9OBGl!H4dFuxHo_l`y+v0|fci*HtF~EyTqY&Nwr2xB-?BNGM0U^M>9R@*T zSTRCjy!=QwwDN#HuL{Z&ibkW*?qDRu69I-oy-{Gu?gFEb-b4(>1L*;Uq0`-kE%{)m z^fF=9pVO}j8;L-`Ftj}kjzway5M;Wk23Q)rhc SL~j5Bj(`GGRZXqU0RI88|K<|_ diff --git a/statistics/exercises/exercises01.tex b/statistics/exercises/exercises01.tex index 68455b3..22f1131 100644 --- a/statistics/exercises/exercises01.tex +++ b/statistics/exercises/exercises01.tex @@ -15,7 +15,7 @@ \else \newcommand{\stitle}{} \fi -\header{{\bfseries\large Exercise 8\stitle}}{{\bfseries\large Statistics}}{{\bfseries\large December 2nd, 2019}} +\header{{\bfseries\large Exercise 7\stitle}}{{\bfseries\large Statistics}}{{\bfseries\large December 8th, 2020}} \firstpagefooter{Prof. Dr. Jan Benda}{Phone: 29 74573}{Email: jan.benda@uni-tuebingen.de} \runningfooter{}{\thepage}{} @@ -97,12 +97,13 @@ jan.benda@uni-tuebingen.de} \item Initially test computationally expensive \code{for} loops, vectors, matrices, etc. with small numbers of repetitions and/or sizes. Once it is working use large repetitions and/or sizes for - getting a good statistics. + getting a good statistics, i.e. smooth curves. \item Use the help functions of \code{matlab} (\code{help command} or \code{doc command}) and the internet to figure out how specific \code{matlab} functions are used and what features they offer. In addition, the internet offers a lot of material and suggestions for any question you have regarding your code ! +\item Work in groups! Nevertheless everybody should write down his/her own solution. \item Please upload your solution to the exercises to ILIAS as a zip-archive with the name ``statistics\_\{last name\}\_\{first name\}.zip''. \end{itemize} diff --git a/statistics/lecture/diehistograms.py b/statistics/lecture/diehistograms.py index 2458412..241bde7 100644 --- a/statistics/lecture/diehistograms.py +++ b/statistics/lecture/diehistograms.py @@ -15,7 +15,7 @@ ax1.set_xticks(range(1, 7)) ax1.set_xlabel('x') ax1.set_ylim(0, 98) ax1.set_ylabel('Frequency') -fs = fsC +fs = dict(**fsC) fs['color'] = [fsC['facecolor'], fsE['facecolor']] del fs['facecolor'] ax1.hist([x2, x1], bins, **fs) @@ -26,9 +26,11 @@ ax2.set_xlabel('x') ax2.set_ylim(0, 0.23) ax2.set_ylabel('Probability') ax2.plot([0.2, 6.8], [1.0/6.0, 1.0/6.0], zorder=-10, **lsAm) -if mpl_major > 1: - ax2.hist([x2, x1], bins, density=True, zorder=-5, **fs) -else: - ax2.hist([x2, x1], bins, normed=True, zorder=-5, **fs) +h1, b1 = np.histogram(x1, bins) +h2, b2 = np.histogram(x2, bins) +h1 = h1/np.sum(h1) +h2 = h2/np.sum(h2) +ax2.bar(b1[:-1]+0.3, h1, zorder=-5, width=0.4, **fsC) +ax2.bar(b2[:-1]+0.7, h2, zorder=-5, width=0.4, **fsE) fig.subplots_adjust(left=0.125) fig.savefig('diehistograms.pdf')