How to generate the hierarchical distribution like the following in MATLAB? X|P ~binomial (P) P~beta(\alpha, \beta) Thanks.