← Back to all sparks
D

distributional

ANALYTICS
Velocity0.0

Vectorised Probability Distributions

distributional taught + and - to work on any pair of distributions, closing the algebra it started with.

r-packageprobability-distributionsdistribution-arithmeticnumerical-methodstidyverts
Current state
The R package providing vectorised distribution objects — the substrate that forecasting and anomaly tooling in the same ecosystem builds on. Cadence has picked up sharply, with four releases in the six months to June 2026 against roughly one a year before that. Two kinds of work alternate: adding distribution families (Dirichlet, Horseshoe, Laplace, multivariate t, g-and-k, the extreme-value pair) and deepening what can be computed generically across all of them.
Where it's heading
The generic-computation thread is the one that matters and it has been building steadily: a Monte Carlo default method for cdf(), has_symmetry() to let algorithms specialise, hdr() moving to exact results for symmetric distributions and 4096 quantiles elsewhere, open-versus-closed support intervals. Version 0.8.0 is where that thread arrives somewhere — arithmetic on arbitrary distributions, with closed forms used when they exist and numerical convolution when they do not. The package is positioning itself as a computational layer rather than a catalogue, which is consistent with how weird and the forecasting packages consume it.
Prediction
Expect the numerical machinery behind dist_convolved() to be reused for other operators, and more generics like has_symmetry() that let downstream algorithms take exact paths when a distribution supports them.

Recent moves

  1. 1mo ago

    Conditional S3 registration so the package loads on R before 4.3

    Conditionalises the chooseOpsMethod() S3 registration introduced alongside the new operator support, restoring loading on older R versions. A direct consequence of the operator work in 0.8.0.

    View source ↗
  2. 1mo ago

    Distribution arithmetic: FFT convolution behind the + and - operators

    ⚡ SPARK

    The release where the object model becomes computational. Adding and subtracting distributions now works generally rather than only for the families with closed-form sums, and dist_mixture() gains quantile mixtures alongside probability mixtures. Read against the generic-computation work in 0.5.0 through 0.7.0, this is where that arc lands.

    View source ↗
  3. 2mo ago

    Vectorised p in quantile() for inflated distributions; open brackets on infinite bounds

    Adds vectorised p support in quantile() for inflated distributions, uses open brackets for non-finite truncation boundaries, and fixes a density() error when multivariate parameters carry names. Small consistency work of the kind that accumulates into the generic behaviour 0.8.0 depends on.

    View source ↗
  4. 5mo ago

    Dirichlet and Horseshoe distributions added

    Adds dist_dirichlet() and dist_horseshoe(), fixes the default sigma for multivariate normals, and improves how limited multivariate support regions are formatted. Both new families point at Bayesian use — the Horseshoe in particular is a shrinkage prior, not a descriptive distribution.

    View source ↗
  5. 7mo ago

    has_symmetry() generic, exact HDRs for symmetric distributions

    Adds a has_symmetry() generic so algorithms can detect and exploit symmetry, which hdr() immediately uses to produce exact results for symmetric distributions while raising its default quantile count from 512 to 4096 elsewhere. Laplace and multivariate t join the catalogue, and per-distribution documentation gains the mathematical formulas for each statistic. A clear instance of the pattern: expose a structural property, then specialise on it.

    View source ↗
  6. 1y ago

    Monte Carlo cdf() default method; g-and-k, g-and-h and extreme-value families

    Adds a default cdf() method estimating the CDF by Monte Carlo integration, which gives every distribution a working CDF whether or not one was implemented, and support() begins reporting whether its interval is open or closed. New families include g-and-k, g-and-h, GEV and generalised Pareto. The fallback CDF is the structural piece — the same fill-in-the-general-case strategy that dist_convolved() later applies to sums.

    View source ↗