sympy.stats.Geometric() in Python Last Updated : 08 Jun, 2020 Summarize Comments Improve Suggest changes Share Like Article Like Report With the help of sympy.stats.Geometric() method, we can get a random variable which denotes the geometric distribution. Syntax : sympy.stats.Geometric(name, P) Where, P stands for probability Return : Return the random variable of geometric distribution. Example #1 : In this example we can see that by using sympy.stats.Geometric() method, we are able to get the random variable which denotes the geometric distribution by using this method. Python3 1=1 # Import sympy and geometric from sympy.stats import Geometric, density, E, variance from sympy import Symbol, S p = S.One / 5 # Using sympy.stats.Geometric() method X = Geometric("x", p) gfg = density(X)(z) print(variance(X)) Output : 20 Example #2 : Python3 1=1 # Import sympy and geometric from sympy.stats import Geometric, density, E, variance from sympy import Symbol, S # Using sympy.stats.Geometric() method X = Geometric("x", 0.4) gfg = density(X)(z) print(variance(X)) Output : 3.75000000000000 Comment More infoAdvertise with us Next Article sympy.stats.Geometric() in Python J jitender_1998 Follow Improve Article Tags : Python SymPy Python SymPy-Stats Practice Tags : python Similar Reads sympy.stats.Dagum() in python With the help of sympy.stats.Dagum() method, we can get the continuous random variable representing the dagum distribution. Syntax : sympy.stats.Dagum(name, p, a, b) Where, p, a and b are real number greater than 0. Return : Return continuous random variable. Example #1 : In this example we can see 2 min read sympy.stats.Die() function in Python With the help of sympy.stats.Die() method, we can get the fair die having number of faces given by the parameter and having name defined in the parameter itself by using sympy.stats.Die() method. Syntax : sympy.stats.Die(name, faces) Return : Return a fair die having 'n' faces. Example #1 : In this 1 min read sympy.stats.PowerFunction() in Python With the help of sympy.stats.PowerFunction() method, we can get the continuous random variable which represents the Power Function distribution. Syntax : sympy.stats.PowerFunction(name, alpha, a, b) Where, a, b and alpha are real number. Return : Return the continuous random variable. Example #1 : I 1 min read sympy.stats.ExGaussian() in python With the help of sympy.stats.ExGaussian() method, we can get the continuous random variable representing the exponentially modified gaussian distribution. Syntax : sympy.stats.ExGaussian(name, mean, std, rate) Return : Return continuous random variable. Example #1 : In this example we can see that b 2 min read sympy.stats.Logistic() in python With the help of sympy.stats.Logistic() method, we can get the continuous random variable which represents the logistic distribution. Syntax : sympy.stats.Logistic(name, mu, s) Where, mu and s are real number and mu, s > 0. Return : Return the continuous random variable. Example #1 : In this exam 1 min read Like