# Prior and parameter definitions of x and y when x < y and both are between 0 and 1?

I am trying to figure out a proper way of defining two constrained parameters and their priors:
I have x \in (0,1) and y \in (x, 1) and I would like to set up a beta-priors for x and y. What is not clear to me is where do I need to put bounds and/or explicit truncation?

For parameters block I though about using

parameters {
real<lower=0,upper=1> x;
real<lower=x, upper=1> y;
}


And as a prior something along lines

model {
x ~ beta(0.5 * 10, (1 - 0.5) * 10);
y ~ beta(0.75 * 10, (1 - 0.75) * 10);
}


But should I add explicit truncation somewhere here as x < y?

edit: I’m not fixated with the beta priors though, as long as I can easily provide some information about the prior means of x and y.

I don’t think that’s a consistent specification. If x < y and both x and y are somewhere in the interval (0,1), then wouldn’t it be the case that x \in (0,a] and y \in (a,1)? Also, if both x and y are limited to subintervals of (0,1), then the beta prior can’t be used for either.

Yeah I guess what I am after is something like x ~ Beta(.) and y|x ~ Beta(.)T[x,1] (or y ~Beta(.) and x|y ~ Beta(.)T[0, y]).

Perhaps it would be better parametrize the model in terms of 1/x and 1/y with ordered_vector and use Gamma priors for these…?