diff --git a/notes/images/5-fit.pdf b/notes/images/5-fit.pdf index d8bac2e..24b4c6d 100644 Binary files a/notes/images/5-fit.pdf and b/notes/images/5-fit.pdf differ diff --git a/notes/sections/5.md b/notes/sections/5.md index c70d638..8eb10c7 100644 --- a/notes/sections/5.md +++ b/notes/sections/5.md @@ -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$. +![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 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 @@ -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 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 ------------------ ------------------ ------------------ ------------------ @@ -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, 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 -that this method shows a really slow convergence. In fact, since the $\sigma$ -dependence on the number $C$ of function calls is confirmed: +that this method shows a really slow convergence. +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_1 = \num{6.95569e-4} \longleftrightarrow C_1 = \num{5e6} \\ - \sigma_2 = \num{6.95809e-5} \longleftrightarrow C_1 = \num{5e8} - \end{cases} + \sigma = \frac{a}{x^b} $$ -$$ - \thus - \frac{\sigma_1}{\sigma_2} = 9.9965508 \sim 10 = \sqrt{\frac{C_2}{C_1}} -$$ +As can be seen in @fig:err_fit, the obtained result confirmes the expected value +of $b^{\text{exp}} = 0.5$, having found $b \sim 0.499$. +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 -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. +![Plain MC uncertainties estimations $\sigma$ as a function of the + number of function calls $C$. Observed values in red, predicted + dependence in gray.](images/5-fit.pdf){#fig:err_fit} ## Stratified sampling @@ -381,6 +380,10 @@ calls $I^{\text{oss}}$ $\sigma$ diff Table: Some VEGAS results with different numbers of 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 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 @@ -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 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 importance sampling, the last turned out to be the most powerful mean to obtain a good estimation of the integrand.