title: Determining p,q from acf and pacf python
body: <p>I'm having difficulties understanding how to determine <code>p</code> and <code>q</code> in ARIMA. What i understand is PACF cut off determines <code>p</code> and ACF hit very low determines <code>q</code> but at the same time the cut off in PACF which is determines <code>p</code> is equal to AR(q)? I'm still very confused. Then i tried it myself building ARIMA model and i get this ACF and PACF. And i assume that the <code>p</code> is 16 because it's cut off (hit zero abruptly) at lag 16. The <code>q</code> is 1 because it hits very low at lag 1. So my ARIMA order would be (16,0,1). Am i wrong? i learn it from <a href="https://www.kaggle.com/sumi25/understand-arima-and-tune-p-d-q" rel="nofollow noreferrer">kaggle</a> and <a href="https://dimensionless.in/beginners-guide-for-time-series-forecasting/" rel="nofollow noreferrer">here</a>. I don't know if i understand it right</p>
  
  <p><a href="https://i.stack.imgur.com/GyVYX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GyVYX.png" alt="plot"></a></p>