Given a known 95th percentile value of $n$, and assuming a log normal distribution, is there a way to calculate pairs of possible parameters (meanlog, sdlog)?

I was able to get fairly close numerically, with n = 95:

lim95 <- 95
t <- 1000

find.sd <- function(lgmn,q95){
    x <- (seq(0,50,length=10000))
    lsds <- qlnorm(.95,lgmn,x)
    r1 <- x[min(which(lsds>q95))]

lgmn1 <- seq(0,4.54,length=t)
lgsds1 <- sapply(lgmn1,find.sd,q95=lim95)
test1.q95 <- qlnorm(.95,lgmn1,lgsds1)

x <- seq(0,lim95*1.2,length=t)
y <- matrix(ncol=length(x),nrow=length(x))

for (i in 1:length(lgmn1)){
    y[i,] <- dlnorm(x,lgmn1[i],lgsds1[i])

    main="Possible Log-Normal PDFs with 95 percent values of n=95")

Yields the following to give a sense of the range of distributions that meet the criteria.

I'm looking for a more generalized approach - numeric or analytical.

  • $\begingroup$ You're probably right, I'll move to Cross Validated. Agreed with gaussian densities with mean=median=mean --> infinite possibilities. For my question, there's a range of values that will work - will not be infinite. Aiming to understand what that range looks like. $\endgroup$ – user2024015 Aug 8 '17 at 7:25
  • $\begingroup$ It will be migrated eventually. $\endgroup$ – Roman Luštrik Aug 8 '17 at 7:37
  • $\begingroup$ The problem is underdetermined for both Normal and lognormal. $\endgroup$ – DWin Aug 8 '17 at 8:28
  • 1
    $\begingroup$ Agreed that there is no single correct answer for this - possible answers are infinite, however, need to fit within a discrete range (mean will always be between 0 and n). I'd like to be able to efficiently characterize this range, and visualize the universe of possible distributions that meet the criteria. $\endgroup$ – user2024015 Aug 8 '17 at 8:42
  • $\begingroup$ I suggest you watch this question : stats.stackexchange.com/questions/30236/… $\endgroup$ – ThanhKim Aug 8 '17 at 9:14

We say that a random variable $Z$ has a lognormal distribution with parameters $\sigma\gt 0$ and $\mu$ when its logarithm, suitably standardized, has a standard Normal distribution $\Phi$. That is, for any $z$,

$$\eqalign{ F_{\mu,\sigma}(z) &= \Pr(Z \le z) = \Pr(\log(Z) \le \log z) = \Phi\left(\frac{\log z-\mu}{\sigma}\right) \\ &= \int_{-\infty}^{\left(\frac{\log z-\mu}{\sigma}\right)} \exp(-t^2/2)\mathrm{d}t. }$$

Equivalently, writing $\log z=\mu + \sigma y$,

$$F_{\mu,\sigma}(e^{\mu+\sigma y}) = \Phi(y).\tag{1}$$

Let $\alpha=95/100$ denote the number corresponding to the given percent. The $\alpha\times 100$ percentile of $Z$ is the (unique) number $z_\alpha$ for which

$$\alpha = F_{\mu,\sigma}(z_\alpha).\tag{2}$$

Writing $z_\alpha = e^{\mu + \sigma y_\alpha}$ in $(2)$ and applying $(1)$ gives

$$\alpha = \Phi(y_\alpha),$$

with the (unique) solution

$$y_\alpha = \Phi^{-1}(\alpha);\\ \log z_\alpha = \mu + \sigma \Phi^{-1}(\alpha).\tag{3}$$

Given $\alpha$ and $z_\alpha$, equation $(3)$ defines a line in the $\mu,\sigma$ plane orthogonal to the direction $(1,\Phi^{-1}(\alpha))$, with $\mu$-intercept $\log z_\alpha$. The portion in the upper half plane $\sigma \gt 0$ (which will be an open ray) describes all the Lognormal distributions consistent with this information.


These plots show (part of) the locus of $(\mu,\sigma)$ for the case $\alpha=0.95$ and $z_\alpha=2$ at the left. The black dots indicate particular values of $(\mu,\sigma)$ lying along this ray. At the right of each is the graph of the PDF of the corresponding Lognormal distribution, filled in to include a total probability $\alpha$. As intended, the filling terminates at $z_\alpha$ in all cases.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.