LoginSignup
0
0

More than 5 years have passed since last update.

【python】レイリー分布に従う乱数を生成する

Last updated at Posted at 2017-04-26

分布のピークがpeakになるレイリー分布に従う乱数を生成するには,

import random
random.weibullvariate(peak,2)

が使いやすいです.

numpyでnp.random.weibullを使うときは,
randomとは微妙にパラメータが異なるみたいなので要注意です.

参考:
https://en.wikipedia.org/wiki/Rayleigh_distribution
https://docs.python.org/2/library/random.html
https://docs.scipy.org/doc/numpy/reference/generated/numpy.random.weibull.html

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0