4
votes
$\begingroup$

What free tool can I use to do simple Monte Carlo simulations on OS X?

$\endgroup$
2
  • 3
    $\begingroup$ Almost any environment that includes a decent random number generator, I would have thought?! A little more info on the intended application might help elicit a more helpful answer: MC simulations of what? $\endgroup$
    – onestop
    Mar 29, 2011 at 12:09
  • 4
    $\begingroup$ You can look at my answers, whenever they contain Monte Carlo simulations, they were done on Mac OS X using R. $\endgroup$
    – mpiktas
    Mar 29, 2011 at 12:28

6 Answers 6

9
votes
$\begingroup$

enter image description here

What is a probability that a sum of a 3 highest results from 5 throws of a die is divisible by seven?

> mean(replicate(1e5,sum(sort(sample(1:6,5,replace=T))[3:5])%%7==0))
[1] 0.16068
> mean(replicate(1e5,sum(sort(sample(1:6,5,replace=T))[3:5])%%7==0))
[1] 0.16032

Circa 16%.

$\endgroup$
3
votes
$\begingroup$

My favourite platforms are

PyMC runs on OS X out of the box, OpenBUGS is originally for windows, but according to this it can be run using Wine.

$\endgroup$
1
  • 1
    $\begingroup$ You can use JAGS on OS X (it works with R too). $\endgroup$
    – chl
    Mar 29, 2011 at 13:15
3
votes
$\begingroup$

To some extent (less strictly statistical) NetLogo.

$\endgroup$
1
vote
$\begingroup$

You can even do Monte Carlo Simulation in Excel. It's not a perfect tool, but you probably already have it and know how to use it. Depending on the scope of your problem, it might be easier to use Excel than to learn something new. If you are going to learn something new, R is a great choice.

What are you trying to simulate?

$\endgroup$
2
  • $\begingroup$ Keep in mind that spreadsheet software have poor numerical accuracy, see [www.jstatsoft.org/v34/i04/paper](www.jstatsoft.org/v34/i04/paper) . $\endgroup$
    – GaBorgulya
    Mar 29, 2011 at 18:46
  • $\begingroup$ @GaBorgulya This is absolutely true, but if Ionuț needs a quick answer he might be willing to make the tradeoff in accuracy. $\endgroup$
    – Zach
    Mar 29, 2011 at 19:18
0
votes
$\begingroup$

R would be my first vote. Another free option would be gretl. If you happen to know BUGS, JAGS makes sense and is free. And I really don't like its syntax, but if you have some knowledge of Matlab, the free alternative Octave runs on MacOS X as well.

$\endgroup$
0
votes
$\begingroup$

Try http://tukhi.com. It is not clear whether or not they have a Mac OS X Excel version, but they have contact info on that site. It is pretty amazing. Heh, you could always run Window in a VM.

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.