sympy/sympy — pull request #1724 by mrocklin (2013-01-22 04:10:02+00:00)
Title: WIP - Rewrite rule simplification for sympy.stats

In [this blog post](http://matthewrocklin.com/blog/work/2012/12/11/Statistical-Simplification/) I motivate the use of rewrite rules for simplifying statistical distributions. Statisticians know relations like if X and Y are standard normal random variables then X**2 has a ChiSquare distribution and X**2 + Y**2 has a ChiSquare distribution with two degrees of freedom.

Rewrite rules allow us to express and use this knowledge easily.

This pull request constructs a `statsimp` function for the simplification of density calculations. See `sympy/stats/simplify.py`. The information for statistical transformations is separated from the algorithmic core. Ideally someone should be able to look at `_rv_eqs` in `sympy/stats/simplify.py`, understand what is going on, and contribute more relations. I encourage you to try this out. Some distributions are evident here
http://www.math.wm.edu/~leemis/chart/UDR/UDR.html

This pull request builds on https://github.com/sympy/sympy/pull/1718 and https://github.com/sympy/sympy/pull/1720

This pull request is a work in progress.