citizen428.blog()

Try to learn something about everything

Incanter and the Birthday Paradox

As a little follow-up to my recent post on the Birthday Paradox I decided to clean up the code and also plot the relationship between group size and the probability of a shared birthday with Incanter (mostly because I wanted to show off 1.2’s hot new default theme).

Code:

Screenshot:

Birthday Paradox plotted by Incanter on Twitpic

I just love how easy it is to explore problems like this with Clojure and then use Incanter go get some cute little plot too! :-)

Update: Incanter’s author David Liebke sent me a version of the above that fits into one tweet and another one with a Latex annotation! I updated my code to incorporate some of his suggestions.

Comments