Product of probability distribution and nonrandom function

rand5
Fri, 10 Jan 2025 04:49:40 +0000
General Usage

I have a probability distribution, e.g. Y = Normal() and would like to scale the distribution (updating its pdf, cdf, etc.) by a nonrandom function, say f(x) = cdf(Normal(1,2),x).

Is there a way to do this and have the the result be a Distributions.jl distribution? I could define g(x)=pdf.(Y,x)*f(x), use rejection sampling to get samples from g(x), then fit a distribution to those data, but it seems a bit convoluted and am wondering if there is a better way. I realize there could be issues if the support of the resulting distribution changes, but in the case of a Normal() scaled by the cdf of a Gaussian, this isn’t the case.

Thanks!

1 post - 1 participant