From cfa152523677456fc727004af148e6fc8e42973d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gi=C3=B9=20Marcer?= Date: Fri, 12 Jun 2020 00:09:22 +0200 Subject: [PATCH] sections: add image for sample median --- slides/sections/4.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/slides/sections/4.md b/slides/sections/4.md index 842c4f7..bf961ad 100644 --- a/slides/sections/4.md +++ b/slides/sections/4.md @@ -42,6 +42,41 @@ How to estimate sample median, mode and FWHM? ::: :::: +\setbeamercovered{} +\begin{center} +\begin{tikzpicture}[remember picture, >=Stealth] + % line + \draw [line width=3, ->, cyclamen] (-5,0) -- (5,0); + \node [right] at (5,0) {$x$}; + % points + \draw [yellow!50!black, fill=yellow] (-4.6,-0.1) rectangle (-4.8,0.1); + \draw [yellow!50!black, fill=yellow] (-4,-0.1) rectangle (-4.2,0.1); + \draw [yellow!50!black, fill=yellow] (-3.3,-0.1) rectangle (-3.5,0.1); + \draw [yellow!50!black, fill=yellow] (-2.3,-0.1) rectangle (-2.5,0.1); + \draw [yellow!50!black, fill=yellow] (-0.6,-0.1) rectangle (-0.8,0.1); + \draw [yellow!50!black, fill=yellow] (-0.1,-0.1) rectangle (0.1,0.1); + \draw [yellow!50!black, fill=yellow] (1.1,-0.1) rectangle (1.3,0.1); + \draw [yellow!50!black, fill=yellow] (2,-0.1) rectangle (2.2,0.1); + \draw [yellow!50!black, fill=yellow] (2.7,-0.1) rectangle (2.9,0.1); + \draw [yellow!50!black, fill=yellow] (4,-0.1) rectangle (4.2,0.1); + \pause + % nodes + \node [below] at (-4.7,-0.1) {1}; + \node [below] at (-4.1,-0.1) {2}; + \node [below] at (-3.4,-0.1) {3}; + \node [below] at (-2.4,-0.1) {4}; + \node [below] at (-0.7,-0.1) {5}; + \node [below] at ( 0 ,-0.1) {6}; + \node [below] at ( 1.2,-0.1) {7}; + \node [below] at ( 2.1,-0.1) {8}; + \node [below] at ( 2.8,-0.1) {9}; + \node [below] at ( 4.1,-0.1) {10}; + \pause + \draw [ultra thick] (-0.35,0.7) -- (-0.35,-0.7); +\end{tikzpicture} +\end{center} +\setbeamercovered{transparent} + ## Sample mode