All problems
AR Coefficient Sum Stationarity Check
Problem
Use a simple sufficient stationarity check for an AR(p) process: the sum of the absolute values of the autoregressive coefficients must be strictly less than one.
Return True for an empty coefficient list, which represents white noise.
Hint
The condition is sufficient but not necessary for stationarity.
Test cases
case 1
in: [[0.5,0.3]]
expected: true
case 2
in: [[0.8,0.4]]
expected: false
case 3
in: [[]]
expected: true
case 4
in: [[-0.5,0.25]]
expected: true
case 5
in: [[1]]
expected: false
Starter codePython
def ar_sum_stationary(phis):
# Your code here
pass5 test cases · run your code against them in the editor