0
$\begingroup$

I would like to know given a lognormal distribution as per attached. How can I find the value x such that there is 90% probability that the a variable will be higher than x. May I know the coding in R to find the X value?

enter image description here

$\endgroup$

1 Answer 1

4
$\begingroup$
> qlnorm(0.10,meanlog=0,sdlog=1)
[1] 0.2776062

Substitute your values into the meanlog and sdlog parameters as appropriate (note these are on the log scale). See also ?qlnorm.

$\endgroup$
4
  • $\begingroup$ Hi Stephan, thank you for your answer. Because I am new to R, may I know how to find the meanlog and sdlog in r? I have the data in r and fit a distribution, and found that the data follows a log-normal distribution. In that case, how can I obtain the meanlog and sdlog? Thank you very much. $\endgroup$
    – user7
    Dec 8, 2021 at 7:40
  • $\begingroup$ Those would come out of however you fit your lognormal distribution to your data. If you use MASS::fitdistr(), you get an output with exactly those names (and standard errors). For example: set.seed(1); MASS::fitdistr(rlnorm(1000,0,1),"log-normal"). $\endgroup$ Dec 8, 2021 at 7:58
  • $\begingroup$ Hi thank you Stephan for your answer:) Have a good day! $\endgroup$
    – user7
    Dec 8, 2021 at 8:10
  • 1
    $\begingroup$ @Glen_b: that makes sense, thanks for pointing this out. Let me edit... $\endgroup$ Dec 9, 2021 at 6:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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