With the help of
Python3 1=1
Output :
Python3 1=1
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 can see that by using sympy.stats.FDistribution() method, we are able to get the continuous random variable which represents the F distribution by using this method.
# Import sympy and FDistribution
from sympy.stats import FDistribution, 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.FDistribution() method
X = FDistribution("x", d1, d2)
gfg = density(X)(z)
pprint(gfg)
d2 -- ______________________________ 2 / d1 -d1 - d2 d2 *\/ (d1*z) *(d1*z + d2) -------------------------------------- /d1 d2\ z*B|--, --| \2 2 /Example #2 :
# Import sympy and FDistribution
from sympy.stats import FDistribution, density
from sympy import Symbol
d1 = 5
d2 = 6
z = 1
# Using sympy.stats.FDistribution() method
X = FDistribution("x", d1, d2)
gfg = density(X)(z)
pprint(gfg)
Output :
____ 5400*\/ 55 ----------------- 1771561*B(5/2, 3)