Auto-Regressive Simulation (Second-Order)

This Demonstration shows realizations of a second-order auto-regressive (AR) process y, using the random variable r drawn from a normal density with mean zero and variance unity. It is governed by the equation:

(Subscript[y, i])=(Subscript[a, 1])(Subscript[y, i-1])+(Subscript[a, 2])(Subscript[y, i-2])+(Subscript[r, i]) (i=3,…,N, where N is the length of the series).

The constants (Subscript[a, 1]) and (Subscript[a, 2]) are the auto-regressive constants. If (Subscript[a, 1]) + (Subscript[a, 2])<1, (Subscript[a, 2]) - (Subscript[a, 1])<1, and -1<(Subscript[a, 2])<1, the series is stationary. A series of length 400 is created in every case.

THINGS TO TRY

MouseOver

DETAILS

The Demonstration is set such that the same random series of points is used no matter how the constants (Subscript[a, 1]) and (Subscript[a, 2]) are varied. However, when the "randomize" button is pressed, a new random series will be generated and used. Keeping the random series identical allows the user to see exactly the effects on the AR series of changes in the two constants. If the constants (Subscript[a, 1]), (Subscript[a, 2]) do not meet the stationarity conditions, the series will diverge. The Demonstration is for a second-order process only. Additional AR terms would enable somewhat more complex series to be generated, but the differences from second-order processes would be difficult to ascertain.

For a detailed description of an AR process, see, for instance, G. M. Jenkins and D. G. Watts, Spectral Analysis and Its Applications, San Francisco: Holden-Day, 1968 or G. Box, G. M. Jenkins, and G. Reinsel, Time Series Analysis: Forecasting and Control, 3rd ed., Englewood Cliffs, NJ: Prentice-Hall, 1994.

Contributed by: David von Seggern (University of Nevada)

© The Wolfram Demonstrations Project & Contributors   |   Terms of Use