Beta distribution with a different scale

Is it possible to use Beta distribution with different range rather than (0,1).

Perhaps do a deterministic transform on the beta distribution RV? ping @junpenglao, who may know better than me.

If you are using it as a latent variable, you can do the deterministic transformation on the Beta:

with pm.Model():
    p = pm.Beta('p', 1., 1.,)
    p_ = a + p_*(b-a) # p_ is now in the range of (a, b)

You can add Jacobian correction to a potential to make sure it is proper.

If you are using the Beta as observed, then the easiest way is scale the observed to (0, 1)

Do you mean:

with pm.Model():
    p = pm.Beta('p', 1., 1.,)
    p_ = a + p * (b-a) # p_ is now in the range of (a, b)

? (All I did was remove the underscore from the equation involving p_.)

Yes that’s what I meant :sweat_smile:

It is observed variable, I will scale the output.
Thanks for your help