Hi everybody,

I’m going to write a power-law distribution ( y = x^-2) in which x comes from a uniform distribution in [0,100] interval. According to this topic I could write the following code:

import theano.tensor as tt

def power_law(alpha):

def logp(x):

log_density = -alpha*tt.log(x)

return log_density

return logp

(alpha is 2). but I can’t incorporate the limitation on x!. How can I do this?

Thank you