Open In App

Sympy stats.VonMises() in Python

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

With the help of sympy.stats.VonMises() method, we can get the continuous random variable which represents the Von Mises distribution.

Syntax : sympy.stats.VonMises(name, mu, k)
Where, mu and k are real number.
Return : Return the continuous random variable.

Example #1 :
In this example we can see that by using sympy.stats.VonMises() method, we are able to get the continuous random variable representing Von Mises distribution by using this method.




# Import sympy and VonMises
from sympy.stats import VonMises, density
from sympy import Symbol, pprint
  
z = Symbol("z")
mu = Symbol("mu", positive = True)
k = Symbol("k", positive = True)
  
# Using sympy.stats.VonMises() method
X = VonMises("x", mu, k)
gfg = density(X)(z)
  
pprint(gfg)


Output :

k*cos(mu – z)
e
——————
2*pi*besseli(0, k)

Example #2 :




# Import sympy and VonMises
from sympy.stats import VonMises, density
from sympy import Symbol, pprint
  
z = 0.78
mu = 1.23
k = 4
  
# Using sympy.stats.VonMises() method
X = VonMises("x", mu, k)
gfg = density(X)(z)
  
pprint(gfg)


Output :

18.3318728167628
—————-
pi*besseli(0, 4)



Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads