Thursday, December 26, 2024
Google search engine
HomeLanguagessympy.stats.Frechet() in python

sympy.stats.Frechet() in python

With the help of sympy.stats.Frechet() method, we can get the continuous random variable representing the frechet distribution.

Syntax : sympy.stats.Frechet(name, a, s=1, m=0)
Where, a, s and m denotes the real number.
Return : Return continuous random variable.

Example #1 :
In this example we can see that by using sympy.stats.Frechet() method, we are able to get the continuous random variable which represents the Frechet distribution by using this method.




# Import sympy and Frechet
from sympy.stats import Frechet, density
from sympy import Symbol
  
a = Symbol("a", integer = True, positive = True)
s = Symbol("s", integer = True, positive = True)
m = Symbol("m", integer = True, positive = True)
z = Symbol("z")
  
# Using sympy.stats.Frechet() method
X = Frechet("x", a, s, m)
gfg = density(X)(z)
  
pprint(gfg)


Output :

-a
/-m + z\
-a – 1 -|——|
/-m + z\ \ s /
a*|——| *e
\ s /
—————————–
s

Example #2 :




# Import sympy and Frechet
from sympy.stats import Frechet, density
from sympy import Symbol
  
a = 3
s = 1
m = -2
z = Symbol("z")
  
# Using sympy.stats.Frechet() method
X = Frechet("x", a, s, m)
gfg = density(X)(z)
  
pprint(gfg)


Output :

-1
——–
3
(z + 2)
3*e
———–
4
(z + 2)

Dominic Rubhabha-Wardslaus
Dominic Rubhabha-Wardslaushttp://wardslaus.com
infosec,malicious & dos attacks generator, boot rom exploit philanthropist , wild hacker , game developer,
RELATED ARTICLES

Most Popular

Recent Comments