Mean and Covariance Matrix of a Multivariate Normal Distribution with One Doubly-Truncated Component
Total Page:16
File Type:pdf, Size:1020Kb
Technical report from Automatic Control at Linköpings universitet Mean and covariance matrix of a multivariate normal distribution with one doubly-truncated component Henri Nurminen, Rafael Rui, Tohid Ardeshiri, Alexandre Bazanella, Fredrik Gustafsson Division of Automatic Control E-mail: [email protected], [email protected], [email protected], [email protected], [email protected] 7th July 2016 Report no.: LiTH-ISY-R-3092 Address: Department of Electrical Engineering Linköpings universitet SE-581 83 Linköping, Sweden WWW: http://www.control.isy.liu.se AUTOMATIC CONTROL REGLERTEKNIK LINKÖPINGS UNIVERSITET Technical reports from the Automatic Control group in Linköping are available from http://www.control.isy.liu.se/publications. Abstract This technical report gives analytical formulas for the mean and covariance matrix of a multivariate normal distribution with one component truncated from both below and above. Keywords: doubly-truncated multivariate normal distribution, mean, co- variance matrix Mean and covariance matrix of a multivariate normal distribution with one doubly-truncated component Henri Nurminen,∗ Rafael Rui,y Tohid Ardeshiri, Alexandre Bazanella,y and Fredrik Gustafsson 2016-09-02 Abstract This technical report gives analytical formulas for the mean and co- variance matrix of a multivariate normal distribution with one component truncated from both below and above. The result is used in the compu- tation of the moments of a mixture of such distributions in [1]. 1 Introduction In this technical report doubly-truncated multivariate normal distribution (DTMND) is a multivariate normal distribution, where one component is truncated from both below and above. In this report we present and derive the analytical for- mulas for the mean and covariance matrix of a DTMND. The formulas are used in [1], where the piecewise ane dynamical model results in the posterior dis- tribution being a mixture of DTMNDs. Computing the moments of a mixture of DTMNDs is straightforward given the moments of the mixture components. Without loss of generality, we assume that the double truncation is applied to the rst component of the random vector. For numerical methods, evaluating the presented formulas requires evaluation of the Cholesky decomposition [2, Ch. 2.2.2] as well as the probability density function (PDF) and cumulative density function (CDF) of the univariate standard normal distribution. Notations: The functions φ and Φ are the PDF and the CDF of the uni- variate standard normal distribution, and the notation [a]i denotes the ith com- ponent of the vector a and the notation [A](i;j) denotes the element (i; j) of the matrix A. Ip is the p × p identity matrix, 0p the p-dimensional column vector ∗H. Nurminen is with the Department of Automation Science and Engineering, Tam- pere University of Technology (TUT), PO Box 692, 33101 Tampere, Finland (e-mail: henri.nurminen@tut.). H. Nurminen receives funding from TUT Graduate School, the Foun- dation of Nokia Corporation, and Tekniikan edistämissäätiö. yR. Rui and A. Bazanella are with Department of Electrical Engineering, Universi- dade Federal do Rio Grande do Sul, Porto Alegre 90040-060, Brazil (email: rafael.rui, [email protected]) and are supported by Conselho Nacional de Desenvolvimento Cientíco e Tecnològico (CNPq). 1 of zeros, and 1A(x) the indicator function 1; x 2 A 1 (x) = : A 0; x 2= A 2 Formulas for mean and covariance matrix Let x 2 Rn be a random variable of the DTMND with the PDF (1) p(x) /N (x; µ; Σ) · 1[l1;l2]([x]1); where µ 2 Rn is the location parameter vector, Σ 2 Rn×n is the positive denite squared-scale matrix, and are the truncation limits. Further, let l1; l2 2 R Λ be the lower triangular matrix for which Σ = ΛΛT and whose diagonal entries are strictly positive. This type of square-root matrix can be obtained using the Cholesky decomposition [2, Ch. 2.2.2]. Then, the expectation value and covariance matrix of x are ∗ m (2) E[x] = Λ + µ 0n−1 ∗ T s 0 T V[x] = Λ n−1 Λ (3) 0n−1 In−1 where φ(λ ) − φ(λ ) m∗ = 1 2 ; (4) Z λ φ(λ ) − λ φ(λ ) s∗ = 1 + 1 1 2 2 − (m∗)2; (5) Z with l1 − [µ]1 l2 − [µ]1 λ1 = ; λ2 = ; Z = Φ(λ2) − Φ(λ1): [Λ](1;1) [Λ](1;1) 3 Derivation Let y 2 Rn be a DTMND with the PDF py(y) /N (y; 0;In) · 1[λ1,λ2]([y]1): The components of y are independent, so the moments of y are obtained using the formula for the doubly-truncated univariate normal random variable [3, Ch. 10.1]. The mean and the covariance matrix are thus ∗ m (6) E[y] = ; 0n−1 s∗ 0T V[y] = n−1 ; (7) 0n−1 In−1 where m∗ and s∗ are those in (4) and (5). Let now z = Λy + µ. The PDF of z is then −1 dy (8) pz(z) = py(Λ (z − µ)) · det dz : 2 h i As Λ is a lower triangular matrix, [Λ−1] = 1 0T , so (1;1:n) [Λ](1;1) n−1 [y]1 = ([z]1 − [µ]1)=[Λ](1;1). Thus, (8) becomes −1 [z]1 − [µ]1 −1 (9) pz(z) /N (Λ (z − µ); 0;I) · 1[λ1,λ2] · det(Λ) [Λ](1;1) (10) = N (z; µ; Σ) · 1[l1;l2] ([z]1) ; T because ΛΛ = Σ, li = [Λ](1;1)λi + [µ]1 for i 2 f1; 2g and [Λ](1;1) is positive. That is, z has the same distribution as x, so the expected value and covariance matrix of x are (11) E[x] = E[z] = Λ E[y] + µ T V[x] = V[z] = ΛV[y]Λ : (12) By substituting (6) and (7) to (11) and (12), respectively, we get the formulas (2) and (3). References [1] R. Rui, T. Ardeshiri, H. Nurminen, A. Bazanella, and F. Gustafsson, State estimation for piecewise ane state-space models, 2016. [Online]. Available: http://arxiv.org/abs/1609.00365v1 [2] Å. Björck, Numerical Methods for Least Squares Problems. SIAM, 1996. [3] N. L. Johnson, S. Kotz, and N. Balakrishnan, Continuous Univariate Dis- tributions, Vol. 1, 2nd ed. John Wiley & Sons, Inc., November 1994. 3 Avdelning, Institution Datum Division, Department Date Division of Automatic Control 2016-07-07 Department of Electrical Engineering Språk Rapporttyp ISBN Language Report category Svenska/Swedish Licentiatavhandling ISRN Engelska/English Examensarbete C-uppsats Serietitel och serienummer ISSN D-uppsats Title of series, numbering 1400-3902 Övrig rapport URL för elektronisk version LiTH-ISY-R-3092 http://www.control.isy.liu.se Titel Mean and covariance matrix of a multivariate normal distribution with one doubly-truncated Title component Författare Henri Nurminen, Rafael Rui, Tohid Ardeshiri, Alexandre Bazanella, Fredrik Gustafsson Author Sammanfattning Abstract This technical report gives analytical formulas for the mean and covariance matrix of a multivariate normal distribution with one component truncated from both below and above. Nyckelord Keywords doubly-truncated multivariate normal distribution, mean, covariance matrix.