Approximate new acorrelation given previous acorrelation and a new set of data?

In summary, the conversation discusses the autocorrelation coefficient and how to approximate it without starting from scratch. It suggests multiplying out the terms and summing them separately, and finally rewriting all the terms with ##\bar x##. The process involves translating it into code, testing it, and rewriting it to catch any mistakes.
  • #1
member 428835
Hi PF!

The autocorrelation coefficient ##\rho## is defined as $$\rho_k \equiv \frac{\sum_{t=k+1}^T (x_t - \bar x)(x_{t-k} - \bar x)}{\sum_{t=1}^T(x_t-\bar x)^2}$$

Now suppose we calculate ##\rho## through ##T##, but are then given a new data at time ##T + \Delta t##. Is there a way to approximate the new autocorrelation without recalculating from scratch? Obviously if we use the definition we'd have to recalculate the mean ##\bar x## and therefore the entire computation.
 
Mathematics news on Phys.org
  • #2
joshmccraney said:
Is there a way to approximate the new autocorrelation without recalculating from scratch?
Yes, can you multiply out the terms in ## (x_t - \bar x)(x_{t-k} - \bar x) ## and ## (x_t-\bar x)^2 ##?
 
  • #3
pbuk said:
Yes, can you multiply out the terms in ## (x_t - \bar x)(x_{t-k} - \bar x) ## and ## (x_t-\bar x)^2 ##?
##\bar x^2 - \bar x x_{t-k}- \bar x x_{t} + x_t x_{t-k}## and ##\bar x^2 -2 \bar x x_{t} + x_t ^2##
 
  • #4
joshmccraney said:
##\bar x^2 - \bar x x_{t-k}- \bar x x_{t} + x_t x_{t-k}## and ##\bar x^2 -2 \bar x x_{t} + x_t ^2##
Excellent, now you can sum over the terms separately:
$$ \rho_k \approx \frac{
\sum_{t=k+1}^T \bar x^2
- \sum_{t=k+1}^T \bar x x_{t-k}
- \sum_{t=k+1}^T \bar x x_{t}
+ \sum_{t=k+1}^T + x_t x_{t-k}
}{
\sum_{t=1}^T \bar x^2
- 2 \sum_{t=1}^T \bar x x_{t}
+ \sum_{t=1}^T x_t^2
} $$
and finally rewrite all the ## \bar x ## terms e.g.
$$ \sum_{t=k+1}^T \bar x x_{t-k} = \bar x \sum_{t=k+1}^T x_{t-k} = \frac 1 T \sum_{t=1}^T x_t \sum_{t=k+1}^T x_{t-k} $$
Then you "just" need to
  1. translate that all into code which keeps track of the running sums
  2. test it thoroughly
  3. rewrite it to pick up mistakes in my or your algebra
  4. test it again
Good luck!
 

FAQ: Approximate new acorrelation given previous acorrelation and a new set of data?

How do I approximate a new correlation given a previous correlation and a new set of data?

The process of approximating a new correlation involves using the previous correlation as a starting point and analyzing the new set of data to determine the strength and direction of the relationship between the variables.

What is the significance of using a previous correlation in approximating a new correlation?

Using a previous correlation as a starting point allows for a more accurate approximation of the new correlation, as it takes into account any existing relationship between the variables.

Can I use any type of data to approximate a new correlation?

Yes, you can use any type of data to approximate a new correlation as long as the data is relevant to the variables being studied and is of good quality.

Is there a specific formula or method for approximating a new correlation?

There are various statistical methods and formulas that can be used to approximate a new correlation, such as Pearson's correlation coefficient or Spearman's rank correlation coefficient.

How do I interpret the results of the approximation of a new correlation?

The results of the approximation of a new correlation will provide a numerical value that indicates the strength and direction of the relationship between the variables. This value can range from -1 to 1, with -1 indicating a perfect negative correlation, 0 indicating no correlation, and 1 indicating a perfect positive correlation.

Similar threads

Back
Top