An algebra over distributions (random elements).

About

The R package algebraic.dist provides an algebra over distributions. It enables:

  • Operations on distribution objects (addition, subtraction, transformations)
  • Lazy composition of distributions via expression objects (edist)
  • Sampling, expectation, conditioning, and marginalization operations
  • Support for both parametric (normal, mvn, exponential) and empirical distributions

Key features include algebraic operations that compose distributions, generic methods for statistical operations, and a flexible architecture supporting both univariate and multivariate distributions.

Installation

You can install the development version of algebraic.dist from GitHub with:

# install.packages("devtools")
devtools::install_github("queelius/algebraic.dist")

See the vignette algebraic.dist: Example for a quick introduction to the package.

Future Development

Planned features include:

  • Automatic simplification of composed distributions (e.g., sum of normals → normal)
  • Lazy expression trees that simplify to closed forms when possible
  • Limiting distributions and convergence analysis
  • Automatic deduction of moments and distribution properties