Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

Sympy stats.JointRV() in Python

  • Last Updated : 08 Jun, 2020

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

Syntax : sympy.stats.JointRV(name, pdf)
Return : Return the continuous joint random variable.

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




# Import sympy and JointRV
from sympy.stats import JointRV, density
from sympy import Symbol, pprint
  
z = Symbol("z")
pdf = 2 * pi * z
  
# Using sympy.stats.JointRV() method
X = JointRV("x", pdf)
gfg = density(X)
  
pprint(gfg)

Output :

JointDistributionHandmade(Lambda((), 2*pi*z), FiniteSet(()))

Example #2 :




# Import sympy and JointRV
from sympy.stats import JointRV, density
from sympy import Symbol, pprint
  
z = 3
pdf = 2 * pi * z
  
# Using sympy.stats.JointRV() method
X = JointRV("x", pdf)
gfg = density(X)
  
pprint(gfg)

Output :

6*pi

 Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.  

To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course. And to begin with your Machine Learning Journey, join the Machine Learning - Basic Level Course


My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!