sympy.stats.Logarithmic() in Python
Last Updated :
08 Jun, 2020
With the help of sympy.stats.Logarithmic()
method, we can get the random variable representing the logarithmic distribution.
Syntax : sympy.stats.Logarithmic(name, p)
Return : Return the random variable.
Example #1 :
In this example we can see that by using sympy.stats.Logarithmic()
method, we are able to get the random variable representing the logarithmic distribution by using this method.
from sympy.stats import Logarithmic, density, E, variance
from sympy import Symbol, S
p = S.One / 5
X = Logarithmic( "x" , p)
gfg = density(X)( 3 )
print (gfg)
|
Output :
-1/(375*log(4/5))
Example #2 :
from sympy.stats import Logarithmic, density, E, variance
from sympy import Symbol, S
p = 0.46
X = Logarithmic( "x" , p)
gfg = density(X)( 4 )
print (gfg)
|
Output :
0.0181660042052665
Like Article
Suggest improvement
Share your thoughts in the comments
Please Login to comment...