If the distribution has a support over real numbers then scaling/shifting is easy enough, but if it doesn't, is there an elegant way to create scaled and shifted distributions? The only way I could think of doing it would involve writing new methods for each quantity I wanted, which seems tedious.

For example, if I wanted a Beta distribution with a=1, b=1 over the support [1,3], I was hoping I could write

But that results in an error. Of course, if I wanted a sample from that distribution I could make a new function:

my_sampler(n) = 2*rand(Beta(1,1),n) + 1

Is there any interest in adding that kind of functionality to Distributions.jl? Instead of refactoring the standard distribution, maybe new distribution types could be added, e.g. ScaledShiftedBeta, and then write appropriate methods.

--

You received this message because you are subscribed to the Google Groups "julia-stats" group.

To unsubscribe from this group and stop receiving emails from it, send an email to

[hidden email].

For more options, visit

https://groups.google.com/d/optout.