analistica/slides/sections/8.md

239 lines
7.3 KiB
Markdown
Raw Normal View History

2020-06-11 18:30:30 +02:00
# Results
2020-06-09 16:53:16 +02:00
2020-06-11 18:30:30 +02:00
## Compatibility test
2020-06-09 16:53:16 +02:00
2020-06-11 18:30:30 +02:00
Comparing sample properties:
2020-06-09 16:53:16 +02:00
2020-06-10 16:23:33 +02:00
$$
2020-06-11 18:30:30 +02:00
p = 1 - \text{erf} \left( \frac{t}{\sqrt{2}} \right)\ \with
t = \frac{|x\ex - x\ob|}{\sqrt{\sigma\ex^2 + \sigma\ob^2}}
2020-06-10 16:23:33 +02:00
$$
2020-06-09 16:53:16 +02:00
2020-06-11 18:30:30 +02:00
- $x\ex$ and $x\ob$ are the expected and observed values
- $\sigma\ex$ and $\sigma\ob$ are their absolute errors
2020-06-10 16:23:33 +02:00
. . .
2020-06-09 16:53:16 +02:00
2020-06-11 18:30:30 +02:00
At 95% confidence level, the values are compatible if:
$$
p > 0.05
$$
## Compatibility test
\setbeamercovered{}
\begin{center}
\begin{tikzpicture}[>=Stealth]
2020-06-11 18:30:30 +02:00
%notes
\draw [very thick, gray] (0,0) -- (0,3);
\draw [very thick, gray] (-1.45,1.5) -- (1.45,1.5);
\draw [very thick, gray] (-1.35,1.3) -- (-1.55,1.7);
\draw [very thick, gray] ( 1.35,1.3) -- ( 1.55,1.7);
2020-06-11 18:43:53 +02:00
\node at (0,-0.4) {$x\ex$};
\node [right] at (1.7,1.7) {$2 \, \sqrt{\sigma\ex^2 + \sigma\ob^2}$};
2020-06-11 18:30:30 +02:00
% axes
\draw [very thick, <->] (-5,4) -- (-5,0) -- (5,0);
2020-06-11 18:43:53 +02:00
\node [right] at (5,0) {$x$};
2020-06-11 18:30:30 +02:00
% Gaussian
\draw [domain=-5:5, smooth, variable=\x, cyclamen, very thick]
plot ({\x}, {3*exp(-(\x*\x/3))});
\pause
% area
\fill [domain=2:5, smooth, variable=\x, cyclamen!20!white, very thick]
(2,0) -- plot ({\x}, {3*exp(-(\x*\x/3))}) -- (5,0) -- cycle;
\fill [domain=-5:-2, smooth, variable=\x, cyclamen!20!white, very thick]
(-5,0) -- plot ({\x}, {3*exp(-(\x*\x/3))}) -- (-2,0) -- cycle;
% axes
\draw [very thick, <->] (-5,4) -- (-5,0) -- (5,0);
% Gaussian
\draw [domain=-5:5, smooth, variable=\x, cyclamen, very thick]
plot ({\x}, {3*exp(-(\x*\x/3))});
%notes
\draw [thick, cyclamen] (-2,0) -- (-2,0.8);
\draw [thick, cyclamen] ( 2,0) -- ( 2,0.8);
2020-06-11 18:43:53 +02:00
\node at (2,-0.4) {$x\ob$};
2020-06-11 18:30:30 +02:00
\end{tikzpicture}
\end{center}
\setbeamercovered{transparent}
2020-06-09 16:53:16 +02:00
## Other tests
**KS test**:
- $K_0 = \sqrt{N}D_N$
- $p = 1 - P(K \leq K_0)$
. . .
**Trapani test**:
- $\Theta \to \chi^2$
- $p = 1 - P(\chi^2 \leq \Theta)$
. . .
In either case: 95\% confidence level
$$
p > 0.05
$$
2020-06-12 14:31:08 +02:00
## L sample results
2020-06-09 16:53:16 +02:00
2020-06-13 14:26:23 +02:00
\vspace{20pt}
2020-06-11 23:25:25 +02:00
\begin{center}
\begin{tabular}{rcccc}
\toprule
& & median & mode & fwhm \\
2020-06-11 23:25:25 +02:00
\midrule
2020-06-13 14:26:23 +02:00
\multirow{2}{*}{50000} & $t$ & 0.027 & 1.012 & 1.338 \\
& $p$ & \gre{0.979} & \gre{0.311} & \gre{0.181} \\
2020-06-11 23:25:25 +02:00
\midrule
2020-06-13 14:26:23 +02:00
\multirow{2}{*}{5000} & $t$ & 0.912 & 0.200 & 3.033 \\
& $p$ & \gre{0.362} & \gre{0.841} & \red{0.002} \\
2020-06-11 23:25:25 +02:00
\midrule
2020-06-13 14:26:23 +02:00
\multirow{2}{*}{1000} & $t$ & 1.189 & 0.232 & 0.208 \\
& $p$ & \gre{0.235} & \gre{0.817} & \gre{0.835} \\
2020-06-11 23:25:25 +02:00
\toprule
\end{tabular}
\end{center}
2020-06-09 16:53:16 +02:00
\setbeamercovered{}
\begin{center}
\begin{tikzpicture}[>=Stealth, overlay]
2020-06-13 14:26:23 +02:00
% Rectangles
\draw <2> [gray, very thick] (-1.4,0.3) rectangle (0.4,5.5);
\draw <3> [gray, very thick] (0.4,0.3) rectangle (2,5.5);
\draw <4> [gray, very thick] (2,0.3) rectangle (3.8,5.5);
% Estimations ellipses
\draw <5-> [cyclamen, thick] (2.8,2.18) ellipse (0.8cm and 0.3cm);
\draw <5-> [cyclamen, thick] (2.8,0.8) ellipse (0.8cm and 0.3cm);
% Estimations notes
\draw <6> [fill=white] (-5.5,-0.1) rectangle (0.3,2.3);
\node <6> [above right, align=right] at (-5.5,-0.1) {
$w\ex = 4.02... \hspace{22pt} $\\
$50000 \hence w\ob = 4.11 \pm 0.07$\\
$5000 \hence w\ob = 4.40 \pm 0.13$\\
$1000 \hence w\ob = 3.96 \pm 0.27$};
% FHWM notes
\draw <7-> [fill=white] (-5.5,2.9) rectangle (-1.4,5.1);
\node <7-> [above right, align=center] at (-5.5,3) {
$f_\varepsilon(x) = \frac{1}{N\varepsilon} \sum_{i = 1}^N
G \left( \frac{x-x_i}{\varepsilon} \right)$\\\\
$\varepsilon = 0.88 \, S_N
\left( \frac{d + 2}{4}N \right)^{-1/(d + 4)}$};
\draw <8> [cyclamen, thick] (-4.45,3.45) ellipse (0.4cm and 0.3cm);
\end{tikzpicture}
\end{center}
\setbeamercovered{transparent}
2020-06-09 16:53:16 +02:00
2020-06-12 14:31:08 +02:00
## M sample results
2020-06-09 16:53:16 +02:00
2020-06-13 14:26:23 +02:00
\vspace{20pt}
2020-06-11 23:25:25 +02:00
\begin{center}
\begin{tabular}{rcccc}
\toprule
& & median & mode & fwhm \\
2020-06-11 23:25:25 +02:00
\midrule
2020-06-13 14:26:23 +02:00
\multirow{2}{*}{50000} & $t$ & 58.01 & 0.732 & 1.329 \\
& $p$ & \gre{0.000} & \gre{0.464} & \gre{0.184} \\
\midrule
2020-06-13 14:26:23 +02:00
\multirow{2}{*}{5000} & $t$ & 16.80 & 0.014 & 0.215 \\
& $p$ & \gre{0.000} & \gre{0.989} & \gre{0.830} \\
\midrule
\multirow{2}{*}{1000} & $t$ & 11.61 & 0.028 & 1.001 \\
& $p$ & \gre{0.000} & \gre{0.978} & \gre{0.317} \\
2020-06-11 23:25:25 +02:00
\toprule
\end{tabular}
\end{center}
2020-06-09 16:53:16 +02:00
2020-06-13 14:26:23 +02:00
\setbeamercovered{}
\begin{center}
\begin{tikzpicture}[>=Stealth, overlay]
% Rectangles
\draw <2,3> [gray, very thick] (-1.4,0.3) rectangle (0.4,5.5);
\draw <4> [gray, very thick] (0.4,0.3) rectangle (2,5.5);
\draw <5,6,7> [gray, very thick] (2,0.3) rectangle (3.8,5.5);
\node <6> at (-2,2.5) {\includegraphics{images/gamo-pdf.pdf}};
\node <7> at (-2,2.5) {\includegraphics{images/gala-pdf.pdf}};
\draw <6,7> [thick] (-5.15,0) rectangle (1.22,5.05);
% Estimations notes
\draw <3> [fill=white] (1,2.6) rectangle (3.4,3.9);
\node <3> [above right, align=right] at (1,2.6) {
$m_M = 0.658...$\\
$m_L = 1.355...$};
2020-06-13 14:26:23 +02:00
\end{tikzpicture}
\end{center}
\setbeamercovered{transparent}
2020-06-09 16:53:16 +02:00
2020-06-11 23:25:25 +02:00
## KS samples results
2020-06-13 14:26:23 +02:00
\vspace{10pt}
2020-06-11 23:25:25 +02:00
\begin{center}
\begin{tabular}{rccc}
2020-06-11 23:25:25 +02:00
\toprule
& & L sample & M sample \\
2020-06-11 23:25:25 +02:00
\midrule
2020-06-12 11:19:58 +02:00
\multirow{2}{*}{50000} & $D$ & 0.004 & 0.153 \\
& $p$ & \gre{0.379} & \gre{0.000} \\
2020-06-13 14:26:23 +02:00
\midrule
\multirow{2}{*}{5000} & $D$ & 0.010 & 0.148 \\
& $p$ & \gre{0.714} & \gre{0.000} \\
\midrule
\multirow{2}{*}{1000} & $D$ & 0.026 & 0.162 \\
& $p$ & \gre{0.478} & \gre{0.000} \\
\midrule
\multirow{2}{*}{200} & $D$ & 0.054 & 0.205 \\
& $p$ & \gre{0.579} & \gre{0.000} \\
2020-06-11 23:25:25 +02:00
\toprule
\end{tabular}
\end{center}
2020-06-09 16:53:16 +02:00
2020-06-13 14:26:23 +02:00
\setbeamercovered{}
\begin{center}
\begin{tikzpicture}[>=Stealth, overlay]
% Rectangles
\draw <2> [gray, very thick] (-1,0.3) rectangle (1,6.9);
\draw <3> [gray, very thick] (1,0.3) rectangle (3.3,6.9);
% 200 points ellipse
\draw <4> [gray, very thick] (-3.5,0.3) rectangle (3.5,1.9);
\end{tikzpicture}
\end{center}
\setbeamercovered{transparent}
2020-06-11 23:25:25 +02:00
## Trapani samples results
2020-06-09 16:53:16 +02:00
2020-06-13 14:26:23 +02:00
\vspace{20pt}
2020-06-11 23:25:25 +02:00
\begin{center}
\begin{tabular}{rccccc}
2020-06-11 23:25:25 +02:00
\toprule
& & \multicolumn{2}{c}{L sample} & \multicolumn{2}{c}{M sample} \\
& & $\mu_1$ & $\mu_2$ & $\mu_1$ & $\mu_2$ \\
2020-06-11 23:25:25 +02:00
\midrule
2020-06-13 14:26:23 +02:00
\multirow{2}{*}{50000} & $\Theta$ & 0.255 & 0.432 & 106.1 & 162.5 \\
2020-06-12 11:19:58 +02:00
& $p$ & \gre{0.614} & \gre{0.511} & \gre{0.000} & \gre{0.000} \\
2020-06-13 14:26:23 +02:00
\midrule
\multirow{2}{*}{5000} & $\Theta$ & 2.178 & 2.556 & 23.36 & 36.48 \\
& $p$ & \gre{0.140} & \gre{0.110} & \gre{0.000} & \gre{0.000} \\
\midrule
\multirow{2}{*}{1000} & $\Theta$ & 0.694 & 0.060 & 5.985 & 7.302 \\
& $p$ & \gre{0.405} & \gre{0.549} & \gre{0.014} & \gre{0.007} \\
2020-06-11 23:25:25 +02:00
\toprule
\end{tabular}
\end{center}
2020-06-13 14:26:23 +02:00
\setbeamercovered{}
\begin{center}
\begin{tikzpicture}[>=Stealth, overlay]
% Rectangles
2020-06-13 17:21:42 +02:00
\draw <2> [gray, very thick] (-2,0.3) rectangle (1,6.1);
\draw <3> [gray, very thick] (1,0.3) rectangle (4.2,6.1);
2020-06-13 14:26:23 +02:00
\end{tikzpicture}
\end{center}
\setbeamercovered{transparent}