Efficiently updating a covariance matrix and its LDL decomposition
Abstract
Equations are presented which efficiently update or downdate the covariance matrix of a large number of m-dimensional observations. Updates and downdates to the covariance matrix, as well as mixed updates/downdates, are shown to be rank-k modifications, where k is the number of new observations added plus the number of old observations removed. As a result, the update and downdate equations decrease the required number of multiplications for a modification to ((k+1)m2) instead of ((n+k+1)m2) or ((n-k+1)m2), where n is the number of initial observations. Having the rank-k formulas for the updates also allows a number of other known identities to be applied, providing a way of applying updates and downdates directly to the inverse and decompositions of the covariance matrix. To illustrate, we provide an efficient algorithm for applying the rank-k update to the LDL decomposition of a covariance matrix.