sympy/sympy — pull request #1044 by tesserahub (2012-02-11 00:03:01+00:00)
Title: sympy.stats: Additional Random Variable Types

Finite random variables: DiscreteUniform, Binomial, Hypergeometric.
Continuous random variables: LogNormal, Weibull.
* DiscreteUniform takes a collection of items and gives a distribution where each has uniform probability.
* Subclassed Die from DiscreteUniform, as it is a special case.
* Other distributions self-explanatory.
* Renamed the 'a' and 'b' parameters in Bernoulli to 'succ'(ess) and 'fail'(ure).
* Binomial also supports succ/fail variables, since it naturally extends from Bernoulli.
* Made Gamma sample from Python's random.gammavariate()

Issues:
* LogNormal can't integrate the pdf to find the expected value or other moments
* Since frv's use for-loops, we can't have symbolic parameters for n=number of choices parameter in Binomial, or N, m, n parameters in Hypergeometric. Maybe a new rv class to handle infinite discrete choices can fix this.