Correlation Coefficient for lag $k$ in Time Series Data Formula of  Pearson Correlation Coefficient is :
$$r_{xy}=\frac{\sum_{i=1}^{n}(x_i-\bar x)(y_i-\bar y)}{\sqrt{\sum_{i=1}^{n}(x_i-\bar x)^2}\sqrt{\sum_{i=1}^{n}(y_i-\bar y)^2}}$$
In Time series Analysis , for lag k , why is it not :
$$r_{k}=\frac{\sum_{t=k+1}^{n}(y_t-\bar y)(y_{t-k}-\bar y)}{\sqrt{\sum_{t=k+1}^{n}(y_t-\bar y)^2}\sqrt{\sum_{t=k+1}^{n}(y_{t-k}-\bar y)^2}}$$
?
rather the actual formula is :
$$r_{k}=\frac{\sum_{t=k+1}^{n}(y_t-\bar y)(y_{t-k}-\bar y)}{\sum_{t=1}^{n}(y_t-\bar y)^2}$$
The denominator is confusing me . Why is the denominator $\sum_{t=1}^{n}(y_t-\bar y)^2$ instead of $\sqrt{\sum_{t=k+1}^{n}(y_t-\bar y)^2}\sqrt{\sum_{t=k+1}^{n}(y_{t-k}-\bar y)^2}$
 A: In the analysis of stationary time series you assume that the expected value, say $\mu$, is the same independent of $t$ as well as the variance $\sigma^2 = Var(y_t)$ does not depend on $t$. So there is only one variance. You can look at the fist pages here.
A: Actual formula is,
$$r_{k}=\frac{\sum_{t=k+1}^{n}(y_t-\bar y^{(1)})(y_{t-k}-\bar y^{(2)})}{\sqrt{\sum_{t=k+1}^{n}(y_t-\bar y^{(1)})^2}\sqrt{\sum_{t=k+1}^{n}(y_{t-k}-\bar y^{(2)})^2}}$$
Where,$$\bar y^{(1)}=\frac{\sum_{t=k+1}^{n}y_t}{n-k}~~~and~~~\bar y^{(2)}=\frac{\sum_{t=k+1}^{n}y_{t-k}}{n-k}$$
So,If n is large enough, we can approximate $\bar y^{(1)}~and~\bar y^{(2)}~to~~\bar y=\frac{\sum_{t=1}^ny_t}{n}$............(law of large numbers, average of large sample moves towards population mean.)
Hence,$$r_{k}\simeq \frac{\sum_{t=k+1}^{n}(y_t-\bar y)(y_{t-k}-\bar y)}{\sqrt{\sum_{t=k+1}^{n}(y_t-\bar y)^2}\sqrt{\sum_{t=k+1}^{n}(y_{t-k}-\bar y)^2}}$$
Finally,
$$r_{k}\simeq \frac{\sum_{t=k+1}^{n}(y_t-\bar y)(y_{t-k}-\bar y)}{{\sum_{t=1}^{n}(y_t-\bar y)^2}}............(same ~variance)$$
