I just published the simple-random ruby gem, which is ported from C# code by John D. Cook. You can view the source on github or install the gem via rubygems:
gem install simple-random
The gem allows you to sample from the following distributions:
- Beta
- Cauchy
- Chi Square
- Exponential
- Gamma
- Inverse Gamma
- Laplace (double exponential)
- Normal
- Student t
- Uniform
- Weibull
Simple examples:
require 'rubygems'
require 'simple-random'
r = SimpleRandom.new
r.uniform # => 0.127064087195322
r.normal(5, 1) # => 5.71972152940515



cool! Dirichlet is missing there, would help, I think, to see it added.
If you have Gamma, it is easy to generate Dirichlet (it is a normalized Gamma vector.)
good suggestion, i’ll try to add it soon. and hope you’re doing well :)