analistica/slides/sections/7.md

95 lines
1.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 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 (σ)$
-----------------------------------------------------
## 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...
$$
. . .
- equal width
$$
w_M\ex = w_L\ex = \sigma \cdot a
$$
$$
\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*}
## Landau Sample
Sample N random points following $L(x)$
$$
L(x) = \frac{1}{\pi} \int \limits_{0}^{+ \infty}
dt \, e^{-t \ln(t) -xt} \sin (\pi t)
$$
. . .
gsl_ran_Landau(gsl_rng)
## Moyal sample
Sample N 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
- sampling $y$ uniformly in [0, 1] $\hence x = Q_M(y)$