# How to represent results of Monte Carlo Simulation

I have a random variable $X$.

### Case 1

I've analytically derived the expected value of $X$ and I want to convince people that this result holds by comparing it with a Monte Carlo Method.

### Case 2

I don't know the analytical expression of the expected value of $X$ and I've used Monte Carlo Method to find an approximation. In particular since $X$ depends on a parameter $\alpha$, I run MC simulations varying it.

What are graphical representations to convince people (and myself) of the correctness of the results?

To be more precise for Case 1, I guess one way would be to have a plot like Relative Error of Monte Carlo Simulations.

• Updated, is it clearer? Commented May 3, 2018 at 14:42
• I can provide you with some suggestions for visualizations in a little while when I get home (if someone doesn't beat me to it), but regarding Case 1, the analytic solution trumps everything else (assuming it is correct), and the simulation should be used as an explanatory tool rather than a convincing one.
– Emil
Commented May 3, 2018 at 14:59

## Case 1

When you have your analytical solution beforehand, then you can use that by superimposing it on the way the simulation results behave when you increase the simulation size. A very common method is shown in this article which explains how to use an R package called ESGtoolkit, used for generating economic scenarios. The main idea would look something like this:

Like I said in the comment though, you should use images like this to show that it is the Monte Carlo method who will indeed converge to the true, analytical value, and not the other way around, i.e. "the MC method seems to converge around this number so that must be the true value".

## Case 2

When you don't know the analytic formula beforehand (because it might not even exist), the principle is the same but you might want to do a few slight modifications. An example would be the case of European Asian options, who do not have a closed formula for their price, and a common approach is the typical Monte Carlo simulations, but I found that if you were to perform only one "batch" of simulations, starting from say $N=25,000$ and simply increasing that $N$, it was a bit difficult to see the convergence (or be convinced that there is a convergence if you didn't know about the theory beforehand), so instead I did several batches of simulations for each simulation size value $N$, and plotted the resulting "price" of those on the same x-axis. As expected, if you keep the amount of batches the same but increase the simulation size $N$, the range of results starts decreasing:

Perhaps my point would have been clearer if I were to increase $N$ even more, but the running times started getting quite high already (and I wrote the code without targeting optimal performance).

Edit: For your $\alpha$ problem, I can think of two ways to go about it. 1. You either superimpose the individual lines that show the convergence on top of each other for each $\alpha$ and give them a different color according to each value of $\alpha$ that you test, or, if there are two many values of $\alpha$ and/or the simulation lines are too close to each other, 2. You create a 3d plot as Horst suggests, where sample size $N$ would be on the x-axis, $\alpha$ on the y-axis, and your value for $X$ on the z-axis. The axes or the label of the graph notwithstanding, it would look something like this.

Case 1: Do repeated runs with various numbers of repetitions. MC bases on the weak law of large numbers which is linked to the Chebyshev inequality. So if you plot the difference between simulated and theoretical expectation (or a suitable norm of if) in each simulation against the respective number of repetitions, you should recognize some kind of convergence if your formula and your MC code are both correct.

Case 2: Do runs varying $\alpha$ and plot the said difference (or its norm) against $\alpha$. You can also vary the numbers of repetitions and make a 3D plot $\alpha \times$ repetitions $\times$ difference.