With the help of sympy.stats.WignerSemicircle()
method, we can get the continuous random variable which represents the Wigner Semicircle distribution.
Syntax :
sympy.stats.WignerSemicircle(name, R)
Where, R is real number.
Return : Return the continuous random variable.
Example #1 :
In this example we can see that by using sympy.stats.WignerSemicircle()
method, we are able to get the continuous random variable representing Wigner Semicircle distribution by using this method.
# Import sympy and WignerSemicircle from sympy.stats import WignerSemicircle, density from sympy import Symbol, pprint z = Symbol( "z" ) r = Symbol( "r" , positive = True ) # Using sympy.stats.WignerSemicircle() method X = WignerSemicircle( "x" , r) gfg = density(X)(z) pprint(gfg) |
Output :
_________
/ 2 2
2*\/ r – z
————–
2
pi*r
Example #2 :
# Import sympy and WignerSemicircle from sympy.stats import WignerSemicircle, density from sympy import Symbol, pprint z = 0.87 r = 2 # Using sympy.stats.WignerSemicircle() method X = WignerSemicircle( "x" , r) gfg = density(X)(z) pprint(gfg) |
Output :
0.900430452616969
—————–
pi