sections: fix a lot of things
This commit is contained in:
parent
57d6b7205c
commit
da3fa68172
@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
title: Title
|
title: Testing for a Landau distribution
|
||||||
date: \today
|
date: \today
|
||||||
author:
|
author:
|
||||||
- Giulia Marcer
|
- Giulia Marcer
|
||||||
@ -16,9 +16,19 @@ fontsize: 12pt
|
|||||||
mainfont: Fira Sans
|
mainfont: Fira Sans
|
||||||
mainfontoptions:
|
mainfontoptions:
|
||||||
- BoldFont=Fira Sans
|
- BoldFont=Fira Sans
|
||||||
|
|
||||||
mathfont: FiraMath-Regular
|
mathfont: FiraMath-Regular
|
||||||
|
|
||||||
|
references:
|
||||||
|
- type: article-journal
|
||||||
|
id: trapani15
|
||||||
|
author:
|
||||||
|
family: Trapani
|
||||||
|
given: Lorenzo
|
||||||
|
title: testing for (in)finite moments
|
||||||
|
container-title: Journal of Econometrix
|
||||||
|
issued:
|
||||||
|
year: 2015
|
||||||
|
|
||||||
header-includes: |
|
header-includes: |
|
||||||
```{=latex}
|
```{=latex}
|
||||||
%% Colors
|
%% Colors
|
||||||
@ -32,6 +42,11 @@ header-includes: |
|
|||||||
\definecolor{yellow}{HTML}{CFB017}
|
\definecolor{yellow}{HTML}{CFB017}
|
||||||
|
|
||||||
\setbeamercolor{frametitle}{bg=mDarkRed}
|
\setbeamercolor{frametitle}{bg=mDarkRed}
|
||||||
|
\definecolor{cyclamen}{RGB}{146,24,43}
|
||||||
|
|
||||||
|
\usepackage{ulem}
|
||||||
|
\newcommand\strike{\bgroup\markoverwith{%
|
||||||
|
\textcolor{mDarkRed}{\rule[0.5ex]{2pt}{1pt}}}\ULon}
|
||||||
|
|
||||||
% center images
|
% center images
|
||||||
\LetLtxMacro{\oldIncludegraphics}{\includegraphics}
|
\LetLtxMacro{\oldIncludegraphics}{\includegraphics}
|
||||||
@ -40,6 +55,7 @@ header-includes: |
|
|||||||
\oldIncludegraphics[#1]{#2}
|
\oldIncludegraphics[#1]{#2}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
% "thus" in formulas
|
% "thus" in formulas
|
||||||
\DeclareMathOperator{\thus}{%
|
\DeclareMathOperator{\thus}{%
|
||||||
\hspace{30pt} \Longrightarrow \hspace{30pt}
|
\hspace{30pt} \Longrightarrow \hspace{30pt}
|
||||||
@ -69,5 +85,9 @@ header-includes: |
|
|||||||
\DeclareMathOperator{\ob}{%
|
\DeclareMathOperator{\ob}{%
|
||||||
^{\text{obs}}
|
^{\text{obs}}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
\setbeamercovered{transparent}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
csl: ../notes/docs/bibliography.csl
|
||||||
...
|
...
|
||||||
|
@ -3,24 +3,26 @@
|
|||||||
|
|
||||||
## Goal
|
## Goal
|
||||||
|
|
||||||
- Generate a sample $L$ of points from a Landau PDF
|
Construct six statistical tests to assert whether a sample comes from a Landau
|
||||||
- Generate a sample $M$ of points from a Moyal PDF
|
distribution
|
||||||
|
|
||||||
. . .
|
. . .
|
||||||
|
|
||||||
- Implement a bunch of statistical tests
|
- Generate a sample $L$ from a Landau PDF
|
||||||
|
- Generate a sample $M$ from a Moyal PDF
|
||||||
|
|
||||||
. . .
|
. . .
|
||||||
|
|
||||||
- Check if they work:
|
$H_0$: sample following Landau PDF
|
||||||
- the sample $L$ truly comes from a Landau PDF
|
|
||||||
- the sample $M$ does not come from a Landau PDF
|
- can we accept $H_0$ for $L$?
|
||||||
|
- can we reject $H_0$ for $M$?
|
||||||
|
|
||||||
|
|
||||||
## Why?
|
## Why Moyal?
|
||||||
|
|
||||||
The Landau and Moyal PDFs are really similar. Historically, the latter was
|
The Landau and Moyal PDFs are really similar. Historically, the latter was
|
||||||
utilized in the approximation of the former.
|
utilized as an approximation of the former.
|
||||||
|
|
||||||
:::: {.columns}
|
:::: {.columns}
|
||||||
::: {.column width=33%}
|
::: {.column width=33%}
|
||||||
@ -79,15 +81,18 @@ utilized in the approximation of the former.
|
|||||||
|
|
||||||
. . .
|
. . .
|
||||||
|
|
||||||
- Parameters comparison:
|
- **Properties test**:
|
||||||
- compatibility between expected and observed PDF parameters
|
|
||||||
|
compatibility between expected and observed PDF properties
|
||||||
|
|
||||||
. . .
|
. . .
|
||||||
|
|
||||||
- Kolmogorov - Smirnov test:
|
- **Kolmogorov - Smirnov test**:
|
||||||
- compatibility between expected and observed CDF
|
|
||||||
|
compatibility between expected and empirical CDF
|
||||||
|
|
||||||
. . .
|
. . .
|
||||||
|
|
||||||
- Trapani test:
|
- **Trapani test**:
|
||||||
- compatibility between expected and observed moments
|
|
||||||
|
test for finite or infinite moments
|
||||||
|
@ -1,18 +1,24 @@
|
|||||||
# Landau PDF
|
# Landau PDF
|
||||||
|
|
||||||
|
|
||||||
## A pathological distribution
|
## Landau PDF
|
||||||
|
|
||||||
Because of its fat tail:
|
:::: {.columns}
|
||||||
|
::: {.column width=50% .c}
|
||||||
|
$$
|
||||||
|
L(x) = \frac{1}{\pi} \int \limits_{0}^{+ \infty}
|
||||||
|
dt \, e^{-t \ln(t) -xt} \sin (\pi t)
|
||||||
|
$$
|
||||||
|
:::
|
||||||
|
|
||||||
\begin{align*}
|
::: {.column width=50%}
|
||||||
E[x] &\longrightarrow + \infty \\
|
![](images/landau-pdf.pdf)
|
||||||
V[x] &\longrightarrow + \infty
|
:::
|
||||||
\end{align*}
|
::::
|
||||||
|
|
||||||
. . .
|
. . .
|
||||||
|
|
||||||
No closed form for parameters $\thus$ numerical estimations
|
No closed form for \textcolor{cyclamen}{ANYTHING}
|
||||||
|
|
||||||
|
|
||||||
## Landau median
|
## Landau median
|
||||||
@ -28,9 +34,17 @@ $$
|
|||||||
- CDF computed by numerical integration
|
- CDF computed by numerical integration
|
||||||
- QDF computed by numerical root-finding (Brent)
|
- QDF computed by numerical root-finding (Brent)
|
||||||
|
|
||||||
$$
|
\setbeamercovered{}
|
||||||
m_L\ex = 1.3557804...
|
|
||||||
$$
|
\begin{center}
|
||||||
|
\begin{tikzpicture}[remember picture]
|
||||||
|
\node at (0,0) (here) {$m_L\ex = 1.3557804...$};
|
||||||
|
\pause
|
||||||
|
\node [opacity=0.5, xscale=0.35, yscale=0.25 ] at (here) {\includegraphics{images/high.png}};
|
||||||
|
\end{tikzpicture}
|
||||||
|
\end{center}
|
||||||
|
|
||||||
|
\setbeamercovered{transparent}
|
||||||
|
|
||||||
|
|
||||||
## Landau mode
|
## Landau mode
|
||||||
@ -41,9 +55,17 @@ $$
|
|||||||
|
|
||||||
- Computed by numerical minimization (Brent)
|
- Computed by numerical minimization (Brent)
|
||||||
|
|
||||||
$$
|
\setbeamercovered{}
|
||||||
\mu_L\ex = − 0.22278...
|
|
||||||
$$
|
\begin{center}
|
||||||
|
\begin{tikzpicture}[remember picture]
|
||||||
|
\node at (0,0) (here) {$\mu_L\ex = − 0.22278...$};
|
||||||
|
\pause
|
||||||
|
\node [opacity=0.5, xscale=0.32, yscale=0.25 ] at (here) {\includegraphics{images/high.png}};
|
||||||
|
\end{tikzpicture}
|
||||||
|
\end{center}
|
||||||
|
|
||||||
|
\setbeamercovered{transparent}
|
||||||
|
|
||||||
|
|
||||||
## Landau FWHM
|
## Landau FWHM
|
||||||
@ -62,6 +84,14 @@ $$
|
|||||||
|
|
||||||
- Computed by numerical root finding (Brent)
|
- Computed by numerical root finding (Brent)
|
||||||
|
|
||||||
$$
|
\setbeamercovered{}
|
||||||
w_L\ex = 4.018645...
|
|
||||||
$$
|
\begin{center}
|
||||||
|
\begin{tikzpicture}[remember picture]
|
||||||
|
\node at (0,0) (here) {$w_L\ex = 4.018645...$};
|
||||||
|
\pause
|
||||||
|
\node [opacity=0.5, xscale=0.32, yscale=0.25 ] at (here) {\includegraphics{images/high.png}};
|
||||||
|
\end{tikzpicture}
|
||||||
|
\end{center}
|
||||||
|
|
||||||
|
\setbeamercovered{transparent}
|
||||||
|
@ -121,12 +121,8 @@ $$
|
|||||||
## Moyal FWHM
|
## Moyal FWHM
|
||||||
|
|
||||||
$$
|
$$
|
||||||
x_+ - x_- = W_0 \left( - \frac{1}{4 e} \right)
|
x_+ - x_- = 3.590806098... = a
|
||||||
- W_{-1} \left( - \frac{1}{4 e} \right)
|
|
||||||
= 3.590806098...
|
|
||||||
= a
|
|
||||||
$$
|
$$
|
||||||
|
|
||||||
\begin{align*}
|
\begin{align*}
|
||||||
M(z)
|
M(z)
|
||||||
&\thus w_M^{\text{exp}} = a \\
|
&\thus w_M^{\text{exp}} = a \\
|
||||||
|
@ -1,26 +1,31 @@
|
|||||||
# Sample parameters estimation
|
# Sample statistics
|
||||||
|
|
||||||
|
|
||||||
## Sample parameters estimation
|
## Sample statistics
|
||||||
|
|
||||||
Once the points are sampled,
|
How to estimate sample median, mode and FWHM?
|
||||||
how to estimate their median, mode and FWHM?
|
|
||||||
|
|
||||||
. . .
|
. . .
|
||||||
|
|
||||||
- Binning data $\hence$ result depending on bin-width
|
- \only<3>\strike{Binning data $\hence$ depends wildly on bin-width}
|
||||||
|
|
||||||
. . .
|
. . .
|
||||||
|
|
||||||
- Alternative solutions
|
- Alternative solutions
|
||||||
|
- Robust estimators
|
||||||
|
- Kernel density estimation
|
||||||
|
|
||||||
|
|
||||||
## Sample median
|
## Sample median
|
||||||
|
|
||||||
|
:::: {.columns}
|
||||||
|
::: {.column width=50% .c}
|
||||||
$$
|
$$
|
||||||
m = Q \left( \frac{1}{2} \right)
|
F(m) = \frac{1}{2}
|
||||||
$$
|
$$
|
||||||
|
|
||||||
|
\vspace{20pt}
|
||||||
|
|
||||||
. . .
|
. . .
|
||||||
|
|
||||||
- Sort points in ascending order
|
- Sort points in ascending order
|
||||||
@ -28,7 +33,14 @@ $$
|
|||||||
. . .
|
. . .
|
||||||
|
|
||||||
- Middle element if odd
|
- Middle element if odd
|
||||||
- Average of the two central elements if even
|
|
||||||
|
Average of the two central elements if even
|
||||||
|
:::
|
||||||
|
|
||||||
|
::: {.column width=50%}
|
||||||
|
![](images/median.pdf)
|
||||||
|
:::
|
||||||
|
::::
|
||||||
|
|
||||||
|
|
||||||
## Sample mode
|
## Sample mode
|
||||||
@ -37,11 +49,78 @@ Most probable value
|
|||||||
|
|
||||||
. . .
|
. . .
|
||||||
|
|
||||||
HSM
|
Half Sample Mode
|
||||||
|
|
||||||
- Iteratively identify the smallest interval containing half points
|
- Iteratively identify the smallest interval containing half points
|
||||||
- Once the sample is reduced to less than three points, take average
|
- Once the sample is reduced to less than three points, take average
|
||||||
|
|
||||||
|
. . .
|
||||||
|
|
||||||
|
\setbeamercovered{}
|
||||||
|
|
||||||
|
\begin{center}
|
||||||
|
\begin{tikzpicture}[remember picture]
|
||||||
|
% line
|
||||||
|
\draw [line width=3, ->, cyclamen] (-5,0) -- (5,0);
|
||||||
|
\node [right] at (5,0) {$x$};
|
||||||
|
% points
|
||||||
|
\draw [blue, fill=blue] (-4.6,-0.1) rectangle (-4.8,0.1);
|
||||||
|
\draw [blue, fill=blue] (-4,-0.1) rectangle (-4.2,0.1);
|
||||||
|
\draw [blue, fill=blue] (-3.3,-0.1) rectangle (-3.5,0.1);
|
||||||
|
\draw [blue, fill=blue] (-2.3,-0.1) rectangle (-2.5,0.1);
|
||||||
|
\draw [blue, fill=blue] (-0.6,-0.1) rectangle (-0.8,0.1);
|
||||||
|
\draw [blue, fill=blue] (-0.1,-0.1) rectangle (0.1,0.1);
|
||||||
|
\draw [blue, fill=blue] (1.1,-0.1) rectangle (1.3,0.1);
|
||||||
|
\draw [blue, fill=blue] (2 ,-0.1) rectangle (2.2,0.1);
|
||||||
|
\draw [blue, fill=blue] (2.7,-0.1) rectangle (2.9,0.1);
|
||||||
|
\draw [blue, fill=blue] (4,-0.1) rectangle (4.2,0.1);
|
||||||
|
% future nodes
|
||||||
|
\node at (-1,-0.3) (1a) {};
|
||||||
|
\node at (3.1,0.3) (1b) {};
|
||||||
|
\node at (0.9,-0.3) (2a) {};
|
||||||
|
\node at (1.8,-0.3) (3a) {};
|
||||||
|
% result nodes
|
||||||
|
\node at (2.45,-0.7) (f1) {};
|
||||||
|
\node at (2.45,0.7) (f2) {};
|
||||||
|
\end{tikzpicture}
|
||||||
|
\end{center}
|
||||||
|
|
||||||
|
. . .
|
||||||
|
|
||||||
|
\begin{center}
|
||||||
|
\begin{tikzpicture}[remember picture, overlay]
|
||||||
|
% region
|
||||||
|
\draw [orange, fill=orange, opacity=0.5] (1a) rectangle (1b);
|
||||||
|
\end{tikzpicture}
|
||||||
|
\end{center}
|
||||||
|
|
||||||
|
. . .
|
||||||
|
|
||||||
|
\begin{center}
|
||||||
|
\begin{tikzpicture}[remember picture, overlay]
|
||||||
|
% region
|
||||||
|
\draw [orange, fill=orange, opacity=0.5] (2a) rectangle (1b);
|
||||||
|
\end{tikzpicture}
|
||||||
|
\end{center}
|
||||||
|
|
||||||
|
. . .
|
||||||
|
|
||||||
|
\begin{center}
|
||||||
|
\begin{tikzpicture}[remember picture, overlay]
|
||||||
|
% region
|
||||||
|
\draw [orange, fill=orange, opacity=0.5] (3a) rectangle (1b);
|
||||||
|
\end{tikzpicture}
|
||||||
|
\end{center}
|
||||||
|
|
||||||
|
. . .
|
||||||
|
|
||||||
|
\begin{center}
|
||||||
|
\begin{tikzpicture}[remember picture, overlay]
|
||||||
|
% region
|
||||||
|
\draw [cyclamen, ultra thick] (f1) -- (f2);
|
||||||
|
\end{tikzpicture}
|
||||||
|
\end{center}
|
||||||
|
|
||||||
|
|
||||||
## Sample FWHM
|
## Sample FWHM
|
||||||
|
|
||||||
@ -49,9 +128,10 @@ $$
|
|||||||
\text{FWHM} = x_+ - x_- \with L(x_{\pm}) = \frac{L_{\text{max}}}{2}
|
\text{FWHM} = x_+ - x_- \with L(x_{\pm}) = \frac{L_{\text{max}}}{2}
|
||||||
$$
|
$$
|
||||||
|
|
||||||
|
\setbeamercovered{transparent}
|
||||||
. . .
|
. . .
|
||||||
|
|
||||||
KDE
|
Kernel Density Estimation
|
||||||
|
|
||||||
- empirical PDF construction:
|
- empirical PDF construction:
|
||||||
|
|
||||||
@ -82,9 +162,9 @@ with:
|
|||||||
|
|
||||||
. . .
|
. . .
|
||||||
|
|
||||||
\vspace{10pt}
|
Numerical minimization (Brent) for $\quad f_{\varepsilon_{\text{max}}}$
|
||||||
|
Numerical root finding (Brent) for $\quad f_{\varepsilon}(x_{\pm}) =
|
||||||
Numerical root finding (Brent)
|
\frac{f_{\varepsilon_{\text{max}}}}{2}$
|
||||||
|
|
||||||
|
|
||||||
## Sample FWHM
|
## Sample FWHM
|
||||||
|
@ -1,81 +1,43 @@
|
|||||||
# MC simulations
|
# Kolmogorov - Smirnov test
|
||||||
|
|
||||||
|
|
||||||
## In summary
|
## KS
|
||||||
|
|
||||||
-----------------------------------------------------
|
Quantify distance between expected and observed CDF
|
||||||
Landau Moyal
|
|
||||||
----------------- ----------------- -----------------
|
|
||||||
median $m_L\ex$ $m_M\ex (μ, σ)$
|
|
||||||
|
|
||||||
mode $\mu_L\ex$ $\mu_M\ex (μ)$
|
. . .
|
||||||
|
|
||||||
FWHM $w_L\ex$ $w_M\ex (σ)$
|
KS statistic:
|
||||||
-----------------------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
## Moyal parameters
|
|
||||||
|
|
||||||
A $M(x)$ similar to $L(x)$ can be found by imposing:
|
|
||||||
|
|
||||||
\vspace{15pt}
|
|
||||||
|
|
||||||
- equal mode
|
|
||||||
$$
|
$$
|
||||||
\mu_M\ex = \mu_L\ex \approx −0.22278298...
|
D_N = \text{sup}_x |F_N(x) - F(x)|
|
||||||
|
$$
|
||||||
|
|
||||||
|
- $F(x)$ is the expected CDF
|
||||||
|
- $F_N(x)$ is the empirical CDF of $N$ sampled points
|
||||||
|
- sort points in ascending order
|
||||||
|
- number of points preceding the point normalized by $N$
|
||||||
|
|
||||||
|
|
||||||
|
## KS
|
||||||
|
|
||||||
|
$H_0$: points sampled according to $F(x)$
|
||||||
|
|
||||||
|
. . .
|
||||||
|
|
||||||
|
If $H_0$ is true:
|
||||||
|
|
||||||
|
- $\sqrt{N}D_N \xrightarrow{N \rightarrow + \infty} K$
|
||||||
|
|
||||||
|
Kolmogorov distribution with CDF:
|
||||||
|
|
||||||
|
$$
|
||||||
|
P(K \leqslant K_0) = 1 - p = \frac{\sqrt{2 \pi}}{K_0}
|
||||||
|
\sum_{j = 1}^{+ \infty} e^{-(2j - 1)^2 \pi^2 / 8 K_0^2}
|
||||||
$$
|
$$
|
||||||
|
|
||||||
. . .
|
. . .
|
||||||
|
|
||||||
- equal width
|
a $p$-value can be computed
|
||||||
$$
|
|
||||||
w_M\ex = w_L\ex = \sigma \cdot a
|
|
||||||
$$
|
|
||||||
|
|
||||||
$$
|
- At 95% confidence level, $H_0$ cannot be disproved if $p > 0.05$
|
||||||
\implies \sigma_M \approx 1.1191486...
|
|
||||||
$$
|
|
||||||
|
|
||||||
|
|
||||||
## Moyal parameters
|
|
||||||
|
|
||||||
:::: {.columns}
|
|
||||||
::: {.column width=50%}
|
|
||||||
![](images/both-pdf-bef.pdf)
|
|
||||||
:::
|
|
||||||
|
|
||||||
::: {.column width=50%}
|
|
||||||
![](images/both-pdf-aft.pdf)
|
|
||||||
:::
|
|
||||||
::::
|
|
||||||
|
|
||||||
|
|
||||||
## Moyal parameters
|
|
||||||
|
|
||||||
This leads to more different medians:
|
|
||||||
|
|
||||||
\begin{align*}
|
|
||||||
m_M = 0.787... \thus &m_M = 0.658... \\
|
|
||||||
&m_L = 1.355...
|
|
||||||
\end{align*}
|
|
||||||
|
|
||||||
|
|
||||||
## Compatibility test
|
|
||||||
|
|
||||||
Comparing results:
|
|
||||||
|
|
||||||
$$
|
|
||||||
p = 1 - \text{erf} \left( \frac{t}{\sqrt{2}} \right)\ \with
|
|
||||||
t = \frac{|x\ex - x\ob|}{\sqrt{\sigma\ex^2 + \sigma\ob^2}}
|
|
||||||
$$
|
|
||||||
|
|
||||||
- $x\ex$ and $x\ob$ are the expected and observed values
|
|
||||||
- $\sigma\ex$ and $\sigma\ob$ are their absolute errors
|
|
||||||
|
|
||||||
. . .
|
|
||||||
|
|
||||||
At 95% confidence level, the values are compatible if:
|
|
||||||
|
|
||||||
$$
|
|
||||||
p > 0.05
|
|
||||||
$$
|
|
||||||
|
@ -1,148 +1,181 @@
|
|||||||
# Landau sample
|
# Trapani test
|
||||||
|
|
||||||
|
|
||||||
## Sample
|
## A pathological distribution
|
||||||
|
|
||||||
Sample N = 50'000 random points following $L(x)$
|
Because of its fat tail:
|
||||||
|
\begin{align*}
|
||||||
|
\mu_1 &= \text{E}\left[|x|\right] \longrightarrow + \infty \\
|
||||||
|
\mu_2 &= \text{E}\left[|x|^2\right] \longrightarrow + \infty
|
||||||
|
\end{align*}
|
||||||
|
|
||||||
|
. . .
|
||||||
|
|
||||||
|
No closed form for parameters $\thus$ numerical estimations
|
||||||
|
|
||||||
|
. . .
|
||||||
|
|
||||||
|
For a Moyal PDF:
|
||||||
|
\begin{align*}
|
||||||
|
E_M[x] &= \mu + \sigma [ \gamma + \ln(2) ] \\
|
||||||
|
V_M[x] &= \frac{\pi^2 \sigma^2}{2}
|
||||||
|
\end{align*}
|
||||||
|
|
||||||
|
|
||||||
|
## Infinite moments
|
||||||
|
|
||||||
|
- Check whether a moment is finite or infinite
|
||||||
|
\begin{align*}
|
||||||
|
\text{infinite} &\thus Landau \\
|
||||||
|
\text{finite} &\thus Moyal
|
||||||
|
\end{align*}
|
||||||
|
|
||||||
|
. . .
|
||||||
|
|
||||||
|
|
||||||
|
# Trapani test
|
||||||
|
|
||||||
|
|
||||||
|
## Trapani test
|
||||||
|
|
||||||
|
::: incremental
|
||||||
|
|
||||||
|
- Random variable $\left\{ x_i \right\}$ sampled from a distribution $f$
|
||||||
|
- Sample moments according to $f$ moments
|
||||||
|
- $H_0$: $\mu_k \longrightarrow + \infty$
|
||||||
|
- Statistic with 1 dof chi-squared distribution
|
||||||
|
|
||||||
|
:::
|
||||||
|
|
||||||
|
|
||||||
|
## Trapani test
|
||||||
|
|
||||||
|
- Start with $\left\{ x_i \right\}^N$ and compute $\mu_k$ as:
|
||||||
$$
|
$$
|
||||||
L(x) = \frac{1}{\pi} \int \limits_{0}^{+ \infty}
|
\mu_k = \frac{1}{N} \sum_{i = 1}^N |x_i|^k
|
||||||
dt \, e^{-t \ln(t) -xt} \sin (\pi t)
|
|
||||||
$$
|
$$
|
||||||
|
|
||||||
. . .
|
. . .
|
||||||
|
|
||||||
gsl_ran_Landau(gsl_rng)
|
- Generate $r$ points $\left\{ \xi_j\right\}^r$ according to $G(0, 1)$ and define
|
||||||
|
$\left\{ a_j \right\}^r$ as:
|
||||||
|
|
||||||
## Compatibility results:
|
|
||||||
|
|
||||||
Median:
|
|
||||||
|
|
||||||
:::: {.columns}
|
|
||||||
::: {.column width=50%}
|
|
||||||
- $t = 0.761$
|
|
||||||
- $p = 0.446$
|
|
||||||
:::
|
|
||||||
|
|
||||||
::: {.column width=50%}
|
|
||||||
$$
|
$$
|
||||||
\hence \text{Compatible!}
|
a_j = \sqrt{e^{\mu_k}} \cdot \xi_j
|
||||||
$$
|
\thus G'\left( 0, \sqrt{e^{\mu_k}} \right)
|
||||||
:::
|
|
||||||
::::
|
|
||||||
|
|
||||||
\vspace{10pt}
|
|
||||||
|
|
||||||
. . .
|
|
||||||
|
|
||||||
Mode:
|
|
||||||
|
|
||||||
:::: {.columns}
|
|
||||||
::: {.column width=50%}
|
|
||||||
- $t = 1.012$
|
|
||||||
- $p = 0.311$
|
|
||||||
:::
|
|
||||||
|
|
||||||
::: {.column width=50%}
|
|
||||||
$$
|
|
||||||
\hence \text{Compatible!}
|
|
||||||
$$
|
|
||||||
:::
|
|
||||||
::::
|
|
||||||
|
|
||||||
\vspace{10pt}
|
|
||||||
|
|
||||||
. . .
|
|
||||||
|
|
||||||
FWHM:
|
|
||||||
|
|
||||||
:::: {.columns}
|
|
||||||
::: {.column width=50%}
|
|
||||||
- $t=1.338$
|
|
||||||
- $p=0.181$
|
|
||||||
:::
|
|
||||||
|
|
||||||
::: {.column width=50%}
|
|
||||||
$$
|
|
||||||
\hence \text{Compatible!}
|
|
||||||
$$
|
|
||||||
:::
|
|
||||||
::::
|
|
||||||
|
|
||||||
|
|
||||||
# Moyal sample
|
|
||||||
|
|
||||||
|
|
||||||
## Sample
|
|
||||||
|
|
||||||
Sample N = 50'000 random points following $M_{\mu \sigma}(x)$
|
|
||||||
|
|
||||||
$$
|
|
||||||
M_{\mu \sigma}(x) = \frac{1}{\sqrt{2 \pi} \sigma} \exp
|
|
||||||
\left[ - \frac{1}{2} \left(
|
|
||||||
\frac{x - \mu}{\sigma}
|
|
||||||
+ e^{-\frac{x - \mu}{\sigma}} \right) \right]
|
|
||||||
$$
|
$$
|
||||||
|
|
||||||
. . .
|
. . .
|
||||||
|
|
||||||
reverse sampling
|
The greater $\mu^k$, the 'larger' $G'$
|
||||||
|
|
||||||
- sampling $y$ uniformly in [0, 1] $\hence x = Q_M(y)$
|
- if $\mu_k \longrightarrow + \infty \thus a_j$ distributed uniformly
|
||||||
|
|
||||||
|
|
||||||
## Compatibility results:
|
## Trapani test
|
||||||
|
|
||||||
Median:
|
- Define the sequence: $\left\{ \zeta_j (u) \right\}^r$ as:
|
||||||
|
|
||||||
:::: {.columns}
|
|
||||||
::: {.column width=50%}
|
|
||||||
- $t = 669.940$
|
|
||||||
- $p = 0.000$
|
|
||||||
:::
|
|
||||||
|
|
||||||
::: {.column width=50%}
|
|
||||||
$$
|
$$
|
||||||
\hence \text{Not compatible!}
|
\zeta_j (u) = \theta( u - a_j) \with \theta - \text{Heaviside}
|
||||||
$$
|
$$
|
||||||
:::
|
|
||||||
::::
|
|
||||||
|
|
||||||
\vspace{10pt}
|
|
||||||
|
|
||||||
. . .
|
. . .
|
||||||
|
|
||||||
Mode:
|
\begin{center}
|
||||||
|
\begin{tikzpicture}
|
||||||
:::: {.columns}
|
% line
|
||||||
::: {.column width=50%}
|
\draw [line width=3, ->, cyclamen] (0,0) -- (10,0);
|
||||||
- $t = 0.732$
|
\node [right] at (10,0) {$u$};
|
||||||
- $p = 0.464$
|
% tic
|
||||||
:::
|
\draw [thick] (5,-0.3) -- (5,0.3);
|
||||||
|
\node [above] at (5,0.3) {$u_0$};
|
||||||
::: {.column width=50%}
|
% aj tics
|
||||||
$$
|
\draw [thick, cyclamen] (1,-0.2) -- (1,0.2);
|
||||||
\hence \text{Compatible!}
|
\node [below right, cyclamen] at (1,-0.2) {$a_{j+2}$};
|
||||||
$$
|
\draw [thick, cyclamen] (2,-0.2) -- (2,0.2);
|
||||||
:::
|
\node [below right, cyclamen] at (2,-0.2) {$a_j$};
|
||||||
::::
|
\draw [thick, cyclamen] (5.2,-0.2) -- (5.2,0.2);
|
||||||
|
\node [below right, cyclamen] at (5.2,-0.2) {$a_{j+2}$};
|
||||||
\vspace{10pt}
|
\draw [thick, cyclamen] (6,-0.2) -- (6,0.2);
|
||||||
|
\node [below right, cyclamen] at (6,-0.2) {$a_{j+3}$};
|
||||||
|
\draw [thick, cyclamen] (8.5,-0.2) -- (8.5,0.2);
|
||||||
|
\node [below right, cyclamen] at (8.5,-0.2) {$a_{j+4}$};
|
||||||
|
% notes
|
||||||
|
\node [below] at (1,-1) {0};
|
||||||
|
\node [below] at (2,-1) {0};
|
||||||
|
\node [below] at (5.2,-1) {1};
|
||||||
|
\node [below] at (6,-1) {1};
|
||||||
|
\node [below] at (8.5,-1) {1};
|
||||||
|
\draw [thick, ->] (1,-0.5) -- (1,-1);
|
||||||
|
\draw [thick, ->] (2,-0.5) -- (2,-1);
|
||||||
|
\draw [thick, ->] (5.2,-0.5) -- (5.2,-1);
|
||||||
|
\draw [thick, ->] (6,-0.5) -- (6,-1);
|
||||||
|
\draw [thick, ->] (8.5,-0.5) -- (8.5,-1);
|
||||||
|
\end{tikzpicture}
|
||||||
|
\end{center}
|
||||||
|
|
||||||
. . .
|
. . .
|
||||||
|
|
||||||
FWHM:
|
If $a_j$ uniformly distributed and $N \rightarrow + \infty$:
|
||||||
|
|
||||||
:::: {.columns}
|
- $\zeta_j (u)$ Bernoulli PDF with $P(\zeta_j (u) = 1) = \frac{1}{2}$
|
||||||
::: {.column width=50%}
|
|
||||||
- $t = 1.329$
|
|
||||||
- $p = 0.184$
|
|
||||||
:::
|
|
||||||
|
|
||||||
::: {.column width=50%}
|
|
||||||
|
## Trapani test
|
||||||
|
|
||||||
|
- Define the function $\vartheta (u)$ as:
|
||||||
$$
|
$$
|
||||||
\hence \text{Compatible!}
|
\vartheta (u) = \frac{2}{\sqrt{r}}
|
||||||
|
\left[ \sum_{j} \zeta_j (u) - \frac{r}{2} \right]
|
||||||
$$
|
$$
|
||||||
:::
|
|
||||||
::::
|
. . .
|
||||||
|
|
||||||
|
If $a_j$ uniformly distributed and $N \rightarrow + \infty$, for the CLT:
|
||||||
|
$$
|
||||||
|
\sum_j \zeta_j (u) \hence
|
||||||
|
G \left( \frac{r}{2}, \frac{r}{4} \right)
|
||||||
|
\thus \vartheta (u) \hence
|
||||||
|
G \left( 0, 1 \right)
|
||||||
|
$$
|
||||||
|
|
||||||
|
. . .
|
||||||
|
|
||||||
|
- Test statistic:
|
||||||
|
$$
|
||||||
|
\Theta = \int_{\underbar{u}}^{\bar{u}} du \, \vartheta^2 (u) \psi(u)
|
||||||
|
$$
|
||||||
|
|
||||||
|
|
||||||
|
## Trapani test
|
||||||
|
|
||||||
|
According to L. Trapani [@trapani15]:
|
||||||
|
|
||||||
|
- $r = o(N) \hence r = N^{0.75}$
|
||||||
|
- $\underbar{u} = 1 \quad \wedge \quad \bar{u} = 1$
|
||||||
|
- $\psi(u) = \chi_{[\underbar{u}, \bar{u}]}$
|
||||||
|
|
||||||
|
. . .
|
||||||
|
|
||||||
|
$\mu_k$ must be scale invariant for $k > 1$:
|
||||||
|
|
||||||
|
$$
|
||||||
|
\tilde{\mu_k} = \frac{\mu_k}{ \left( \mu_{\phi} \right)^{k/\phi} }
|
||||||
|
\with \phi \in (0, k)
|
||||||
|
$$
|
||||||
|
|
||||||
|
|
||||||
|
## Trapani test
|
||||||
|
|
||||||
|
If $\mu_k \ne + \infty \hence \left\{ a_j \right\}$ are not uniformly distributed
|
||||||
|
\vspace{20pt}
|
||||||
|
Rewriting:
|
||||||
|
$$
|
||||||
|
\vartheta (u) = \frac{2}{\sqrt{r}}
|
||||||
|
\left[ \sum_{j} \zeta_j (u) - \frac{r}{2} \right]
|
||||||
|
= \frac{2}{\sqrt{r}}
|
||||||
|
\sum_{j} \left[ \zeta_j (u) - \frac{1}{2} \right]
|
||||||
|
$$
|
||||||
|
|
||||||
|
\vspace{20pt}
|
||||||
|
|
||||||
|
Residues become very large $\hence$ $p$-values decreases.
|
||||||
|
@ -1,87 +1,81 @@
|
|||||||
# Kolmogorov - Smirnov test
|
# MC simulations
|
||||||
|
|
||||||
|
|
||||||
## KS
|
## In summary
|
||||||
|
|
||||||
Quantify distance between expected and observed CDF
|
-----------------------------------------------------
|
||||||
|
Landau Moyal
|
||||||
|
----------------- ----------------- -----------------
|
||||||
|
median $m_L\ex$ $m_M\ex (μ, σ)$
|
||||||
|
|
||||||
. . .
|
mode $\mu_L\ex$ $\mu_M\ex (μ)$
|
||||||
|
|
||||||
KS statistic:
|
FWHM $w_L\ex$ $w_M\ex (σ)$
|
||||||
|
-----------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
## Moyal parameters
|
||||||
|
|
||||||
|
A $M(x)$ similar to $L(x)$ can be found by imposing:
|
||||||
|
|
||||||
|
\vspace{15pt}
|
||||||
|
|
||||||
|
- equal mode
|
||||||
$$
|
$$
|
||||||
D_N = \text{sup}_x |F_N(x) - F(x)|
|
\mu_M\ex = \mu_L\ex \approx −0.22278298...
|
||||||
$$
|
|
||||||
|
|
||||||
- $F(x)$ is the expected CDF
|
|
||||||
- $F_N(x)$ is the empirical CDF of $N$ sampled points
|
|
||||||
- sort points in ascending order
|
|
||||||
- number of points preceding the point normalized by $N$
|
|
||||||
|
|
||||||
|
|
||||||
## KS
|
|
||||||
|
|
||||||
$H_0$: points sampled according to $F(x)$
|
|
||||||
|
|
||||||
. . .
|
|
||||||
|
|
||||||
If $H_0$ is true:
|
|
||||||
|
|
||||||
- $\sqrt{N}D_N \xrightarrow{N \rightarrow + \infty} K$
|
|
||||||
|
|
||||||
Kolmogorov distribution with CDF:
|
|
||||||
|
|
||||||
$$
|
|
||||||
P(K \leqslant K_0) = 1 - p = \frac{\sqrt{2 \pi}}{K_0}
|
|
||||||
\sum_{j = 1}^{+ \infty} e^{-(2j - 1)^2 \pi^2 / 8 K_0^2}
|
|
||||||
$$
|
$$
|
||||||
|
|
||||||
. . .
|
. . .
|
||||||
|
|
||||||
a $p$-value can be computed
|
- equal width
|
||||||
|
$$
|
||||||
|
w_M\ex = w_L\ex = \sigma \cdot a
|
||||||
|
$$
|
||||||
|
|
||||||
- At 95% confidence level, $H_0$ cannot be disproved if $p > 0.05$
|
$$
|
||||||
|
\implies \sigma_M \approx 1.1191486...
|
||||||
|
$$
|
||||||
|
|
||||||
|
|
||||||
# Samples results
|
## Moyal parameters
|
||||||
|
|
||||||
|
|
||||||
## Samples results
|
|
||||||
|
|
||||||
$N = 50000$ sampled points
|
|
||||||
|
|
||||||
. . .
|
|
||||||
|
|
||||||
Landau sample:
|
|
||||||
|
|
||||||
:::: {.columns}
|
:::: {.columns}
|
||||||
::: {.column width=50%}
|
::: {.column width=50%}
|
||||||
- $D = 0.004$
|
![](images/both-pdf-bef.pdf)
|
||||||
- $p = 0.379$
|
|
||||||
:::
|
:::
|
||||||
|
|
||||||
::: {.column width=50%}
|
::: {.column width=50%}
|
||||||
$$
|
![](images/both-pdf-aft.pdf)
|
||||||
\hence \text{Compatible!}
|
|
||||||
$$
|
|
||||||
:::
|
:::
|
||||||
::::
|
::::
|
||||||
|
|
||||||
\vspace{10pt}
|
|
||||||
|
## Moyal parameters
|
||||||
|
|
||||||
|
This leads to more different medians:
|
||||||
|
|
||||||
|
\begin{align*}
|
||||||
|
m_M = 0.787... \thus &m_M = 0.658... \\
|
||||||
|
&m_L = 1.355...
|
||||||
|
\end{align*}
|
||||||
|
|
||||||
|
|
||||||
|
## Compatibility test
|
||||||
|
|
||||||
|
Comparing results:
|
||||||
|
|
||||||
|
$$
|
||||||
|
p = 1 - \text{erf} \left( \frac{t}{\sqrt{2}} \right)\ \with
|
||||||
|
t = \frac{|x\ex - x\ob|}{\sqrt{\sigma\ex^2 + \sigma\ob^2}}
|
||||||
|
$$
|
||||||
|
|
||||||
|
- $x\ex$ and $x\ob$ are the expected and observed values
|
||||||
|
- $\sigma\ex$ and $\sigma\ob$ are their absolute errors
|
||||||
|
|
||||||
. . .
|
. . .
|
||||||
|
|
||||||
Moyal sample:
|
At 95% confidence level, the values are compatible if:
|
||||||
|
|
||||||
:::: {.columns}
|
|
||||||
::: {.column width=50%}
|
|
||||||
- $D = 0.153$
|
|
||||||
- $p = 0.000$
|
|
||||||
:::
|
|
||||||
|
|
||||||
::: {.column width=50%}
|
|
||||||
$$
|
$$
|
||||||
\hence \text{Not compatible!}
|
p > 0.05
|
||||||
$$
|
$$
|
||||||
:::
|
|
||||||
::::
|
|
||||||
|
@ -1,184 +1,198 @@
|
|||||||
# Trapani test
|
# Landau sample
|
||||||
|
|
||||||
|
|
||||||
## Infinite moments
|
## Sample
|
||||||
|
|
||||||
For a Landau PDF:
|
Sample N = 50'000 random points following $L(x)$
|
||||||
\begin{align*}
|
|
||||||
E_L[x] &\longrightarrow + \infty \\
|
$$
|
||||||
V_L[x] \text{undefined}
|
L(x) = \frac{1}{\pi} \int \limits_{0}^{+ \infty}
|
||||||
\end{align*}
|
dt \, e^{-t \ln(t) -xt} \sin (\pi t)
|
||||||
|
$$
|
||||||
|
|
||||||
. . .
|
. . .
|
||||||
|
|
||||||
For a Moyal PDF:
|
gsl_ran_Landau(gsl_rng)
|
||||||
\begin{align*}
|
|
||||||
E_M[x] &= \mu + \sigma [ \gamma + \ln(2) ] \\
|
|
||||||
V_M[x] &= \frac{\pi^2 \sigma^2}{2}
|
|
||||||
\end{align*}
|
|
||||||
|
|
||||||
|
|
||||||
## Infinite moments
|
## Compatibility results:
|
||||||
|
|
||||||
- Check whether a moment is finite or infinite
|
Median:
|
||||||
\begin{align*}
|
|
||||||
\text{infinite} &\thus Landau \\
|
|
||||||
\text{finite} &\thus Moyal
|
|
||||||
\end{align*}
|
|
||||||
|
|
||||||
. . .
|
|
||||||
|
|
||||||
|
|
||||||
# Trapani test
|
|
||||||
|
|
||||||
|
|
||||||
## Trapani test
|
|
||||||
|
|
||||||
::: incremental
|
|
||||||
|
|
||||||
- Random variable $\left\{ x_i \right\}$ sampled from a distribution $f$
|
|
||||||
- Sample moments according to $f$ moments
|
|
||||||
- $H_0$: $\mu_k \longrightarrow + \infty$
|
|
||||||
- Statistic with 1 dof chi-squared distribution
|
|
||||||
|
|
||||||
|
:::: {.columns}
|
||||||
|
::: {.column width=50%}
|
||||||
|
- $t = 0.761$
|
||||||
|
- $p = 0.446$
|
||||||
:::
|
:::
|
||||||
|
|
||||||
|
::: {.column width=50%}
|
||||||
## Trapani test
|
|
||||||
|
|
||||||
- Start with $\left\{ x_i \right\}^N$ and compute $\mu_k$ as:
|
|
||||||
$$
|
$$
|
||||||
\mu_k = \frac{1}{N} \sum_{i = 1}^N |x_i|^k
|
\hence \text{Compatible!}
|
||||||
|
$$
|
||||||
|
:::
|
||||||
|
::::
|
||||||
|
|
||||||
|
\vspace{10pt}
|
||||||
|
|
||||||
|
. . .
|
||||||
|
|
||||||
|
Mode:
|
||||||
|
|
||||||
|
:::: {.columns}
|
||||||
|
::: {.column width=50%}
|
||||||
|
- $t = 1.012$
|
||||||
|
- $p = 0.311$
|
||||||
|
:::
|
||||||
|
|
||||||
|
::: {.column width=50%}
|
||||||
|
$$
|
||||||
|
\hence \text{Compatible!}
|
||||||
|
$$
|
||||||
|
:::
|
||||||
|
::::
|
||||||
|
|
||||||
|
\vspace{10pt}
|
||||||
|
|
||||||
|
. . .
|
||||||
|
|
||||||
|
FWHM:
|
||||||
|
|
||||||
|
:::: {.columns}
|
||||||
|
::: {.column width=50%}
|
||||||
|
- $t=1.338$
|
||||||
|
- $p=0.181$
|
||||||
|
:::
|
||||||
|
|
||||||
|
::: {.column width=50%}
|
||||||
|
$$
|
||||||
|
\hence \text{Compatible!}
|
||||||
|
$$
|
||||||
|
:::
|
||||||
|
::::
|
||||||
|
|
||||||
|
|
||||||
|
# Moyal sample
|
||||||
|
|
||||||
|
|
||||||
|
## Sample
|
||||||
|
|
||||||
|
Sample N = 50'000 random points following $M_{\mu \sigma}(x)$
|
||||||
|
|
||||||
|
$$
|
||||||
|
M_{\mu \sigma}(x) = \frac{1}{\sqrt{2 \pi} \sigma} \exp
|
||||||
|
\left[ - \frac{1}{2} \left(
|
||||||
|
\frac{x - \mu}{\sigma}
|
||||||
|
+ e^{-\frac{x - \mu}{\sigma}} \right) \right]
|
||||||
$$
|
$$
|
||||||
|
|
||||||
. . .
|
. . .
|
||||||
|
|
||||||
- Generate $r$ points $\left\{ \xi_j\right\}^r$ according to $G(0, 1)$ and define
|
reverse sampling
|
||||||
$\left\{ a_j \right\}^r$ as:
|
|
||||||
|
- sampling $y$ uniformly in [0, 1] $\hence x = Q_M(y)$
|
||||||
|
|
||||||
|
|
||||||
|
## Compatibility results:
|
||||||
|
|
||||||
|
Median:
|
||||||
|
|
||||||
|
:::: {.columns}
|
||||||
|
::: {.column width=50%}
|
||||||
|
- $t = 669.940$
|
||||||
|
- $p = 0.000$
|
||||||
|
:::
|
||||||
|
|
||||||
|
::: {.column width=50%}
|
||||||
$$
|
$$
|
||||||
a_j = \sqrt{e^{\mu_k}} \cdot \xi_j
|
\hence \text{Not compatible!}
|
||||||
\thus G'\left( 0, \sqrt{e^{\mu_k}} \right)
|
|
||||||
$$
|
$$
|
||||||
|
:::
|
||||||
|
::::
|
||||||
|
|
||||||
|
\vspace{10pt}
|
||||||
|
|
||||||
. . .
|
. . .
|
||||||
|
|
||||||
The greater $\mu^k$, the 'larger' $G'$
|
Mode:
|
||||||
|
|
||||||
- if $\mu_k \longrightarrow + \infty \thus a_j$ distributed uniformly
|
:::: {.columns}
|
||||||
|
::: {.column width=50%}
|
||||||
|
- $t = 0.732$
|
||||||
|
- $p = 0.464$
|
||||||
|
:::
|
||||||
|
|
||||||
|
::: {.column width=50%}
|
||||||
## Trapani test
|
|
||||||
|
|
||||||
- Define the sequence: $\left\{ \zeta_j (u) \right\}^r$ as:
|
|
||||||
$$
|
$$
|
||||||
\zeta_j (u) = \theta( u - a_j) \with \theta - \text{Heaviside}
|
\hence \text{Compatible!}
|
||||||
$$
|
$$
|
||||||
|
:::
|
||||||
|
::::
|
||||||
|
|
||||||
|
\vspace{10pt}
|
||||||
|
|
||||||
. . .
|
. . .
|
||||||
|
|
||||||
\begin{center}
|
FWHM:
|
||||||
\begin{tikzpicture}
|
|
||||||
\definecolor{cyclamen}{RGB}{146,24,43}
|
:::: {.columns}
|
||||||
% line
|
::: {.column width=50%}
|
||||||
\draw [line width=3, ->, cyclamen] (0,0) -- (10,0);
|
- $t = 1.329$
|
||||||
\node [right] at (10,0) {$u$};
|
- $p = 0.184$
|
||||||
% tic
|
:::
|
||||||
\draw [thick] (5,-0.3) -- (5,0.3);
|
|
||||||
\node [above] at (5,0.3) {$u_0$};
|
::: {.column width=50%}
|
||||||
% aj tics
|
$$
|
||||||
\draw [thick, cyclamen] (1,-0.2) -- (1,0.2);
|
\hence \text{Compatible!}
|
||||||
\node [below right, cyclamen] at (1,-0.2) {$a_{j+2}$};
|
$$
|
||||||
\draw [thick, cyclamen] (2,-0.2) -- (2,0.2);
|
:::
|
||||||
\node [below right, cyclamen] at (2,-0.2) {$a_j$};
|
::::
|
||||||
\draw [thick, cyclamen] (5.2,-0.2) -- (5.2,0.2);
|
|
||||||
\node [below right, cyclamen] at (5.2,-0.2) {$a_{j+2}$};
|
|
||||||
\draw [thick, cyclamen] (6,-0.2) -- (6,0.2);
|
# KS results
|
||||||
\node [below right, cyclamen] at (6,-0.2) {$a_{j+3}$};
|
|
||||||
\draw [thick, cyclamen] (8.5,-0.2) -- (8.5,0.2);
|
|
||||||
\node [below right, cyclamen] at (8.5,-0.2) {$a_{j+4}$};
|
## Samples results
|
||||||
% notes
|
|
||||||
\node [below] at (1,-1) {0};
|
$N = 50000$ sampled points
|
||||||
\node [below] at (2,-1) {0};
|
|
||||||
\node [below] at (5.2,-1) {1};
|
|
||||||
\node [below] at (6,-1) {1};
|
|
||||||
\node [below] at (8.5,-1) {1};
|
|
||||||
\draw [thick, ->] (1,-0.5) -- (1,-1);
|
|
||||||
\draw [thick, ->] (2,-0.5) -- (2,-1);
|
|
||||||
\draw [thick, ->] (5.2,-0.5) -- (5.2,-1);
|
|
||||||
\draw [thick, ->] (6,-0.5) -- (6,-1);
|
|
||||||
\draw [thick, ->] (8.5,-0.5) -- (8.5,-1);
|
|
||||||
\end{tikzpicture}
|
|
||||||
\end{center}
|
|
||||||
|
|
||||||
. . .
|
. . .
|
||||||
|
|
||||||
If $a_j$ uniformly distributed and $N \rightarrow + \infty$:
|
Landau sample:
|
||||||
|
|
||||||
- $\zeta_j (u)$ Bernoulli PDF with $P(\zeta_j (u) = 1) = \frac{1}{2}$
|
:::: {.columns}
|
||||||
|
::: {.column width=50%}
|
||||||
|
- $D = 0.004$
|
||||||
|
- $p = 0.379$
|
||||||
|
:::
|
||||||
|
|
||||||
|
::: {.column width=50%}
|
||||||
## Trapani test
|
|
||||||
|
|
||||||
- Define the function $\vartheta (u)$ as:
|
|
||||||
$$
|
$$
|
||||||
\vartheta (u) = \frac{2}{\sqrt{r}}
|
\hence \text{Compatible!}
|
||||||
\left[ \sum_{j} \zeta_j (u) - \frac{r}{2} \right]
|
|
||||||
$$
|
$$
|
||||||
|
:::
|
||||||
|
::::
|
||||||
|
|
||||||
|
\vspace{10pt}
|
||||||
|
|
||||||
. . .
|
. . .
|
||||||
|
|
||||||
If $a_j$ uniformly distributed and $N \rightarrow + \infty$, for the CLT:
|
Moyal sample:
|
||||||
|
|
||||||
|
:::: {.columns}
|
||||||
|
::: {.column width=50%}
|
||||||
|
- $D = 0.153$
|
||||||
|
- $p = 0.000$
|
||||||
|
:::
|
||||||
|
|
||||||
|
::: {.column width=50%}
|
||||||
$$
|
$$
|
||||||
\sum_j \zeta_j (u) \hence
|
\hence \text{Not compatible!}
|
||||||
G \left( \frac{r}{2}, \frac{r}{4} \right)
|
|
||||||
\thus \vartheta (u) \hence
|
|
||||||
G \left( 0, 1 \right)
|
|
||||||
$$
|
|
||||||
|
|
||||||
. . .
|
|
||||||
|
|
||||||
- Test statistic:
|
|
||||||
$$
|
|
||||||
\Theta = \int_{\underbar{u}}^{\bar{u}} du \, \vartheta^2 (u) \psi(u)
|
|
||||||
$$
|
$$
|
||||||
|
:::
|
||||||
|
::::
|
||||||
|
|
||||||
|
|
||||||
## Trapani test
|
# Trapani results
|
||||||
|
|
||||||
According to L. Trapani (10.1016/j.jeconom.2015.08.006):
|
|
||||||
|
|
||||||
- $r = o(N) \hence r = N^{0.75}$
|
|
||||||
- $\underbar{u} = 1 \quad \wedge \quad \bar{u} = 1$
|
|
||||||
- $\psi(u) = \chi_{[\underbar{u}, \bar{u}]}$
|
|
||||||
|
|
||||||
. . .
|
|
||||||
|
|
||||||
$\mu_k$ must be scale invariant for $k > 1$:
|
|
||||||
|
|
||||||
$$
|
|
||||||
\tilde{\mu_k} = \frac{\mu_k}{ \left( \mu_{\phi} \right)^{k/\phi} }
|
|
||||||
\with \phi \in (0, k)
|
|
||||||
$$
|
|
||||||
|
|
||||||
|
|
||||||
## Trapani test
|
|
||||||
|
|
||||||
If $\mu_k \ne + \infty \hence \left\{ a_j \right\}$ are not uniformly distributed
|
|
||||||
\vspace{20pt}
|
|
||||||
Rewriting:
|
|
||||||
$$
|
|
||||||
\vartheta (u) = \frac{2}{\sqrt{r}}
|
|
||||||
\left[ \sum_{j} \zeta_j (u) - \frac{r}{2} \right]
|
|
||||||
= \frac{2}{\sqrt{r}}
|
|
||||||
\sum_{j} \left[ \zeta_j (u) - \frac{1}{2} \right]
|
|
||||||
$$
|
|
||||||
|
|
||||||
\vspace{20pt}
|
|
||||||
|
|
||||||
Residues become very large $\hence$ $p$-values decreases.
|
|
||||||
|
|
||||||
|
|
||||||
# Samples results
|
|
||||||
|
|
||||||
|
|
||||||
## Samples results
|
## Samples results
|
||||||
|
Loading…
Reference in New Issue
Block a user