Friday, October 3, 2025
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
32331 POSTS0 COMMENTS
Milvus
85 POSTS0 COMMENTS
Nango Kala
6703 POSTS0 COMMENTS
Nicole Veronica
11868 POSTS0 COMMENTS
Nokonwaba Nkukhwana
11929 POSTS0 COMMENTS
Shaida Kate Naidoo
6818 POSTS0 COMMENTS
Ted Musemwa
7080 POSTS0 COMMENTS
Thapelo Manthata
6775 POSTS0 COMMENTS
Umr Jansen
6776 POSTS0 COMMENTS