sciPy stats.alpha () | python

NumPy | Python Methods and Functions

scipy.stats.alpha () — it is an alpha continuous random variable that is defined by a standard format and some form 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: Create an alpha continuous random variable random variable

# Python code for demonstration scipy.alpha ()

from scipy.stats import alpha

 
# using the alpha () method

numargs = alpha.numargs

[a] = [ 0.6 ,] * numargs

rv = alpha (a)

Code # 2:

# Python code to demonstrate scipy.alpha ( )

import numpy as np

import matplotlib.pyplot as plt

 
# getting distribution using linspace ()

distribution = np.linspace ( 0 , np.minimum (rv.dist. b, 3 ))

plot = plt.plot (distribution, r v.pdf (distribution))

Output:





Get Solution for free from DataCamp guru