avatarHair Parra

Free AI web copilot to create summaries, insights and extended knowledge, download it at here

4192

Abstract

nus the actual value.</p><p id="2950">Now, if we want to show consistency, the idea is to use the <a href="https://en.wikipedia.org/wiki/Law_of_large_numbers">L.L.N</a> and <a href="https://en.wikipedia.org/wiki/Slutsky%27s_theorem">Slutky’s Theorem </a>to show that</p><figure id="43c6"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*Nmfnk94Q2hM-jDGmAbyGGg.png"><figcaption></figcaption></figure><h2 id="9942">Aside: Gamma vector and Gamma matrix</h2><p id="3a1e">So besides doing funky summations and statistics, what is the ultimate goal? The idea is that in order to perform inference about <i>p(h)</i>, we need some distributional assumptions which make use of these estimators (for instance, building confidence intervals about the true values). We will first proceed to define two useful objects: the <b>gamma vector</b> and the <b>gamma matrix.</b></p><figure id="7c1f"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*n3XGkw7RxgWSUIbsXGXMXw.png"><figcaption></figcaption></figure><figure id="8a97"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*ODFq7cPXakNsNZit-YQP8A.png"><figcaption></figcaption></figure><p id="62aa">, and the sample version just uses the sample ACVF instead.</p><figure id="c44c"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*5tr0pXPDDaDMwAN0wNmhyQ.png"><figcaption></figcaption></figure><figure id="2028"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*EXNA6ZGnM-tWc2P17VFReg.png"><figcaption></figcaption></figure><p id="cc48">similarly, the sample version replaces its entries with the sample ACVF. In the rest of this article, we will only use the gamma vector, but both of this will be useful in future sections.</p><p id="41bd"><b>Properties</b></p><figure id="09f8"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*T89Ld9cX3RqsKGxym5UjZg.png"><figcaption></figcaption></figure><h2 id="cf63">Joint distribution of sample (p(1), … ,p(k))</h2><figure id="61aa"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*XEGN9_SF2lmONhaMZgVAPw.png"><figcaption></figcaption></figure><figure id="c7e3"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*TbicCXNYf1ONadNpdkUq9Q.png"><figcaption></figcaption></figure><p id="6052">be the vector of all correlations up to <i>k </i>(note this is just the Gamma vector of 1 divided by gamma of 0), having some joint distribution <b>F</b>, say. Then, for <b>large samples without large lags</b>, we can approximate such distribution by</p><figure id="b18b"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*9dSRaU2lMCOFNahIrP2MuQ.png"><figcaption></figcaption></figure><p id="afd0">That is, the sample ACF vector follows a <a href="https://readmedium.com/appendix-probability-f65c1160e806">multivariate normal distribution</a> with mean vector equal to the true ACF vector, and the variance above, where <i>W </i>is a <a href="https://readmedium.com/appendix-probability-f65c1160e806">covariance matrix </a>with entries given by</p><figure id="9c89"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*PXui580qeERzUguGStQ1iw.png"><figcaption></figcaption></figure><p id="4f04">. This is a special case of <b>Berlet’s formula.</b> Not getting into the details of how this came about or how it is true, let’s see a couple of examples.</p><figure id="bd81"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*Axi5ZoHe5cH-Y0DhEWGkJg.png"><figcaption></figcaption></figure><figure id="498d"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*xaTf5zQCKmjQBI8aFz_S-w.png"><figcaption></figcaption></figure><figure id="4ab5"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*cHtQlyRP-pqZiKUh6DxBrw.png"><figcaption></figcaption></figure><figure id="9d72"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*3JDludqjZDfvNfAbCzc4_w.png"><figcaption></figcaption></figure><p id="b193">with coefficients</p><figure id="5d6f"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*QYalZGbRuS_RNn30SuOXhA.png"><figcaption></figcaption></figure><p id="51f4">, and so it can be shown that</p><figure id

Options

