Multivariate Distributions
Overview
Multivariate distributions describe the joint behavior of two or more random variables. They are essential for modeling systems where variables are correlated, such as asset returns in a portfolio, dimensions of a manufactured part, or ecological populations.
Common Distributions
- MULTIVARIATE_NORMAL: Multivariate Normal distribution. The generalization of the 1D normal to k dimensions. Defined by a mean vector \mu and a covariance matrix \Sigma.
- MULTINOMIAL: Multinomial distribution. Generalization of the Binomial. Models the counts of outcomes in k categories after n trials (e.g., rolling a die 10 times and counting 1s, 2s, …, 6s).
- DIRICHLET: Dirichlet distribution. A distribution over probability vectors (vectors that sum to 1). Often used as a prior in Bayesian statistics (e.g., Latent Dirichlet Allocation for topic modeling).
- WISHART: Wishart distribution. The distribution of the covariance matrix of samples from a multivariate normal distribution. Used in multivariate analysis and Bayesian inference.
Specialized Matrix Distributions
- MATRIX_NORMAL: Distribution for random matrices, distinct from the multivariate normal (which is for random vectors).
- INVWISHART: Inverse Wishart. The conjugate prior for the covariance matrix of a multivariate normal.
- ORTHO_GROUP and SPECIAL_ORTHO_GROUP: Distributions over orthogonal matrices (rotations/reflections). Important in physics and robotics.
Native Excel Capabilities
Excel is completely void of multivariate distribution support: - No Multivariate Normal: Calculating the PDF of a multivariate normal requires matrix inversion and determinant calculations, which are extremely painful in standard Excel grids. - No Random Generation: There is no function to generate correlated random variables (e.g., Cholesky decomposition method) without writing VBA or using complex array formulas. - No Dirichlet/Wishart: Advanced Bayesian priors are non-existent.
The functions here allow you to work with these complex high-dimensional objects simply by passing range references for Mean vectors and Covariance matrices.
Tools
| Tool | Description |
|---|---|
| DIRICHLET | Computes the PDF, log-PDF, mean, variance, covariance, entropy, or draws random samples from a Dirichlet distribution. |
| DIRICHLET_MULTINOM | Computes the probability mass function, log probability mass function, mean, variance, or covariance of the Dirichlet multinomial distribution. |
| MATRIX_NORMAL | Computes the PDF, log-PDF, or draws random samples from a matrix normal distribution. |
| MULTINOMIAL | Compute the probability mass function, log-PMF, entropy, covariance, or draw random samples from a multinomial distribution. |
| MULTIVARIATE_NORMAL | Computes the PDF, CDF, log-PDF, log-CDF, entropy, or draws random samples from a multivariate normal distribution. |
| MULTIVARIATE_T | Computes the PDF, CDF, or draws random samples from a multivariate t-distribution. |
| MV_HYPERGEOM | Computes probability mass function, log-PMF, mean, variance, covariance, or draws random samples from a multivariate hypergeometric distribution. |
| ORTHO_GROUP | Draws random samples of orthogonal matrices from the O(N) Haar distribution using scipy.stats.ortho_group. |
| RANDOM_CORRELATION | Generates a random correlation matrix with specified eigenvalues. |
| SPECIAL_ORTHO_GROUP | Draws random samples from the special orthogonal group SO(N), returning orthogonal matrices with determinant +1. |
| UNIFORM_DIRECTION | Draws random unit vectors uniformly distributed on the surface of a hypersphere in the specified dimension. |
| UNITARY_GROUP | Generate a random unitary matrix of dimension N from the Haar distribution. |
| VONMISES_FISHER | Computes the PDF, log-PDF, entropy, or draws random samples from a von Mises-Fisher distribution on the unit hypersphere. |
| WISHART | Computes the PDF, log-PDF, or draws random samples from the Wishart distribution using scipy.stats.wishart. |