I want to sample a random variable X = (x_1,x_2,…,x_n) from a custom joint distribution such that x_i is an integer between 0 to i-1, i.e.,

P[x_1,x_2,…,x_n] = 1/n! if x_i is in between 0 to i-1 for all i and 0 otherwise.

It can be seen that this is a product of n independent discrete uniform distributions (the i th dimension is an uniform distribution with on the set of integers from 0 to i-1). How do we define such joint distribution with parameter n in PyMC3?

I tried the following:

```
with pm.Model() as model:
X = []
for i in range(5):
X.append(pm.DiscreteUniform('x_{}'.format(i),lower =0,upper=i))
trace = pm.sample()
```

pm.traceplot(trace)

Is this the right way to do this?