Question 2.1.
A. Since {ϵn} is white noise with variance σ2, then γh=Cov(Xn, Xn+h)=Cov(Xn,ϕXn+h−1+ϵn+h)=ϕCov(Xn, Xn+h−1)+Cov(Xn, ϵn+h)=ϕγh−1, noting that causality implies Cov(Xn, ϵn+h)=0. We can get γ0 by a similar calculation, γ0=Cov(Xn, Xn)γ0=Cov(ϕXn−1+ϵn, ϕXn−1+ϵn)γ0=ϕ2Cov(Xn−1, Xn−1)+Cov(ϵn, ϵn)γ0=ϕ2γ0+σ2(1 −ϕ2)γ0=σ2γ0=σ21−ϕ2. So far, this follows closely the approach used for Question 3.9 of [1]. The solution to this difference equation could be seen by inspection. However, the question asks us to proceed with a general method, looking for solutions of the form Aλh, that works also for harder problems.
Let γh=Aλh, then Aλh=ϕRλh−1λh=ϕλh−1λ=ϕ.
Applying γ0 as an initial condition, then A λ0=γ0=σ21−ϕ2. Therefore, γh=σ21−ϕ2ϕh.
B. We use a Taylor series expansion (e.g., [2]), g(x)=g(0)+g′(0)x+12g(2)(0)x2+13!g(3)(0)x3+... Since g(n)(0)=dndtn11−ϕx=n!ϕnxn, we have g(x) =∞∑n=0ϕnxn. We then use this Taylor series expansion to provide an expansion of (1−ϕB)−1 which gives the following MA (∞) representation of the AR(1) model. Xn=ϕXn−1+ϵn=ϕBXn+ϵn(1−ϕB)Xn=ϵnXn=(1−ϕB)−1ϵn=ϵn+ϕBϵn+ϕ2B2ϵn+...=ϵn+ϕϵn−1+ϕ2ϵn−2+...=∞∑j=0ϕjϵn−j. Then, apply the general formula for the autocovariance function of the MA (∞) process (e.g., [1], Chapter 4, equation 4) with the constraint −1<ϕ<1, γh=∞∑j=0ψjψj+hσ2=∞∑j=0ϕ2j+hσ2=ϕhσ2∞∑j=0ϕ2j=ϕhσ21−ϕ2, which is the same as the answer in A.
C. Normalizing the autocovariance derived above to give an autocorrelation function, for h≥0 we have ρh=γhγ0=ϕhσ21−ϕ2σ21−ϕ2=ϕh
which is the same as R funtion ARMAacf by the following code.
set.seed(12345)
ar_coefs <- 0.8
phi <-ar_coefs
acf <- phi^(0:100)
Racf <- ARMAacf(ar=ar_coefs,lag.max=100)
all(abs(acf-Racf)<1e-6)
## [1] TRUE
plot(acf,type="l", col='red', xlab ="lag")
lines(Racf, lty =2, col='blue')
legend("topright", legend = c("ACF", "RACF"), col = c("red","blue"), lty =c(1,2))
Question 2.2. The solution of stochastic difference equation of the random walk model is Xn=n∑k=1ϵk. Therefore, γmn=Cov(Xm,Xn)=Cov(m∑i=1ϵi,n∑j=1ϵj)=m∑i=1n∑j=1Cov(ϵi,ϵj)=∑i=1min
Sources.
The calculations in Homework 2 use only fairly standard techniques, and it is expected that many well prepared student may choose to solve them independently. Even an independently written solution can usually be improved by some appropriate references, but full points were possible for a statement that no sources were used.
As for homework 1, no points were given for sources if the homework was entirely missing any statement of sources. To see why this is necessary, consider how to grade a homework which is rather close to online solutions and does not give a statement of sources. Such a homework loses the scholarship points for an explicit statement of sources, without us having to jump to conclusions about whether the solution is too close to an un-referenced source. This situation is not unusual.
Points could also be taken off if the sources were not referenced at specific points in the solution. The reasoning for this becomes clear if you think of it from the point of view of the grader. The grader should not have to do detective work to find the relationship between the report and the referenced sources - it should be clearly presented for a report earning full points for scholarship.
This solution is based on the Winter 2021 solution.
References.
1. Ionides, E. (2022). Notes for STATS/DATASCI 531, Modeling and Analysis of Time Series Data. Available at: https://ionides.github.io/531w22/.
2. Strang, G., and Herman, E. (2016). Calculus Volume 2 (Openstax, Web version updated 2021) Available at: https://openstax.org/details/books/calculus-volume-2.