0

Background

I am working with posterior probability distributions for parameters obtained from a Bayesian binomial generalised linear model with a logit link function. The parameters returned by the model are the log-odds intercept (a) and slope (b, also known as the logistic rate k). The logistic equation for these models can thus be written as $f(x) = \frac{1}{1 + e^{kx + a}}$ or $f(x) = \frac{1}{1 + e^{k(x + µ)}}$ where µ = $\frac{a}{k}$ is the inflection point of the sigmoid. I prefer the second form because µ is often more meaningful than a.

Specific problem

Rather than just working with central tendencies, I would like to estimate the entire probability distribution of µ to calculate probability intervals etc. I tried doing this by dividing the posterior a by the posterior k. However, the result is a strange angular distribution, the mean of which is not at all similar to the quotient of the means of a and k. Here is a MRE in R:

a <- rnorm(1e4, 3, 1)
k <- rnorm(1e4, -0.2, 0.1)
µ <- a/k

mean(µ)-mean(a)/mean(k) # means are very different

require(ggplot2) ggplot() + geom_density(aes(a)) ggplot() + geom_density(aes(k)) # distributions for a and k look fine ggplot() + geom_density(aes(µ)) + coord_cartesian(xlim = c(-300, 400))

distribution for µ is angular

enter image description here

I know for a fact that the mean of µ estimated as the quotient of the means of a and k is correct while the mean of µ estimated as the mean of the quotient of a and k is incorrect, since inserting the former into $f(x) = \frac{1}{1 + e^{k(x + µ)}}$ corresponds with the model prediction in probability space (p) derived from the posteriors a and k.

Question

Why is the quotient of two posteriors angular and leads to wrong inference? How can the mean of a quotient distribution be different to the quotient of the means of the dividend and divisor distributions? Would specifying µ rather than a as a parameter in the model make any difference?

  • 3
    You are fooled by the poor quality of the density: this image is incorrect. There are huge outliers in the quotient and therefore, because you accepted the software defaults, ggplot2 has rendered the density at a ridiculously coarse resolution. Try again by first examining the ratio more closely. See the comment thread at https://stats.stackexchange.com/questions/182915 for helpful pointers and discussion. – whuber Apr 23 '23 at 15:40
  • Thanks for your reply @whuber and for solving the graphical part of the question. From following your link and the links therein I discovered that quotient distributions are difficult to describe using central tendencies and intervals (i.e. moments). This explains why I arrive at the wrong mean trying to summarise the quotient distribution while I arrive at the right mean dividing the means of the normal distributions. Can I still use the quotient distribution for pairwise contrasts, i.e. subtracting one quotient distribution from another and inspecting the difference for probability mass < 0? – Luka Seamus Wright Apr 24 '23 at 00:07
  • 1
    Because of the problems you describe, division generally is not a good procedure. (It makes sense for certain kinds of statistics, such as ratios of variances, for fairly deep reasons.) You don't arrive at the correct mean, either, despite "knowing it for a fact": the ratio of two (independent) Normal distributions always has an undefined mean. See https://stats.stackexchange.com/questions/299722. – whuber Apr 24 '23 at 12:16

0 Answers0