sympy.stats.Die() function in Python Last Updated : 01 Jun, 2020 Comments Improve Suggest changes Like Article Like Report 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 example, we can see that by using sympy.stats.Die() method, we are able to get the fair die having 'n' faces passed as a parameter by using this method. Python3 1=1 # Import sympy and Die from sympy.stats import Die, density X = Die('X', 12) # Using sympy.Die() method gfg = density(X).dict print(gfg) Output : {1: 1/12, 2: 1/12, 3: 1/12, 4: 1/12, 5: 1/12, 6: 1/12, 7: 1/12, 8: 1/12, 9: 1/12, 10: 1/12, 11: 1/12, 12: 1/12} Example #2 : Python3 1=1 # Import sympy and Die from sympy.stats import Die, density X = Die('X', 3) # Using sympy.Die() method gfg = density(X).dict print(gfg) Output : {1: 1/3, 2: 1/3, 3: 1/3} Comment More infoAdvertise with us Next Article sympy.stats.Die() function in Python J jitender_1998 Follow Improve Article Tags : Python Python SymPy-Stats Practice Tags : python Similar Reads sympy.stats.FiniteRV() function in Python With the help of sympy.stats.FiniteRV() method, we can create a random variable gives a dictionary of density by using sympy.stats.FiniteRV() method. Syntax : sympy.stats.FiniteRV(name, dict) Return : Return the variable having dictionary of density. Example #1 : In this example, we can see that by 1 min read sympy.stats.Binomial() function in Python With the help of sympy.stats.Binomial() method, we can create a Finite Random Variable representing a binomial distribution. A binomial distribution is the probability of a SUCCESS or FAILURE outcome in an experiment or survey that is repeated multiple times. Syntax: sympy.stats.Binomial(name, n, p 1 min read sympy.stats.Gamma() function in Python 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: 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.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 Like