2

A covariance matrix of multivariate random variable can be constructed given a time-series random variables.

Eg. If you observe a student's performance in different objects (Math, English, Physics, etc) for a period of time; then you can construct the covariance matrix for those objects for that specific student.

However, the random variable can be statistical unstable. Hence, the covariance matrix must be updated each time a new value of randome variable is observed.

I'm looking for an efficient method/technique to update that covariance matrix.

Although just the name for the method is enough, if you have a link to a tutorial, lecture note or a paper on the topic, it will be much more helpful too.

Thanks,

PS: Please correct me if I use some terminologies incorrectly. (I'm not a mathematician or statistician).

whuber
  • 281,159
  • 54
  • 637
  • 1,101
chepukha
  • 273
  • 1
  • 3
  • 8
  • 2
    I'm pretty sure this question has been asked and answered here. Wikipedia gives the [formulas](http://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Covariance) – whuber Apr 09 '12 at 17:56
  • @whuber if it is the case that this question is a duplicate, please provide a link to the duplicate. If the relevant formulas are on Wikipedia, then formulate them into an answer so that it can preserved for future users here on SE. In fact, I think there is an error in the relevant section on Wikipedia. I'm trying to confirm this with a statistics expert, and once I have an answer, I'll try to post the correct formulas here. – robguinness Mar 05 '14 at 11:28
  • @robg I supply a general answer to the question of updating or combining moment estimates at http://stats.stackexchange.com/questions/51622/combining-two-covariance-matrices/51927#51927. – whuber Mar 05 '14 at 17:01

1 Answers1

2

I suggest you a very simple online update formulas:

At each time $t$ you provide me a point of a time series $x$ of size $N$, then

(1) $\hat\mu=\hat\mu+\frac{1}{1+t}(x-\hat\mu)$

(2) $\hat\Sigma=\frac{t}{1+t}\hat\Sigma+\frac{t}{(1+t)^2}(x-\hat\mu)^\prime (x-\hat\mu)$ See for instance this paper.

DanielTheRocketMan
  • 1,400
  • 11
  • 20