="ac6f"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*vmqBC16Hz2yo5Ng0QDcCcQ.png"><figcaption></figcaption></figure><p id="f198">. In order to calculate</p><figure id="4049"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*F6O3QNn_vu13PailkFvNlg.png"><figcaption></figcaption></figure><p id="73fb">we first consider the case when <i>i=j.</i></p><p id="d280"><i>i=1</i></p><figure id="a47e"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*ARi6GMLzNY1vgKnNP47YDA.png"><figcaption></figcaption></figure><p id="04cc">So that</p><figure id="80ba"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*UGDy_o43i9pa89WE0nqHHw.png"><figcaption></figcaption></figure><p id="e3d1"><i>i>1</i></p><figure id="58e7"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*GD7qkIlOPoSz_6MjLdry1g.png"><figcaption></figcaption></figure><p id="9000">So that</p><figure id="075b"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*WQ0wVcCS3yI7aI_fYmpT6Q.png"><figcaption></figcaption></figure><h2 id="7916">Next time</h2><p id="4fa6">That’s it for now! Next time, we will actually move back to forecasting by further defining the shape of the <b>best linear predictor</b> of a future observation given our data. Stay tuned, and see you next time!</p><div id="daf3" class="link-block"> <a href="https://medium.com/@hair.parra/a-complete-introduction-to-time-series-analysis-with-r-best-linear-predictor-part-i-e4e7b547e42c"> <div> <div> <h2>A Complete Introduction To Time Series Analysis (with R):: Best Linear Predictor (Part I)</h2> <div><h3>In chapter 5 of this article series, we found that the best predictor of the n+h-th lag is given by the conditional…</h3></div> <div><p>medium.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/1*1bWNaY5RMVfLIvBshs98Kg.png)"></div> </div> </div> </a> </div><h2 id="f9b9">Last time</h2><p id="a8ef"><a href="https://readmedium.com/a-complete-introduction-to-time-series-analysis-with-r-introduction-to-time-series-operators-2842d128b8b8">Introduction to Time Series Operators</a></p><div id="0e75" class="link-block"> <a href="https://readmedium.com/a-complete-introduction-to-time-series-analysis-with-r-introduction-to-time-series-operators-2842d128b8b8"> <div> <div> <h2>A Complete Introduction To Time Series Analysis (with R):: Introduction to Time Series Operators</h2> <div><h3>In the last article, we explored some useful properties of linear processes, including the Wold’s Representation…</h3></div> <div><p>medium.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/1*X9P2Vs31-a0r1DHGmMDxeQ.png)"></div> </div> </div> </a> </div><h2 id="6422">Main page</h2><div id="dddc" class="link-block"> <a href="https://readmedium.com/a-complete-introduction-to-time-series-analysis-with-r-9882f2d44c9d"> <div> <div> <h2>A Complete Introduction To Time Series Analysis (with R)</h2> <div><h3>During these times of the Covid19 pandemic, you have perhaps heard about the collaborative efforts to predict new…</h3></div> <div><p>medium.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/1*TL2PeOANEN4zG0_OqoHptQ.jpeg)"></div> </div> </div> </a> </div><h2 id="653d">Follow me at</h2><ol><li><a href="https://www.linkedin.com/in/hair-parra-526ba19b/">https://www.linkedin.com/in/hair-parra-526ba19b/</a></li><li><a href="https://github.com/JairParra">https://github.com/JairParra</a></li><li><a href="https://medium.com/@hair.parra">https://medium.com/@hair.parra</a></li></ol></article></body>

A Complete Introduction To Time Series Analysis (with R):: Estimation of the ACF

Sample estimator of the autocovariance function

Last time, we saw how to estimate the trend of any time series along with meaningful statistical properties such as unbiasedness and variance. This time, we will now proceed to build solid statistical estimates of the ACVF and ACF.

Asymptotic behaviour of the sample ACVF and sample ACF

Recall the definition of the sample autocovariance function for any time series:

with

and further,

(If this seems confusing, recall that we defined these before in this article).

It turns out that these estimates are biased, but nonetheless consistent. That is, with little data, the expectation will not arrive at the actual true value but rather to a factor of it. However, since these are consistent, this tells us that the estimates will actually be better the more data we have.

  • Note that in the summation, we only go up to n-|h| instead of n .
  • However, we divide by n and also subtract the whole sample mean.
  • It turns out this is also the best we can do when it comes to the estimation of the autocovariance! (proof out of scope).

Proof Sketch

The idea is first to solve that the sample ACVF is biased. Recall that for any random variable X

Therefore,

So all we have to do now is to calculate the expectation. Take your time processing what’s going on in the calculations:

Let’s see what happened here:

  • The first line is simply plugging in the definition.
  • As the expectation is linear, we can put it inside the summation.
  • By independence of the sample mean and every single observation (out of scope), We can expand the inner term and apply expectations independently.
  • We translate these terms into mu and the second moment we found before, plug it in and cancel terms.
  • In the fifth line, we have canceled terms and only the summation remains, so we just aggregate those.
  • In the sixth line, note that no term depends on t, so we simply sum this factor and re-write again.
  • We factorize one (1/n²) term from the inside of the summation and pull it just outside the sum.
  • This is no more than the definition of the Variance of the sample mean estimator that we had found before! , times a factor.

So the bias is given by

Note, however that as n goes to infinity, the bias goes to the variance of the sample mean minus the actual value.

Now, if we want to show consistency, the idea is to use the L.L.N and Slutky’s Theorem to show that

Aside: Gamma vector and Gamma matrix

So besides doing funky summations and statistics, what is the ultimate goal? The idea is that in order to perform inference about p(h), we need some distributional assumptions which make use of these estimators (for instance, building confidence intervals about the true values). We will first proceed to define two useful objects: the gamma vector and the gamma matrix.

, and the sample version just uses the sample ACVF instead.

similarly, the sample version replaces its entries with the sample ACVF. In the rest of this article, we will only use the gamma vector, but both of this will be useful in future sections.

Properties

Joint distribution of sample (p(1), … ,p(k))

be the vector of all correlations up to k (note this is just the Gamma vector of 1 divided by gamma of 0), having some joint distribution F, say. Then, for large samples without large lags, we can approximate such distribution by

That is, the sample ACF vector follows a multivariate normal distribution with mean vector equal to the true ACF vector, and the variance above, where W is a covariance matrix with entries given by

. This is a special case of Berlet’s formula. Not getting into the details of how this came about or how it is true, let’s see a couple of examples.

with coefficients

, and so it can be shown that

. In order to calculate

we first consider the case when i=j.

i=1

So that

i>1

So that

Next time

That’s it for now! Next time, we will actually move back to forecasting by further defining the shape of the best linear predictor of a future observation given our data. Stay tuned, and see you next time!

Last time

Introduction to Time Series Operators

Main page

Follow me at

  1. https://www.linkedin.com/in/hair-parra-526ba19b/
  2. https://github.com/JairParra
  3. https://medium.com/@hair.parra
Timeseries
Statistics
Machine Learning
Mathematics
Forecasting
Recommended from ReadMedium