I would like to derive the distribution of the odds ratio $r := \frac{p_1/(1-p_1)}{p_0/(1-p_0)}$ with beta prior, specifically, $p_0, p_1 \in [0,1]$, $p_0 \sim beta(39.5, 635.5), p_1 \sim beta(22.5, 658.5)$. I don't know how to derive its analytical density form other than change of random variable, but a change of random variable from $(p_0, p_1)$ to $(r, p_1)$ doesn't lead me to a solution because of the complication of integrating the joint distribution of $(r, p_1)$ to get the marginal distribution of $r$. So I simulate it by R:
n=1000
r <- rep(0, n)
p0 <- rbeta(n, 39.5, 635.5)
p1 <- rbeta(n, 22.5, 658.5)
r = (p1/(1-p1)) / (p0/(1-p0))
hist(r, plot=TRUE)
Is it possible to derive the analytical form of $r$ density?
What kind of distribution is it? Thanks!