random.betavariate() method in Python
betavariate() is an inbuilt method of the
random module. It is used to return a random floating point number with beta distribution. The returned value is between 0 and 1.
Syntax : random.betavariate(alpha, beta)
alpha : greater than 0
beta : greater than 0
Returns : a random beta distribution floating number between 0 and 1
Example 2: We can generate the number multiple times and plot a graph to observe the beta distribution.
My Personal Notes arrow_drop_up
Please Login to comment...