I need to generate a lognormal distribution with mean=1 and std=1. That is:w~logN(1,1). I need the variable w has mu=1 and sigma=1. However, when I use scipy.stats.lognorm, I have trouble on manipulating the parameters s,loc,sigma. The code is as follows:
import numpy as np
from scipy.stats import lognorm
lo = np.log(1/(2**0.5))
sig = (np.log(2.0))**0.5
print(lognorm.stats(s=sig,loc=lo,scale=1.0,moments='mv'))
The result is:
(array(1.06763997), array(2.))
This is clearly not I want. I want the mean=1 and sigma=1.
Could anyone please tell me how to manipulate with s,loc, and scale to get desired results?


