Whatever it costs, all lognstat in matlab does the following:
import numpy as np def lognstat(mu, sigma): """Calculate the mean of and variance of the lognormal distribution given the mean (`mu`) and standard deviation (`sigma`), of the associated normal distribution.""" m = np.exp(mu + sigma**2 / 2.0) v = np.exp(2 * mu + sigma**2) * (np.exp(sigma**2) - 1) return m, v
It might have a function for scipy.stats or scikits-statsmodels , but I don't know about that. In any case, this is just a couple of lines of code.
Joe kington
source share