lognorm_ex#
- class lognorm_ex(mean=1.0, std=1.0, **kwargs)[source]#
Bases:
DistLognormal distribution, parameterized in terms of the “explicit” (lognormal) distribution, with mean=mean and std=std for this distribution (see lognorm_im for comparison). Note that a mean ≤ 0.0 is impossible, since this is the parameter of the distribution after the log transform.
- Parameters:
mean (float) – the mean of this distribution (not the underlying distribution) (default 1.0)
std (float) – the standard deviation of this distribution (not the underlying distribution) (default 1.0)
Example:
ss.lognorm_ex(mean=2, std=1, strict=False).rvs(1000).mean() # Should be close to 2
Attributes
bitgenstateGet the current state
state_intGet the integer corresponding to the current state
Methods
- convert_ex_to_im()[source]#
Lognormal distributions can be specified in terms of the mean and standard deviation of the “explicit” lognormal distribution, or the “implicit” normal distribution. This function converts the parameters from the lognormal distribution to the parameters of the underlying (implicit) distribution, which are the form expected by NumPy’s and SciPy’s lognorm() distributions.