sections: write a lot

This commit is contained in:
Giù Marcer 2020-06-07 14:32:03 +02:00 committed by rnhmjoj
parent 7fd87ae8a3
commit 9c181ee241
7 changed files with 216 additions and 49 deletions

View File

@ -1,5 +1,5 @@
--- ---
title: Randomness tests of a non-uniform distribution title: Title
date: \today date: \today
author: author:
- Giulia Marcer - Giulia Marcer
@ -45,9 +45,24 @@ header-includes: |
\hspace{30pt} \Longrightarrow \hspace{30pt} \hspace{30pt} \Longrightarrow \hspace{30pt}
} }
% "and" in formulas
\DeclareMathOperator{\et}{%
\hspace{30pt} \wedge \hspace{30pt}
}
% "with" in formulas % "with" in formulas
\DeclareMathOperator{\with}{% \DeclareMathOperator{\with}{%
\hspace{30pt} \text{with} \hspace{30pt} \hspace{30pt} \text{with} \hspace{30pt}
} }
% "expected" in formulas
\DeclareMathOperator{\ex}{%
^{\text{exp}}
}
% "observed" in formulas
\DeclareMathOperator{\ob}{%
^{\text{obs}}
}
``` ```
... ...

View File

@ -3,20 +3,24 @@
## Goal ## Goal
What? - Generate a sample $L$ of points from a Landau PDF
- Generate a sample $M$ of points from a Moyal PDF
- Generate a sample of points from a Moyal PDF . . .
- Prove it truly comes from it and not from a Landau PDF
How? - Implement a bunch of statistical tests
- Applying some hypothesis testings . . .
- Check if they work:
- the sample $L$ truly comes from a Landau PDF
- the sample $M$ does not come from a Landau PDF
## Why? ## Why?
The Landau and Moyal PDFs are really similar. Historically, the latter distribution was utilized in The Landau and Moyal PDFs are really similar. Historically, the latter was
the approximation of the Landau Distribution. utilized in the approximation of the former.
:::: {.columns} :::: {.columns}
::: {.column width=33%} ::: {.column width=33%}
@ -53,6 +57,8 @@ the approximation of the Landau Distribution.
::: :::
:::: ::::
\vspace{10pt}
:::: {.columns} :::: {.columns}
::: {.column width=50%} ::: {.column width=50%}
![](images/landau-pdf.pdf) ![](images/landau-pdf.pdf)
@ -63,6 +69,25 @@ the approximation of the Landau Distribution.
::: :::
:::: ::::
## Two similar distributions ## Two similar distributions
![](images/both-pdf.pdf) ![](images/both-pdf.pdf)
## Statistical tests
. . .
- Parameters comparison:
- compatibility between expected and observed PDF parameters
. . .
- Kolmogorov - Smirnov:
- compatibility between expected and observed CDF
. . .
- Trapani test:
- compatibiity between expected and observed mean

View File

@ -12,7 +12,7 @@ Because of its fat tail:
. . . . . .
No closed form for parameters. No closed form for parameters $\thus$ Numerical estimations
## Landau median ## Landau median
@ -20,38 +20,48 @@ No closed form for parameters.
The median of a PDF is defined as: The median of a PDF is defined as:
$$ $$
Q_L(m) = \frac{1}{2} m = Q \left( \frac{1}{2} \right)
$$ $$
. . . . . .
- CDF computed by numerical integration, - CDF computed by numerical integration
- QDF computed by numerical root-finding (Brent) - QDF computed by numerical root-finding (Brent)
$$ $$
m_L = 1.3557804... m_L\ex = 1.3557804...
$$ $$
## Landau mode ## Landau mode
- Maxmimum $\quad \Longrightarrow \quad \partial_x M(\mu) = 0$, - Maxmimum $\quad \Longrightarrow \quad \partial_x L(\mu) = 0$
. . .
- Computed by numerical minimization (Brent) - Computed by numerical minimization (Brent)
$$ $$
\mu_L = 0.22278... \mu_L\ex = 0.22278...
$$ $$
## Landau FWHM ## Landau FWHM
$$ We need to compute the maximum:
\text{FWHM} = x_+ - x_- \with L(x_{\pm})
= \frac{L_{\text{max}}}{2} = \frac{L(\mu_L)}{2}
$$
- Computed numerically (Brent)
$$ $$
\text{FWHM}_L = 4.018645... L_{\text{max}} = L(\mu_L)
$$
$$
\text{FWHM} = w = x_+ - x_- \with L(x_{\pm}) = \frac{L_{\text{max}}}{2}
$$
. . .
- Computed by numerical root finding (Brent)
$$
w_L\ex = 4.018645...
$$ $$

View File

