Sympy stats.GeneralizedMultivariateLogGamma() in Python
Last Updated :
08 Jun, 2020
With the help of sympy.stats.GeneralizedMultivariateLogGamma()
method, we can get the continuous joint random variable which represents the Generalized Multivariate Log Gamma distribution.
Syntax : GeneralizedMultivariateLogGamma(syms, delta, v, lamda, mu)
Parameters :
1) Syms – list of symbols
2) Delta – a constant in range [0, 1]
3) V – positive real number
4) Lambda – a list of positive reals
5) mu – a list of positive real numbers.
Return : Return the continuous joint random variable.
Example #1 :
In this example we can see that by using sympy.stats.GeneralizedMultivariateLogGamma()
method, we are able to get the continuous joint random variable representing Generalized Multivariate Log Gamma distribution by using this method.
from sympy.stats import density
from sympy.stats.joint_rv_types import GeneralizedMultivariateLogGamma
from sympy.stats.joint_rv import marginal_distribution
from sympy import symbols, S
v = 1
l, mu = [ 1 , 1 , 1 ], [ 1 , 1 , 1 ]
d = S.Half
y = symbols( 'y_1:4' , positive = True )
Gd = GeneralizedMultivariateLogGamma( 'G' , d, v, l, mu)
gfg = density(Gd)(y[ 0 ], y[ 1 ], y[ 2 ])
pprint(gfg)
|
Output :
oo
_____
\ `
\ y_1 y_2 y_3
\ -n (n + 1)*(y_1 + y_2 + y_3) - e - e - e
\ 2 *e
/ ---------------------------------------------------
/ 3
/ Gamma (n + 1)
/____,
n = 0
----------------------------------------------------------
2
Example #2 :
from sympy.stats import density
from sympy.stats.joint_rv_types import GeneralizedMultivariateLogGamma
from sympy.stats.joint_rv import marginal_distribution
from sympy import symbols, S
v = 1
l, mu = [ 1 , 2 , 3 ], [ 2 , 5 , 1 ]
d = S.One
y = symbols( 'y_1:4' , positive = True )
Gd = GeneralizedMultivariateLogGamma( 'G' , d, v, l, mu)
gfg = density(Gd)(y[ 0 ], y[ 1 ], y[ 2 ])
pprint(gfg)
|
Output :
oo
______
\ `
\ 5*y_2 y_3
\ 2*y_1 e e
\ (n + 1)*(2*y_1 + 5*y_2 + y_3) - e - ------ - ----
\ n -n - 1 2 3
/ 10*0 *6 *e
/ ---------------------------------------------------------------------
/ 3
/ Gamma (n + 1)
/_____,
n = 0
Like Article
Suggest improvement
Share your thoughts in the comments
Please Login to comment...