4 ms·
I think you missed my point. I know this isn't how pi is calculated, that is completely irrelevant to what I've been trying to say. I also know Monte Carlo has
by wfunction 12y ago
I think you missed my point. I know this isn't how pi is calculated, that is completely irrelevant to what I've been trying to say. I also know Monte Carlo has other benefits, and that's entirely my point: the actual benefits aren't illustrated in the example.
what I'm saying is that the entire point of illustrating an algorithm by example is to illustrate the power of the algorithm compared to a naive approach, regardless of whether or not there is a better way to solve the example problem.
i.e., the example should motivate the algorithm.
But computing pi is one of the worst possible illustrations of why anyone would use Monte Carlo, because it's inferior to the naive approach. i.e., it doesn't motivate why anyone would want to use Monte Carlo.
- keithpeter 12y ago"But computing pi is one of the worst possible illustrations of why anyone would use Monte Carlo, because it's inferior to the naive approach. i.e., it doesn't motivate why anyone would want to use Monte Carlo." Any suggestions for a simulation that does illustrate the use of Monte Carlo methods while still being explainable with 16+ age range non-specialist mathematics? I'm hacking around with two step simulations like a tree diagram... http://sohcahtoa.org.uk/pages/maths_montecarlo.html http://sohcahtoa.org.uk/pages/maths_montecarlo.html My crack at saying how slowly a monte-carlo simulation 'converges' to a value of pi (not really converging, just confidence intervals tightening around the value).
- jwmerrill 12y agoI like computing the volume of the intersection of 3 orthogonal cylinders as a less trivial example problem. It's still easy to compute whether a given point is inside the volume, and there's still an analytic solution to compare to, but the problem is complicated enough that you start to appreciate how much easier MC is than other approaches.
- jwmerrill 12y agoOr compute the area of the mandlebrot set. This one has the advantage of being highly non-convex, which makes it hard to decide how to implement a recursive subdivision routine, since you don't know whether some of the target area is inside a given square just from looking at a few points on its boundary.
- keithpeter 12y agoMandlebrot set a bit over the maths level for intended group, but other repeated maps like logistic equation might be OK. I'll go with the cylinders first!
- keithpeter 12y agoSounds nice. Easy to visualise and close enough to a crucible design (toroidal volume intersected by a cube off axis and oblique to the central axis of the toroid) I once heard of in the days of Fortran.
- wfunction 12y agoYeah, search for "Example #1" and subsequently "Monte Carlo" on this page: http://jakevdp.github.io/blog/2014/06/06/frequentism-and-bayesianism-2-when-results-differ/ http://jakevdp.github.io/blog/2014/06/06/frequentism-and-bay...
- Houshalter 12y agoThe advantage of Monte Carlo isn't that it's the best method, it's that it's so simple. You just sample random points and see how many are in the circle.
- wfunction 12y ago> The advantage of Monte Carlo isn't that it's the best method I feel like you didn't read a single sentence of my comment, because that's exactly what I said I was not saying.
- Houshalter 12y agoRegardless, it's the simplest method and very general.