ex-5: add the plot 5-fit.pdf to the paper

This commit is contained in:
Giù Marcer 2020-06-01 16:20:34 +02:00 committed by rnhmjoj
parent 61ce7feb64
commit aa676cf9a9
2 changed files with 22 additions and 23 deletions

Binary file not shown.

View File

@ -69,6 +69,11 @@ this can result in an underestimation of the error.
In this case $f(x) = e^{x}$ and $\Omega = [0,1]$, hence $V = 1$. In this case $f(x) = e^{x}$ and $\Omega = [0,1]$, hence $V = 1$.
![Estimated values of $I$ obatined by Plain MC technique with different
number of function calls; logarithmic scale; errorbars showing their
estimated uncertainties. As can be seen, the process does a sort o seesaw
around the correct value.](images/5-MC_MC.pdf){#fig:plain-mc-iter}
Since the distance from $I$ of $I_N$ is related to $N$, the accuracy of the Since the distance from $I$ of $I_N$ is related to $N$, the accuracy of the
method lies in how many points are generated, namely how many function calls method lies in how many points are generated, namely how many function calls
are executed when the iterative method is implemented. In @fig:plain-mc-iter are executed when the iterative method is implemented. In @fig:plain-mc-iter
@ -77,11 +82,6 @@ red. In @tbl:plain-mc-res, some of them are listed: the estimated integrals
$I^{\text{oss}}$ are compared to the expected value $I$ and the differences $I^{\text{oss}}$ are compared to the expected value $I$ and the differences
between them are given. between them are given.
![Estimated values of $I$ obatined by Plain MC technique with different
number of function calls; logarithmic scale; errorbars showing their
estimated uncertainties. As can be seen, the process does a sort o seesaw
around the correct value.](images/5-MC_MC.pdf){#fig:plain-mc-iter}
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
calls $I^{\text{oss}}$ $\sigma$ diff calls $I^{\text{oss}}$ $\sigma$ diff
------------------ ------------------ ------------------ ------------------ ------------------ ------------------ ------------------ ------------------
@ -99,24 +99,23 @@ Table: Some MC results with three different numbers of function calls.
As can be seen, $\sigma$ is always of the same order of magnitude of diff, As can be seen, $\sigma$ is always of the same order of magnitude of diff,
except for very low numbers of function calls. Even with \num{5e7} calls, except for very low numbers of function calls. Even with \num{5e7} calls,
$I^{\text{oss}}$ still differs from $I$ at the fifth decimal place, meaning $I^{\text{oss}}$ still differs from $I$ at the fifth decimal place, meaning
that this method shows a really slow convergence. In fact, since the $\sigma$ that this method shows a really slow convergence.
dependence on the number $C$ of function calls is confirmed: The $\sigma$ dependence on the number $C$ of function calls was checked with a
least square minimization by modeling the data with the function:
$$ $$
\begin{cases} \sigma = \frac{a}{x^b}
\sigma_1 = \num{6.95569e-4} \longleftrightarrow C_1 = \num{5e6} \\
\sigma_2 = \num{6.95809e-5} \longleftrightarrow C_1 = \num{5e8}
\end{cases}
$$ $$
$$ As can be seen in @fig:err_fit, the obtained result confirmes the expected value
\thus of $b^{\text{exp}} = 0.5$, having found $b \sim 0.499$.
\frac{\sigma_1}{\sigma_2} = 9.9965508 \sim 10 = \sqrt{\frac{C_2}{C_1}} Given this dependence, for an error of $10^{-n}$, a number $\propto 10^{2n}$ of
$$ function calls is needed. To compute an integral within double precision, an
impossibly large number of $\sigma \sim 10^{32}$ calls is needed, which makes
this method unpractical for high-precision applications.
For an error of $10^{-n}$, a number $\propto 10^{2n}$ of function calls is ![Plain MC uncertainties estimations $\sigma$ as a function of the
needed. To compute an integral within double precision, number of function calls $C$. Observed values in red, predicted
an impossibly large number of $\sigma \sim 10^{32}$ calls is needed, dependence in gray.](images/5-fit.pdf){#fig:err_fit}
which makes this method unpractical for high-precision applications.
## Stratified sampling ## Stratified sampling
@ -381,6 +380,10 @@ calls $I^{\text{oss}}$ $\sigma$ diff
Table: Some VEGAS results with different numbers of Table: Some VEGAS results with different numbers of
function calls. {#tbl:vegas-res} function calls. {#tbl:vegas-res}
![Only the most accurate results are shown in order to stress the
differences between VEGAS (in gray) and MISER (in black) methods
results.](images/5-MC_MI_VE.pdf){#fig:vegas-iter}
As can be appreciated in @fig:vegas-iter, the VEGAS algorithm manages to compute the As can be appreciated in @fig:vegas-iter, the VEGAS algorithm manages to compute the
integral value more accurately compared to MISER. The $\chi_r^2$ turns out to integral value more accurately compared to MISER. The $\chi_r^2$ turns out to
be close enough to 1 to guarantee a good estimation of $I$, goodness which is be close enough to 1 to guarantee a good estimation of $I$, goodness which is
@ -388,10 +391,6 @@ also confirmed by the very small difference shown in @tbl:vegas-res.
In fact, with a number of \num{5e7} function calls, the difference is In fact, with a number of \num{5e7} function calls, the difference is
smaller than \num{1e-10}. smaller than \num{1e-10}.
![Only the most accurate results are shown in order to stress the
differences between VEGAS (in gray) and MISER (in black) methods
results.](images/5-MC_MI_VE.pdf){#fig:vegas-iter}
In conclusion, between a plain Monte Carlo technique, stratified sampling and In conclusion, between a plain Monte Carlo technique, stratified sampling and
importance sampling, the last turned out to be the most powerful mean to importance sampling, the last turned out to be the most powerful mean to
obtain a good estimation of the integrand. obtain a good estimation of the integrand.