A graph for monitoring the convergence of an estimator

hello,

I had to produce the enclosed graph for a study. I think that it could be useful to be able to create them easily within OT, maybe in the bootstrap class?

Hi,

Maybe this example will be helpful as it contains similar display :

Hi Sanaa,

My answer is a bit off-topic, sorry, but I guess that might still be interesting.

In general, I suggest to use the log of the sample size on X-axis. This is because, with Monte-Carlo simulations, the convergence follows \frac{\sigma}{\sqrt{n}} where \sigma is the standard deviation of X and n is the sample size. Hence, we must multiply the sample size by 4 in order to reduce the standard deviation by 2. Only the log-scale can reflect this ; the linear scale let us think that the estimate converges faster than it actually does.

Here is the reasoning. Consider the random variable X and let x_1,\ldots, x_n be independent realizations of X. Then the sample mean \bar{x} converges to the true mean \mu with rate \frac{\sigma}{\sqrt{n}}:

|\bar{x} - \mu| \approx z_{1 - \frac{\alpha}{2}} \frac{\sigma}{\sqrt{n}}.

where \alpha is the confidence level.
Therefore,

\log(|\bar{x} - \mu|) \approx \log(z_{1 - \frac{\alpha}{2}} \sigma) - \frac{1}{2} \log(n).

If the true mean is known, we can then draw the error |\bar{x} - \mu| depending on n on a log-log scale : the points fall on a line with slope -\frac{1}{2}. Of course, we generally do not know \mu (except in school exercises), otherwise we would not use the Monte-Carlo estimator. Hence, in general, we cannot compute the error |\bar{x} - \mu|.
We can, however, use the equation:

\bar{x} \approx \mu \pm z_{1 - \frac{\alpha}{2}} \sigma \exp\left(- \frac{1}{2} \log(n)\right).

So in the (\log(n),\bar{x}) plane, the convergence should be exponentially converging to the constant line y = \mu with exponential speed. I think that this visually reflects the Monte-Carlo convergence more accurately than the linear scale depending on the iteration index does.
Now your graphics uses the iteration index, which is a bit different from the log of the sample size, but not so different. But the user may not be directly interested in the iteration index: only the sample size matters.

Below are four graphics where with different configurations:

  • with the sample size as X axis and the absolute error on Y axis, in log-log scale,
  • with the sample size as X axis,
  • with the iteration index,
  • my favorite: with the sample size as X axis in log-scale.

image

Capture du 2020-12-03 17-13-46

Capture du 2020-12-03 17-14-43

Notice that we guess that the iteration corresponds to a linear increase in the sample size, but this is rather implicit.

And my favorite:

Capture du 2020-12-03 17-14-07

Best regards,

Michaël

PS
\LaTeX rendering is very well managed in the forum!