Skip to content
DeepForgeby svx
All problems
HardTime Seriests-332

PACF Lag Two for MA(1)

Problem

Derive the partial autocorrelation at lag two for an MA(1) process. The lag-one autocorrelation is r1 = theta / (1 + theta^2), the lag-two autocorrelation is zero, and the PACF at lag two follows from these as -r1^2 / (1 - r1^2).

Return 0.0 if the denominator is zero. This nonzero PACF is why an MA(1) model has a slowly decaying partial autocorrelation.

Hint

The PACF at lag two is the coefficient on x[t-2] after removing the effect of x[t-1].

Test cases

case 1
in: [0.5]
expected: -0.19047619047619047
case 2
in: [1]
expected: -0.3333333333333333
case 3
in: [0]
expected: 0
case 4
in: [2]
expected: -0.19047619047619047
Starter codePython
def pacf_lag2_ma1(theta):
    # Your code here
    pass

4 test cases · run your code against them in the editor