sympy.stats.Gamma() function in Python Last Updated : 18 Aug, 2020 Summarize Comments Improve Suggest changes Share Like Article Like Report With the help of sympy.stats.Gamma() method, we can create a continuous random variable with a Gamma distribution. The density of the Gamma distribution is given by with x in [0, 1]. Syntax: sympy.stats.Gamma(name, k, theta) Parameters: k: real number, k>0 theta: real number, theta>0 Returns: a continuous random variable with a Gamma distribution. Example #1 : Python3 # import sympy, Gamma, density, Symbol, pprint from sympy.stats import Gamma, density from sympy import Symbol, pprint k = Symbol("k", positive = True) theta = Symbol("theta", positive = True) z = Symbol("z") # using sympy.stats.Gamma() method X = Gamma("x", k, theta) gamVar = density((X)(z)) pprint(gamVar) Output: -z ----- -k k - 1 theta theta *z *e --------------------- Gamma(k) Example #2 : Python3 # import sympy, Gamma, density, Symbol, pprint from sympy.stats import Gamma, density from sympy import Symbol, pprint z = Symbol("z") # using sympy.stats.Gamma() method X = Gamma("x", 1 / 3, 45) gamVar = density((X)(z)) pprint(gamVar) Output: -z --- 3 ____ 45 \/ 75 *e ------------------ 2/3 15*z *Gamma(1/3) Comment More infoAdvertise with us Next Article Wand gamma() function in Python R ravikishor Follow Improve Article Tags : Python SymPy Python SymPy-Stats Practice Tags : python Similar Reads sympy.stats.NormalGamma() function in Python With the help of sympy.stats.NormalGamma() method, we can create a bivariate joint random variable with multivariate Normal gamma distribution. Syntax: sympy.stats.NormalGamma(syms, mu, lamda, alpha, beta) Parameters: syms: the symbol, for identifying the random variable mu: a real number, the mean 1 min read Wand gamma() function in Python gamma() allows us to adjust the luminance of an image. Resulting pixels are defined as pixel^(1/gamma). The value of gamma is typically between 0.8 & 2.3 range, and value of 1.0 will not affect the resulting image. Parameters : Parameter Input Type Description adjustment_value numbers.Real value 1 min read sympy.stats.Nakagami() in python With the help of sympy.stats.Nakagami() method, we can get the continuous random variable which represents the nakagami distribution. Syntax : sympy.stats.Nakagami(name, mu, omega) Where, mu and omega are real number and mu > 1/2, omega > 0. Return : Return the continuous random variable. Exam 1 min read sympy.stats.Chi() in Python With the help of sympy.stats.Chi() method, we can get the continuous random variable which represents the chi distribution. Syntax : sympy.stats.Chi(name, k) Where, k is number of degree of freedom. Return : Return the continuous random variable. Example #1 : In this example we can see that by using 1 min read sympy.stats.FDistribution() in python With the help of sympy.stats.FDistribution() method, we can get the continuous random variable representing the F distribution. Syntax : sympy.stats.FDistribution(name, d1, d2) Where, d1 and d2 denotes the degree of freedom. Return : Return continuous random variable. Example #1 : In this example we 1 min read sympy.stats.MultivariateT() function in Python With the help of sympy.stats.MultivariateT() method, we can create a joint random variable with multivariate T-distribution. Syntax: sympy.stats.MultivariateT(syms, mu, sigma, v) Parameters: syms: the symbol for identifying the random variable mu: a matrix representing the location vector sigma: The 1 min read Like