Skip to content

incorrect formula in bilby.core.prior.conditional.DirichletElement docstring #993

@Qazalbash

Description

@Qazalbash

I have noticed that the mentioned formula does not match the implementation,

p(x_n) \propto (x_\max - x_n)^{(N - n - 2)}

$$ p(x_n) \propto (x_\max - x_n)^{N - n - 2} $$

where $N$ is the dimension, $n$ is the order.

The implementation is,

$$ x_n\mid x_\max\sim B(1, N-n-1) $$

where, $\mathrm{B}$ is the beta distribution with the $\mathrm{supp}(B)=[0,1-x_\max]$.

Simplifying the above formula gives,

$$ \forall n < N-1,\qquad p(x_n\mid x_\max) = \frac{(N - n - 1)(1-x_\max - x_n)^{N - n - 2}}{(1-x_\max)^{N - n - 1}},\qquad x_n\in[0,1-x_\max] $$

and for $n=N-1$,

$$ x_{N-1}\mid x_\max \sim \mathrm{Unif}(0,1-x_\max) $$


If you find my claim true, I will be happy to make a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationA change to docstrings or doc pages

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions