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 JointRVfrom sympy.stats import JointRV, densityfrom sympy import Symbol, pprint  z = Symbol("z")pdf = 2 * pi * z  # Using sympy.stats.JointRV() methodX = JointRV("x", pdf)gfg = density(X)  pprint(gfg)

Output :

Example #2 :

 # Import sympy and JointRVfrom sympy.stats import JointRV, densityfrom sympy import Symbol, pprint  z = 3pdf = 2 * pi * z  # Using sympy.stats.JointRV() methodX = 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