http://www.perlmonks.org?node_id=892834


in reply to Re: Monte Carlo - Coin Toss
in thread Monte Carlo - Coin Toss

...find the probability density function of distribution (pdf) of tossing 20 coins at a time.

Let me add a pedantic point. When asked to find a PDF (e.g., in a statistical theory class), the requester is likely to mean that the function should be found analytically. That said, it is equally valid to compute it exactly by enumeration (as roboticus did).

Someone looking for a Monte Carlo approach will typically ask you to estimate the PDF.