0

I have the image below, where you cannot find real shape using Monte Carlo.

half square monte carlo

triangle monte carlo

Same rasio but different shapes. The 1/2 rasio could have different shapes or angle, like triangle or half square or any shapes as the image above. But Monte carlo used to find rasio and just make sure that the rasio approximating 1/2.

the real rasio 1/2

after simulation 0.976767999 / 2

My question is, is it possible to find real shape using Monte Carlo? Since I have second day in Monte Carlo, I don't know the possibility.

  • How many points are in this simulation? Did you try running it more than once? If subsequent runs all gave values approximately $2.3%$ smaller than the exact value, as this run did, something is wrong with the simulation. You should sometimes get a result larger than the exact value. – David K Apr 11 '19 at 13:39
  • You write, "you cannot find real shape using Monte Carlo," and then you ask, "is it possible to find real shape using Monte Carlo?" Que? – Gerry Myerson Apr 11 '19 at 13:43
  • Ok sir, that is not real simulation, ..just example. @DavidK – time machine Apr 11 '19 at 23:29
  • yes sir, because stackoverflow ask me What i've tried @GerryMyerson – time machine Apr 11 '19 at 23:30

2 Answers2

1

I imagine you are performing this simulation by defining the region in the $xy$ plane and randomly generating points in the square / rectangle and you are approximating the area by finding the ratio of the number of points that fall in the region of interest to the total number of points.

There is no reason to say that a given run of the simulation isn't allowed to result in the exact area of the shaded region, but it isn't necessary. Of course this would require an even number of generated points; you can't end up with a ratio of $1/2$ with an odd number of points.

As you include more and more points, you are naturally going to result in answers that approach the exact area, since with a large number of points you should have points that span across much of the whole box, and the ratio will be close to exact. Could you by chance end up with the exact answer? Sure, but it is unlikely, nor is it the goal of Monte Carlo Simulation. The goal is to provide approximate answers to problems that might otherwise be impossible to solve through direct methods. However, it can also be used in your situation: a direct solution is easily seen but Monte Carlo Simulation can still be used so that you can see the process of how it works (and you can check your code to see if it is running properly)

WaveX
  • 5,440
  • As you said, "..There is no reason to say that a given run of the simulation isn't allowed to result in the exact area of the shaded region.." is that mean i cannot finding those numerator points without function which the function is the exact area it self? if so, why should i finding the value of numerator from the function which i have known the answer, is it make sense, finding the value that i have known. My question from the goal of Monte Carlo, what kinds of situation which impossible to solve through direct method? – time machine Apr 11 '19 at 23:42
0

Yes, it can take a lot of simulations to converge to the correct answer though. Try doing more simulations and see what you get.

fGDu94
  • 3,916
  • Ok sir, you said possible, but i have reverse question. Is it possible finding a real shape especially the numerator as points without defining function? – time machine Apr 11 '19 at 23:53
  • Hmm if you can explain more clearly what you mean I'd be happy to answer. – fGDu94 Apr 12 '19 at 07:06