This came through my Twitter feed this morning:
QlikView and Monte Carlo Methods http://t.co/cHF3zxPHwB #BusinessDiscovery
— Torbjörn Ungvall (@Ungvall) August 27, 2013
And I looked at the article, and thought, “I can do that in Tableau.” About 20 minutes later, out came a pi estimator:
There’s a circle mark for every iteration, you can crank it up to 1,000,000 marks (on Tableau Desktop I can go to 2,500,000 marks, the Tableau Public Server is a little more limiting). However, the data source only uses two rows, it pads them out using the data scaffolding technique pioneered by Joe Mako where we use Tableau’s domain padding to generate the additional rows. To publish to Tableau Public I needed to use a data extract which does not currently support a random number function, so I used Joshua Milligan’s Random Number Generation post from the Tableau Calculation Reference Library.
This is very cool. Thanks for sharing!
Love it! Excellent work. I need to try that for an upcoming prescriptive article.
Thanks, Jen & Matt!
Wow! 20 minutes! You rock. Thanks for sharing.
This is seriously awesome!
At 500,000 iterations, the estimate is 2.84. That’s way off target. Is this algorithm converging with more iterations?
I suspect the problem is that the pseudorandom number generator isn’t so random for some seeds. I’ve seen it converge with many fewer iterations at times.