Open In App

sympy.stats.FisherZ() in python

Last Updated : 05 Jun, 2020
Improve
Improve
Like Article
Like
Save
Share
Report

With the help of sympy.stats.FisherZ() method, we can get the continuous random variable representing the Fisher’s Z distribution.

Syntax : sympy.stats.FisherZ(name, d1, d2)
Where, d1 and d2 denotes the degree of freedom.
Return : Return continuous random variable.

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




# Import sympy and FisherZ
from sympy.stats import FisherZ, density
from sympy import Symbol
  
d1 = Symbol("d1", integer = True, positive = True)
d2 = Symbol("d2", integer = True, positive = True)
z = Symbol("z")
  
# Using sympy.stats.FisherZ() method
X = FisherZ("x", d1, d2)
gfg = density(X)(z)
  
pprint(gfg)


Output :

d1 d2
d1 d2 – — – —
— — 2 2
2 2 / 2*z \ d1*z
2*d1 *d2 *\d1*e + d2/ *e
—————————————–
/d1 d2\
B|–, –|
\2 2 /

Example #2 :




# Import sympy and FisherZ
from sympy.stats import FisherZ, density
from sympy import Symbol
  
d1 = 2
d2 = 3
z = 0.5
  
# Using sympy.stats.FisherZ() method
X = FisherZ("x", d1, d2)
gfg = density(X)(z)
  
pprint(gfg)


Output :

___
0.236675344303001*\/ 3



Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads