---
title: "Auto-regressive model of order 2"
output: html_document
---

## Simulation of AR(2)

- Simulate time series of length 1000 from the following AR(2) model:
$$x_t = \frac{5}{6}x_{t-1} - \frac{1}{6}x_{t-2} + w_t$$

- Plot the correlogram and partial correlogram for the simulated data and comment.

- Fit an AR model to the data giving the parameter estimates and order of the fitted AR process.

- Construct 95% confidence intervals for the parameter estimates of the fitted model.
  Do the model parameters used for simulation fall within the confidence intervals? Explain your results.

- Plot the correlogram of the residuals of the fitted model, and comment.
