3

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!

Scortchi - Reinstate Monica
  • 27,560
  • 8
  • 81
  • 248
Tim
  • 1
  • 29
  • 102
  • 189
  • 3
    With parameters this large, for many purposes you can closely approximate the distributions of the $\sqrt{p_i}$ with Normal distributions. For instance, $\sqrt{p_0} \sim$ Normal$(0.241186, 0.0186454)$ approximately. The CDFs differ by at most $0.004$. This enables you to capitalize on the extensive knowledge of ratios of normal variates. You can go further and approximate the root odds $\sqrt{p_i/(1-p_i)}$ with normal distributions, too (although the approximations are not quite as good). – whuber Feb 22 '14 at 14:37
  • Do you also think that the distribution of the odd ratio does not have an anlytical form, regardless how big the parameters of the beta priors are? – Tim Feb 22 '14 at 14:43
  • 3
    That's right. The odds *do* have an analytical form, but their ratio appears intractable. – whuber Feb 22 '14 at 14:45
  • What approximation of do you think of for the distribution of the odd ratios – Tim Feb 22 '14 at 14:46
  • 1
    [Search our site](http://stats.stackexchange.com/search?q=normal+ratio). You will have to be selective, but there's good stuff there. One of the hits is http://stats.stackexchange.com/questions/3640 with some good references in the answer by @ars. – whuber Feb 22 '14 at 14:49
  • Memory finally kicked in. Note that if $X\sim Beta$, $X/(1-X)$ is [beta prime](http://en.wikipedia.org/wiki/Beta_prime_distribution), so you're talking about a ratio of independent beta primes. Beta primes are connected to F distributions, so you may want to think about convolutions of logs of F random variables. – Glen_b Feb 23 '14 at 03:09
  • @Glen_b: could you explain why and how "Beta primes are connected to F distributions, so you may want to think about convolutions of logs of F random variables"? What is the distribution for the ratio of two independent beta primes? – Tim Feb 23 '14 at 03:41
  • And for logs of F, [see here](http://en.wikipedia.org/wiki/Fisher%27s_z-distribution). Since beta primes are scaled F, a convolution of a pair of shifted logFs should have the distribution of the log of the required quantity. If it's not algebraically nice (and it probably won't be), you might do that numerically. – Glen_b Feb 23 '14 at 03:43
  • 1
    The connection between F and Beta prime is explicit at the link I gave on beta primes, all you have to do is look. I don't know what the distribution of the ratio of independent beta primes is, *which is why I was talking about working with the logs*, since the problem reduces to simple convolution on the log-scale. – Glen_b Feb 23 '14 at 03:52

0 Answers0