Friday, May 15, 2026
HomeLanguagessympy.stats.MultivariateT() function in Python

sympy.stats.MultivariateT() function in Python

With the help of sympy.stats.MultivariateT() method, we can create a joint random variable with multivariate T-distribution.

Syntax: sympy.stats.MultivariateT(syms, mu, sigma, v)

Parameters:
 syms: the symbol for identifying the random variable
 mu: a matrix representing the location vector
 sigma: The shape matrix for the distribution
 v: a real number

Returns: a joint random variable with multivariate T-distribution.

Example #1 :

Python3




# import sympy, MultivariateT, density, Symbol
from sympy.stats import density, MultivariateT
from sympy import Symbol, pprint
  
x = Symbol("x")
  
# using sympy.stats.MultivariateT() method
X = MultivariateT("x", [1, 1], [[1, 0], [0, 1]], 2)
multiVar = density(X)(1, 2)
  
pprint(multiVar)


Output :

 2  
----
9*pi

Example #2 :

Python3




# import sympy, MultivariateT, density, Symbol
from sympy.stats import density, MultivariateT
from sympy import Symbol, pprint
  
x = Symbol("x")
  
# using sympy.stats.MultivariateT() method
X = MultivariateT("x", [1, 1, 1], [[1, 0, 1], [0, 1, 0], [0, 0, 1]], 1 / 2)
multiVar = density(X)(1, 2, 3)
  
pprint(multiVar)


Output :

  4 ____   ___           
2*\/ 11 *\/ 2 *Gamma(7/4)
-------------------------
         3/2             
   121*pi   *Gamma(1/4)  
Dominic
Dominichttp://wardslaus.com
infosec,malicious & dos attacks generator, boot rom exploit philanthropist , wild hacker , game developer,
RELATED ARTICLES

Most Popular

Dominic
32514 POSTS0 COMMENTS
Milvus
131 POSTS0 COMMENTS
Nango Kala
6892 POSTS0 COMMENTS
Nicole Veronica
12012 POSTS0 COMMENTS
Nokonwaba Nkukhwana
12107 POSTS0 COMMENTS
Shaida Kate Naidoo
7016 POSTS0 COMMENTS
Ted Musemwa
7262 POSTS0 COMMENTS
Thapelo Manthata
6975 POSTS0 COMMENTS
Umr Jansen
6963 POSTS0 COMMENTS