find the σ and the μ of the lognormal function, having 1st percentile and the 99th percentile

8 visualizaciones (últimos 30 días)
I have to build find the σ and the μ of the lognormal function, having the value of the 1st percentile (which is 30) and the 99th percentile (which is 60).
Do you have any suggestion to do it simply with matlab
Thank you in advance (be nice, I am not a statistic guru, I have already tried to solve it by myself searching a lot in statistic book)
  2 comentarios
Adam Danz
Adam Danz el 21 de Nov. de 2019
"I have to build find the σ and the μ of the lognormal function"
So far the problem is easy. Assuming these variables carry the conventional meanings, μ is just the function mean() and σ is just the function std()
"...having the value of the 1st percentile (which is 30) and the 99th percentile (which is 60)."
This is where I start to lose you. Are you trying to create the lognormal distribution with those percentile requirements or do you have those data already and are merely trying to compute σ and μ ?
SYML2nd
SYML2nd el 21 de Nov. de 2019
I am trying to create the lognormal distribution with those percentile requirements

Iniciar sesión para comentar.

Respuesta aceptada

the cyclist
the cyclist el 21 de Nov. de 2019
First you need to understand the math problem, then you can use MATLAB to solve numerically.
You can find the CDF of the lognormal distribution in this wikipedia section. So, you'll have two simultaneous equations (each equation is a function of σ and μ):
  • Eq 1: cdf of the lognormal at 30 = 0.01
  • Eq 2: cdf of the lognormal at 60 = 0.99
This is two equations in two unknowns, and with bit of manipulation, I believe can make this two linear equations in two unknowns.
Since this seems like homework, I think maybe that's enough of a hint to get you going.
  7 comentarios
the cyclist
the cyclist el 21 de Nov. de 2019
Editada: the cyclist el 21 de Nov. de 2019
I need to think a bit more carefully, but I'm pretty sure the code
x=0:1:150
lgn=lognpdf(x,solx, soly)
plot(x, lgn)
Y = prctile(lgn,1)
is not a valid way to find the 1st percentile of the distribution.
This should give approximately 0.01
logncdf(30,solx,soly)
and
logninv(0.01,solx,soly)
should give 30, if solx and soly are the correct distribution parameters.

Iniciar sesión para comentar.

Más respuestas (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by