analistica/slides/sections/2.md

142 lines
2.9 KiB
Markdown
Raw Normal View History

# Moyal distribution
2020-06-05 16:36:19 +02:00
## Moyal PDF
2020-06-05 16:36:19 +02:00
$$
M(x) = \frac{1}{\sqrt{2 \pi}} e^{-\frac{1}{2} \left[ x + e^{-x} \right]}
$$
\vspace{10pt}
$$
\text{More generally:} \hspace{15pt}
\begin{cases}
\text{location parameter:} \quad &\mu_M \\
\text{scale parameter:} \quad &\sigma_M
\end{cases}
$$
\vspace{10pt}
$$
x \rightarrow \frac{x - \mu}{\sigma_M} \thus
M_{\mu \sigma_M}(x) = \frac{1}{\sqrt{2 \pi} \sigma_M}
e^{-\frac{1}{2} \left[ \frac{x - \mu}{\sigma_M} + e^{- \frac{x - \mu}{\sigma_M}} \right]}
2020-06-05 16:36:19 +02:00
$$
## Moyal CDF
The cumulative distribution function $F_M(x)$ can be derived from the
2020-06-05 16:36:19 +02:00
pdf $M(x)$ integrating:
$$
F_M(x) = \frac{1}{\sqrt{2 \pi}} \int\limits_{- \infty}^x dy \, M(y)
= \frac{1}{\sqrt{2 \pi}} \int\limits_{- \infty}^x dy \, e^{- \frac{y}{2}}
e^{- \frac{1}{2} e^{-y}}
2020-06-05 16:36:19 +02:00
$$
## Moyal CDF
2020-06-05 16:36:19 +02:00
with the change of variable:
$$
2020-06-05 16:36:19 +02:00
z = \frac{1}{\sqrt{2}} e^{-\frac{y}{2}}
$$
the CDF can be rewritten as:
$$
F_M(x) =
\frac{-2 \sqrt{2}}{\sqrt{2 \pi}} \int\limits_{+ \infty}^{f(x)} dz \, e^{- z^2}
\with f(x) = \frac{e^{- \frac{x}{2}}}{\sqrt{2}}
$$
## Moyal CDF
given the definition of the error function `erf`:
2020-06-05 16:36:19 +02:00
$$
\text{erf} = \frac{2}{\sqrt{\pi}} \int_0^x dy \, e^{-y^2}
$$
one finally gets:
2020-06-05 16:36:19 +02:00
$$
F_M(x) = 1 - \text{erf} \left( \frac{e^{- \frac{x}{2}}}{\sqrt{2}} \right)
2020-06-05 16:36:19 +02:00
$$
## Moyal QDF
The quantile is defined as the inverse of the CDF:
2020-06-05 16:36:19 +02:00
$$
F_M(x) = 1 - \text{erf} \left( \frac{e^{- \frac{x}{2}}}{\sqrt{2}} \right)
$$
hence:
$$
Q(x) = -2 \ln \left[ \sqrt{2} \, \text{erf}^{(-1)} (1 - F_M(x)) \right]
$$
## Moyal median
The median is defined as the point at which $F_M(x) = 1/2$:
\vspace{15pt}
$$
M(x) \thus
m_M = -2 \ln \left[ \sqrt{2} \,
\text{erf}^{(-1)} \left( \frac{1}{2} \right) \right]
$$
\vspace{15pt}
$$
M_{\mu \sigma_M}(x) \thus
m_M = \mu -2 \sigma_M \ln \left[ \sqrt{2} \,
\text{erf}^{(-1)} \left( \frac{1}{2} \right) \right]
2020-06-05 16:36:19 +02:00
$$
## Moyal mode
Peak of the PDF
\vspace{10pt}
2020-06-05 16:36:19 +02:00
$$
\partial_x M(x) = \partial_x \left( \frac{1}{\sqrt{2 \pi}} e^{-\frac{1}{2}
\left( x + e^{-x} \right)} \right)
= \frac{1}{\sqrt{2 \pi}} e^{-\frac{1}{2}
\left( x + e^{-x} \right)} \left( -\frac{1}{2} \right)
\left( 1 - e^{-x} \right)
$$
\vspace{10pt}
$$
\partial_x M(x) = 0 \thus \mu_M = 0
$$
\vspace{10pt}
$$
\partial_x M_{\mu \sigma_M}(x) = 0 \thus \mu_M = \mu
$$
## Moyal FWHM
We need to compute the maximum value:
$$
M(\mu) = \frac{1}{\sqrt{2 \pi e}} \thus M(x_{\pm}) = \frac{1}{\sqrt{8 \pi e}}
$$
which leads to:
$$
x_{\pm} + e^{-x_{\pm}} = 1 + 2 \ln(2) \thus
\begin{cases}
x_+ = a + W_0 \left( - \frac{1}{4 e} \right) \\
x_- = a + W_{-1} \left( - \frac{1}{4 e} \right)
\end{cases}
$$
with $a = 1 + 2 \ln(2)$
## Moyal FWHM
$$
\text{FWHM}_L = x_+ - x_- = 3.590806098...
$$
2020-06-05 16:36:19 +02:00
\vspace{15pt}
$$
M(x) \thus \text{FWHM}_M = 3.590806098...
2020-06-05 16:36:19 +02:00
$$
\vspace{15pt}
$$
M_{\mu \sigma_M}(x) \thus \text{FWHM}_M = \sigma_M \cdot 3.590806098...
2020-06-05 16:36:19 +02:00
$$