sympy.stats.ChiNoncentral() in Python
Last Updated :
08 Jun, 2020
With the help of sympy.stats.ChiNoncentral()
method, we can get the continuous random variable which represents the non-central chi distribution.
Syntax : sympy.stats.ChiNoncentral(name, k, l)
Where, k and l is number of degree of freedom.
Return : Return the continuous random variable.
Example #1 :
In this example we can see that by using sympy.stats.ChiNoncentral()
method, we are able to get the continuous random variable representing the non-central chi distribution by using this method.
from sympy.stats import ChiNoncentral, density, E
from sympy import Symbol, simplify
k = Symbol( "k" , integer = True )
l = Symbol( "l" , integer = True )
z = Symbol( "z" )
X = ChiNoncentral( "x" , k, l)
gfg = density(X)(z)
pprint(gfg)
|
Output :
2 2
-k l z
— – — – —
k 2 2 2 /k \
l*z *(l*z) *e *besseli|- – 1, l*z|
\2 /
Example #2 :
from sympy.stats import ChiNoncentral, density, E
from sympy import Symbol, simplify
k = 5
l = 6
z = 0.2
X = ChiNoncentral( "x" , k, l)
gfg = density(X)(z)
print (gfg)
|
Output :
1.81702770690497e-11*besseli(3/2, 1.2)
Like Article
Suggest improvement
Share your thoughts in the comments
Please Login to comment...