@fehiepsi

Just to confirm your thought, there are `inf`

â€¦ Okay so, I finally got what I was waiting for

```
def model():
delta = 0.5
theta = numpyro.sample('theta', dist.Exponential(rate=delta))
factor = - jnp.log(delta) - (1.0-delta)*theta
numpyro.factor("val",factor)
ns = NestedSampler(model)
ns.run(random.PRNGKey(0))
data = ns.get_samples(random.PRNGKey(1),100_000)
fig = plt.figure(figsize=(7,7))
plt.hist(data['theta'],bins=50,density=True, alpha=0.5, label='samples');
x_i = np.arange(0,10,0.001)
y_i = np.exp(-x_i)
plt.plot(x_i,y_i,label=r"True PDF as $e^{-\theta}$")
plt.xlabel(r"$\theta$")
plt.show()
```

One gets

and the integral is given by

```
jnp.exp(ns._results.logZ)
```

which gives 1.00343113 (the truth is 1) which is ok for N=10^5 samples (ie 1/sqrt(N)).

But JaxNS gives some Inf value for the error, and this is not restricted to my example. It is also the case for JaxNS examples so I get in touch with the author. Anyway thansk for your advise and we can close this thread.