On this page
random.lognormvariate
Prev: random.getstate | Up: random | Next: random.normalvariate
Rel: random.betavariate, random.binomialvariate, random.choice, random.choices
Ref: docs.python.org — random.lognormvariate
Tags: #public #python3 #stdlib #random
Import
import random
from random import lognormvariate
Signature & Overview
random.lognormvariate(mu, sigma)
Log normal distribution.
Usage
import random
rng = random.Random(1)
x = rng.lognormvariate(mu=0.0, sigma=0.5)
assert x > 0.0
Gotchas
muandsigmaare of the underlying normal distribution:math.log(x)is normally distributed with meanmuand std devsigma.
REPL Inspect
from random import lognormvariate
help(lognormvariate)
Linked from
Related notes
- tuts/python3/stdlib_module/random/getstate Linked here; links to this page; shared tags: #random, #stdlib
- tuts/python3/stdlib_module/random/normalvariate Linked here; links to this page; shared tags: #random, #stdlib
- tuts/python3/stdlib_module/random/betavariate Linked here; shared tags: #random, #stdlib
- tuts/python3/stdlib_module/random/binomialvariate Linked here; shared tags: #random, #stdlib
- tuts/python3/stdlib_module/random/choice Linked here; shared tags: #random, #stdlib
- tuts/python3/stdlib_module/random/choices Linked here; shared tags: #random, #stdlib
- tuts/python3/stdlib_module/random/random Linked here; shared tags: #random, #stdlib
- tuts/python3/stdlib_module/random links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/random/expovariate shared tags: #random, #stdlib
- tuts/python3/stdlib_module/random/gammavariate shared tags: #random, #stdlib