@ -50,7 +50,7 @@ $$
Remembering the error function Remembering the error function
$$ $$
\text{erf}(x) = \frac{2}{\sqrt{\pi}} \int_0^x dy \, e^{-y^2}, \text{erf}(x) = \frac{2}{\sqrt{\pi}} \int_0^x dy \, e^{-y^2}
$$ $$
one finally gets: one finally gets:
$$ $$
@ -72,14 +72,14 @@ $$
## Moyal median ## Moyal median
Defined by $\text{CDF}(m) = 1/2$, or $m=\text{QDF}(1/2)$. Defined by $F(m) = \frac{1}{2}$ or $m = Q \left( \frac{1}{2} \right)$:
\begin{align*} \begin{align*}
M(z) M(z)
&\thus m_M = -2 \ln \left[ \sqrt{2} \, &\thus m_M\ex = -2 \ln \left[ \sqrt{2} \,
\text{erf}^{-1} \left( \frac{1}{2} \right) \right] \\ \text{erf}^{-1} \left( \frac{1}{2} \right) \right] \\
M_{\mu \sigma}(x) M_{\mu \sigma}(x)
&\thus m_M = \mu -2 \sigma \ln \left[ \sqrt{2} \, &\thus m_M\ex = \mu -2 \sigma \ln \left[ \sqrt{2} \,
\text{erf}^{-1} \left( \frac{1}{2} \right) \right] \text{erf}^{-1} \left( \frac{1}{2} \right) \right]
\end{align*} \end{align*}
@ -95,8 +95,8 @@ $$
$$ $$
\begin{align*} \begin{align*}
\partial_x M(z) = 0 &\thus \mu_M = 0 \\ \partial_x M(z) = 0 &\thus \mu_M\ex = 0 \\
\partial_x M_{\mu \sigma}(x) = 0 &\thus \mu_M = \mu \\ \partial_x M_{\mu \sigma}(x) = 0 &\thus \mu_M\ex = \mu \\
\end{align*} \end{align*}
@ -129,7 +129,7 @@ $$
\begin{align*} \begin{align*}
M(z) M(z)
&\thus \text{FWHM}_M = a \\ &\thus w_M^{\text{exp}} = a \\
M_{\mu \sigma}(x) M_{\mu \sigma}(x)
&\thus \text{FWHM}_M = \sigma \cdot a \\ &\thus w_M^{\text{exp}} = \sigma \cdot a \\
\end{align*} \end{align*}

View File

@ -1,35 +1,86 @@
# Data sample # Sample parameters estimation
## PDF parameters ## Sample parameters estimation
A $M(x)$ similar to $L(x)$ can be found by imposing: Once the points are sampled, how to estimate their median, mode and FWHM?
. . .
- Binning data $\quad \longrightarrow \quad$ result depending on bin-width
. . .
- Alternative solutions
## Sample median
- equal mode
$$ $$
\mu_M = \mu_L \approx 0.22278298... m = Q \left( \frac{1}{2} \right)
$$
- equal width
$$
\text{FWHM}_M = \text{FWHM}_L = \sigma \cdot a
$$ $$
. . . . . .
- Sort points in ascending order
. . .
- Middle element if odd
- Average of the two central elements if even
## Sample mode
Most probable value
. . .
HSM
- Iteratively identify the smallest interval containing half points
- once the sample is reduced to less than three points, take average
## Sample FWHM
$$ $$
\implies \sigma_M \approx 1.1191486 \text{FWHM} = x_+ - x_- \with L(x_{\pm}) = \frac{L_{\text{max}}}{2}
$$ $$
. . .
## PDF parameters KDE
:::: {.columns} - empirical PDF construction:
::: {.column width=50%}
![](images/both-pdf-bef.pdf)
:::
::: {.column width=50%} $$
![](images/both-pdf-aft.pdf) f_\varepsilon(x) = \frac{1}{N\varepsilon} \sum_{i = 1}^N
::: G \left( \frac{x-x_i}{\varepsilon} \right)
:::: $$
The parameter $\varepsilon$ controls the strenght of the smoothing
## Sample FWHM
Silverman's rule of thumb:
$$
f_\varepsilon(x) = \frac{1}{N\varepsilon} \sum_{i = 1}^N
G \left( \frac{x-x_i}{\varepsilon} \right)
\with
\varepsilon = 0.63 \, S_N
\left( \frac{d + 2}{4}N \right)^{-1/(d + 4)}
$$
with:
- $S_N$ is the sample stdev
- $d$ number of dimensions ($d = 1$)
. . .
\vspace{10pt}
Numerical root finding (Brent)

66
slides/sections/5.md Normal file
View File

@ -0,0 +1,66 @@
# MC simulations
## In summary
-----------------------------------------------------
Landau Moyal
----------------- ----------------- -----------------
median $m_L\ex$ $m_M\ex (μ, σ)$
mode $\mu_L\ex$ $\mu_M\ex (μ)$
FWHM $w_L\ex$ $w_M\ex (σ)$
-----------------------------------------------------
## PDF 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...
$$
. . .
- equal width
$$
w_M\ex = w_L\ex = \sigma \cdot a
$$
$$
\implies \sigma_M \approx 1.1191486
$$
## PDF parameters
:::: {.columns}
::: {.column width=50%}
![](images/both-pdf-bef.pdf)
:::
::: {.column width=50%}
![](images/both-pdf-aft.pdf)
:::
::::
## Different medians
This leads to more different medians:
\begin{align*}
m_M = 0.787... \thus &m_M = 0.658... \\
&m_L = 1.355...
\end{align*}
## Samples
- Sample $L$: N = 50'000 points following $L_(x)$
- Sample $M$: N = 50'000 points following $M_{\mu \sigma}(x)$

0
slides/sections/6.md Normal file
View File