• No results found

The multivariate t distribution

N/A
N/A
Protected

Academic year: 2022

Share "The multivariate t distribution"

Copied!
8
0
0

Loading.... (view fulltext now)

Full text

(1)

On Sampling from the Multivariate t Distribution

by Marius Hofert

AbstractThe multivariate normal and the multivariate t distributions belong to the most widely used multivariate distributions in statistics, quantitative risk management, and insurance. In contrast to the multivariate normal distribution, the parameterization of the multivariate t distribution does not correspond to its moments. This, paired with a non-standard implementation in the R package mvtnorm, provides traps for working with the multivariate t distribution. In this paper, common traps are clarified and corresponding recent changes to mvtnorm are presented.

Introduction

A supposedly simple task in statistics courses and related applications is to generate random variates from a multivariate t distribution in R. When teaching such courses, we found several fallacies one might encounter when sampling multivariate t distributions with the well-known R package mvtnorm;

seeGenz et al.(2013). These fallacies have recently led to improvements of the package (≥0.9-9996) which we present in this paper1. To put them in the correct context, we first address the multivariate normal distribution.

The multivariate normal distribution

The multivariate normal distribution can be defined in various ways, one is with its stochastic represen- tation

X=µ+AZ, (1)

where Z= (Z1, . . . , Zk)is a k-dimensional random vector with Zi, i∈ {1, . . . , k}, being independent standard normal random variables, A∈Rd×kis an(d, k)-matrix, and µRdis the mean vector. The covariance matrix of X isΣ=AA>and the distribution of X (that is, the d-dimensional multivariate normal distribution) is determined solely by the mean vector µ and the covariance matrixΣ; we can thus write X∼Nd(µ,Σ).

In what follows, we assume k= d. IfΣ is positive definite (thus has full rank and is therefore invertible), X has density

fX(x) = 1 ()d/2

detΣexp



1

2(xµ)>Σ−1(xµ)



, xRd.

Contours of equal density are ellipsoids; all so-called elliptical distributions which admit a density share this property.

A positive definite (semi-definite) matrixΣ∈Rd×dcan be written as

Σ=LL> (2)

for a lower triangular matrix L with Ljj >0 (Ljj≥0) for all j∈ {1, . . . , d}. L is known as the Cholesky factor of the Cholesky decomposition (2).

The stochastic representation (1), together with the Cholesky decomposition ofΣ, allows for a direct sampling strategy of multivariate normal distributions Nd(µ,Σ), which can easily be implemented in R as follows.

> ## Setup

> mu <- 1:2 # mean vector of X

> Sigma <- matrix(c(4, 2, 2, 3), ncol=2) # covariance matrix of X

> n <- 1000 # sample size

> d <- 2 # dimension

> ## Step 1: Compute the Cholesky factor of Sigma

> L <- t(chol(Sigma)) # t() as chol() returns an upper triangular matrix

> ## Step 2: Generate iid standard normal random variates

References

Related documents

Por Medidas (fig. 4), hay una mayor homogeneidad en las inversiones LEADER, por la exigencia de una mayor diversificación, mientras que en PRODER, aunque parte de los mis-

§ Our electrical signal operates below the action potential level of human body (and thus does not cause change in body physiological state). cause change in body

Privacy-specific information types (e.g., personal information, sensitive information, and other types of information that can have privacy impacts, such as communications

Moreover, Arg can assemble F-actin into tight bundles in vitro , an activity that requires both the C-terminal F-actin-binding domain and a previously uncharacterized internal

However our results demonstrate that the formation UDMH is unlikely to be the main reaction occurring during chloramination of ranitidine or other highly reactive tertiary amines

Striving towards continuous quality improvement in asset management strategy in EMSD, the GIS-based Remote Monitoring System was developed internally and

participants identified that they felt a sense of missing something in their lives after their respective parent had died. All of them recognized the gap in their lives that was once