I am relatively new to the concept of Python Programming, infact I have a below par Basic Knowledge of Python coding. However I have a assignment to submit and hence I am asking for the help of Community Members here
so I need to Plot a CDF for a Lognormal Random Variable value with a median 10.0 and 20% dispersion. I can calculate the Mean and Standard Deviation for the above Values Manually using the Lognormal distribution sequence Formulas for Random Variables.
since my knowledge is Primitive I wasn't able to determine the code concept. Could Someone please help me on this issue?.
Update 1 :Going through the Forum I was able to determine the code which I found useful and this would be as follow
import math
from scipy import stats
# standard deviation of lognormal distribution
sigma = -19917.63
# mean of Lognormal distribution
mu = 22135.873
# hopefully, total is the value where you need the cdf
total = 37
frozen_lognorm = stats.lognorm(s=sigma, scale=math.exp(mu))
frozen_lognorm.cdf(total) # use whatever function and value you need here
I hope this code suffices or do I need to change anything else?