[Python] Generate random numbers that follow the Rayleigh distribution

To generate random numbers that follow the Rayleigh distribution with peaks in the distribution

import random random.weibullvariate(peak,2)

Is easy to use.

When using np.random.weibull with numpy It seems that the parameters are slightly different from random, so be careful.

reference: 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

Recommended Posts

[Python] Generate random numbers that follow the Rayleigh distribution
Generate U distribution in Python
[Golang] A program that determines the turn with random numbers
Testing with random numbers in Python
[Python] Change the alphabet to numbers
[C language] I want to generate random numbers in the specified range
[Python] Note: A self-made function that finds the area of the normal distribution
Python3 + pyperclip that rewrites the copied text
[Python] A program that rounds the score
Probability distribution followed by differences between independent random variables that follow a Poisson distribution
Test whether the observed data follow the Poisson distribution (Test of the goodness of fit of the Poisson distribution by Python)
[Python] A program that calculates the difference between the total numbers on the diagonal line.
Generate the Look-and-say Sequence featured in QuizKnock in Python
Generate two correlated pseudo-random numbers (with Python sample)
Match the distribution of each group in Python
Testing methods that return random values in Python
The one that displays the progress bar in Python
Generate n correlated pseudo-random numbers (with Python sample)