sympy.stats.Rayleigh() in Python

With the help of sympy.stats.Rayleigh() method, we can get the continuous random variable which represents the rayleigh distribution.
Syntax :
sympy.stats.Rayleigh(name, sigma)
Where, sigma are real number and sigma > 0.Return : Return the continuous random variable.
Example #1 :
In this example we can see that by using sympy.stats.Rayleigh() method, we are able to get the continuous random variable representing rayleigh distribution by using this method.
| # Import sympy and Rayleigh fromsympy.stats importRayleigh, density fromsympy importSymbol, pprint  z =Symbol("z") sigma =Symbol("sigma", positive =True)  # Using sympy.stats.Rayleigh() method X =Rayleigh("x", sigma) gfg =density(X)(z)  pprint(gfg)  | 
Output :
2
-z
——–
2
2*sigma
z*e
———–
2
sigma
Example #2 :
| # Import sympy and Rayleigh fromsympy.stats importRayleigh, density fromsympy importSymbol, pprint  z =0.35sigma =2 # Using sympy.stats.Rayleigh() method X =Rayleigh("x", sigma) gfg =density(X)(z)  pprint(gfg)  | 
Output :
0.0861703622690834
 
				 
					



