sciPy stats.alpha() | Python
scipy.stats.alpha() is an alpha continuous random variable that is defined with a standard format and some shape parameters to complete its specification.
Parameters :
q : lower and upper tail probability
x : quantiles
a : shape parameter
loc : [optional] location parameter. Default = 0
scale : [optional] scale parameter. Default = 1
size : [tuple of ints, optional] shape or random variates.
moments : [optional] composed of letters [‘mvsk’]; ‘m’ = mean, ‘v’ = variance, ‘s’ = Fisher’s skew and ‘k’ = Fisher’s kurtosis. (default = ‘mv’).
Results : alpha continuous random variable
Code #1 : Creating alpha continuous random variable
from scipy.stats import alpha
numargs = alpha.numargs
[ a ] = [ 0.6 , ] * numargs
rv = alpha(a)
|
Code #2 :
import numpy as np
import matplotlib.pyplot as plt
distribution = np.linspace( 0 , np.minimum(rv.dist.b, 3 ))
plot = plt.plot(distribution, rv.pdf(distribution))
|
Output :
Last Updated :
14 Mar, 2019
Like Article
Save Article
Share your thoughts in the comments
Please Login to comment...