Python Tutorial: Intro to AR, MA and ARMA models

10 Mar 2020 · 4 min
4:09

In this tutorial, the instructor introduces the fundamentals of autoregressive (AR), moving‑average (MA) and combined ARMA time‑series models. An AR model regresses the current value on its past values, with a white‑noise shock term; the order P indicates how many lags are used. A MA model regresses the current value on past shock terms, with order Q indicating the number of lagged shocks. An ARMA(p,q) model combines both approaches, using past values and past shocks. The lesson demonstrates how to simulate ARMA data with the statsmodels function `armageneratesample`, emphasizing the need to pass the negative of the desired AR coefficients and to include a leading 1 in the coefficient arrays. It then briefly shows how to fit an ARMA model using the `ARMA` class: instantiate with data and order, then call `fit()`. The tutorial ends with a prompt to practice the concepts.

Chapters

More from Richie

youtube.com

#359 My Best Friend is AI with Valerie Tiberius, Professor of Philosophy at University of Minnesota

5mo ago
youtube.com

17.8% of the World Now Uses AI — And the Gap Is Widening | The Median #5

5mo ago
youtube.com

Create GPTs to Automate Go-To-Market Research

5mo ago
youtube.com

What Happened to Self-Driving Cars? #AI

5mo ago
youtube.com

Never Use AI For This #warning #AI #flights

5mo ago
youtube.com

Use AI Agents to Analyze Power Grid Optimization

5mo ago
youtube.com

This is how modern AI actually solves problems #AITrends #AI

5mo ago
youtube.com

How AI Agents Will Work While You Sleep | Ruslan Salakhutdinov, Professor at Carnegie Mellon

5mo ago
youtube.com

#358 How AI Agents Will Work While You Sleep | Ruslan Salakhutdinov, Professor at Carnegie Mellon

5mo ago
youtube.com

Build an AI‑driven Dashboard

5mo ago
youtube.com

What’s Broken in Labor Markets Today #datascience

5mo ago
See all content