Zulip Chat Archive

Stream: Is there code for X?

Topic: Probability distribution for composition of operations


Martin Dvořák (Jan 08 2024 at 12:29):

I have a probability distribution over A → A and I would like to get a probability distribution for its composition with itself (I compose a random operation with another random operation — what is the probability for the resulting operation?).

Yaël Dillies (Jan 08 2024 at 12:30):

That sounds like a good use for the putative Measure.map₂, @Yury G. Kudryashov

Yaël Dillies (Jan 08 2024 at 12:31):

Currently, you can get it by doing (μ.prod μ).map fun (f, g) ↦ f ∘ g, where μ : Measure (A → A) is your distribution.

Yury G. Kudryashov (Jan 08 2024 at 14:19):

Note: adding Measure.map₂ is not on my TODO list. Mostly because the list is already too long.

Yury G. Kudryashov (Jan 08 2024 at 14:20):

If someone else implements it, then I'll be happy to review it.


Last updated: May 02 2025 at 03:31 UTC