# Automatic reparametrizations of distributions in Distributions.jl

**URL:** https://discourse.julialang.org/t/automatic-reparametrizations-of-distributions-in-distributions-jl/132431
**Category:** Statistics
**Tags:** distributions
**Created:** [September 16, 2025, 9:11am UTC](https://discourse.julialang.org/t/automatic-reparametrizations-of-distributions-in-distributions-jl/132431 "2025-09-16T09:11:24Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![giovannitinervia9](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giovannitinervia9/32/218456_2.png) [@giovannitinervia9](https://discourse.julialang.org/u/giovannitinervia9)
#### Post date: [September 16, 2025, 9:11am UTC](https://discourse.julialang.org/t/automatic-reparametrizations-of-distributions-in-distributions-jl/132431/1 "2025-09-16T09:11:24Z")

</div>

Hi everyone,

I’m thinking about a potential feature for the **Distributions.jl** package that would be nice to have. Would it be possible to implement a function, let’s say `reparametrize`, that takes an existing distribution and a parameter transformation function to create a new distribution object?

For example, a common reparametrization is moving from the standard deviation to precision. We could define a transformation for a `Normal(μ, σ)` distribution to a new version parametrized by `τ = 1/σ²`.

This would streamline our workflow and reduce the need for writing custom distribution types for common transformations. It feels like a powerful tool for building flexible statistical models.

What do you all think? Is this concept feasible, and has anything like it been proposed or implemented before?

---

<div class="post-metadata">

### Author: ![aplavin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/aplavin/32/222056_2.png) [@aplavin](https://discourse.julialang.org/u/aplavin)
#### Post date: [September 16, 2025, 12:24pm UTC](https://discourse.julialang.org/t/automatic-reparametrizations-of-distributions-in-distributions-jl/132431/2 "2025-09-16T12:24:40Z")

</div>

What interface do you need for these reparametrizations? Eg, would adding a `precision(d::Normal) = 1/σ^2` function would be enough?

---

<div class="post-metadata">

### Author: ![seabbs](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/seabbs/32/31171_2.png) [@seabbs](https://discourse.julialang.org/u/seabbs)
#### Post date: [August 6, 2026, 9:53am UTC](https://discourse.julialang.org/t/automatic-reparametrizations-of-distributions-in-distributions-jl/132431/3 "2026-08-06T09:53:24Z")

</div>

I also really wanted this and have implemented something like it here: [ReparameterisedDistributions.jl](https://reparameteriseddistributions.epiaware.org/dev/)
