May-20-2018, 10:51 AM
Lets consider for exmaple the following piece of code:
What about sample sizes in your case? The example above shows that we have to
use very large samples to get high accuracy estimations.
import numpy as np from scipy import stats x = 2 * np.random.randn(10000) + 7.0 # normally distributed values y = np.exp(x) # these values have lognormal distribution stats.lognorm.fit(y, floc=0) (1.9780155814544627, 0, 1070.4207866985835) #so, sigma = 1.9780155814544627 approx 2.0 np.log(1070.4207866985835) #yields 6.9758071087468636 approx 7.0So, everything works fine: sigma and mu are estimated correctly...
What about sample sizes in your case? The example above shows that we have to
use very large samples to get high accuracy estimations.