Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Calculating covariance matrix

  1. Jan 10, 2012 #1
    So I need to calculate the square root of the covariance matrix [itex]\sqrt{\Sigma_tR\Sigma_t}[/itex] (the matrix square root, not the element-wise square root). [itex]\Sigma_t[/itex] is a diagonal matrix with the square root of the variance on the diagonal (these values are time dependent) and [itex]R[/itex] is the correlation between my variables (this is assumed to be independent of time). Here is an example:

    [itex]\sqrt{\left(\begin{array}{cc}\sigma_1 & 0 \\ 0 & \sigma_2\end{array}\right) \cdot \left(\begin{array}{cc}1 & \rho \\ \rho & 1 \end{array}\right) \cdot \left(\begin{array}{cc}\sigma_1 & 0 \\ 0 & \sigma_2\end{array}\right) } [/itex]

    Now the thing is, it is awfully slow to recalculate the square root of this matrix for every time step. Seeing as my correlation is constant I was thinking there might be a more computationally efficient method of calculating this root, but haven't been able to come up with anything. Does anyone have any suggestions?
  2. jcsd
  3. Jan 10, 2012 #2
  4. Jan 11, 2012 #3

    Stephen Tashi

    User Avatar
    Science Advisor

Share this great discussion with others via Reddit, Google+, Twitter, or Facebook