Saturday, February 7, 2026
HomeLanguagessympy.stats.Maxwell() in python

sympy.stats.Maxwell() in python

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

Syntax : sympy.stats.Maxwell(name, a)
Where, a is real number and a > 0.
Return : Return the continuous random variable.

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




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


Output :

2
-z
—-
2
___ 2 2*a
\/ 2 *z *e
————–
____ 3
\/ pi *a

Example #2 :




# Import sympy and Maxwell
from sympy.stats import Maxwell, density
from sympy import Symbol, pprint
  
z = 1.2
a = 3
  
# Using sympy.stats.Maxwell() method
X = Maxwell("x", a)
gfg = density(X)(z)
  
pprint(gfg)


Output :

0.0492328718072872*\/ 2
————————
____
\/ pi

Dominic
Dominichttp://wardslaus.com
infosec,malicious & dos attacks generator, boot rom exploit philanthropist , wild hacker , game developer,
RELATED ARTICLES

Most Popular

Dominic
32491 POSTS0 COMMENTS
Milvus
126 POSTS0 COMMENTS
Nango Kala
6862 POSTS0 COMMENTS
Nicole Veronica
11987 POSTS0 COMMENTS
Nokonwaba Nkukhwana
12075 POSTS0 COMMENTS
Shaida Kate Naidoo
6995 POSTS0 COMMENTS
Ted Musemwa
7237 POSTS0 COMMENTS
Thapelo Manthata
6947 POSTS0 COMMENTS
Umr Jansen
6933 POSTS0 COMMENTS