[{"data":1,"prerenderedAt":924},["ShallowReactive",2],{"content-query-2cLfNe2BbR":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"heading":8,"prompt":10,"tags":14,"files":17,"nav":6,"presets":18,"gallery":35,"body":37,"_type":917,"_id":918,"_source":919,"_file":920,"_stem":921,"_extension":922,"sitemap":923},"/tools/autocorrelation-plot","tools",false,"","Autocorrelation Plot Generator (ACF and PACF)","Create ACF and PACF plots online from Excel or CSV time-series data. Diagnose lag structure and model order with AI.",{"prefix":11,"label":12,"placeholder":13},"Plot autocorrelation","Describe the autocorrelation analysis you want to run","e.g. ACF and PACF of monthly sales, identify seasonal period, suggest ARIMA order",[15,16],"charts","statistics",true,[19,25,30],{"label":20,"prompt":21,"dataset_url":22,"dataset_title":23,"dataset_citation":24},"Temperature anomaly ACF","plot ACF and PACF of annual global temperature anomaly up to lag 30; mark significant lags; identify if there is persistent autocorrelation suggesting trend; recommend whether differencing is needed","https://ourworldindata.org/grapher/temperature-anomaly.csv","Global average temperature anomaly","Our World in Data",{"label":26,"prompt":27,"dataset_url":28,"dataset_title":29,"dataset_citation":24},"CO₂ seasonal structure","plot ACF of monthly CO2 concentration up to lag 48; mark spikes at multiples of 12; estimate seasonal period; plot original series alongside ACF; comment on stationarity","https://ourworldindata.org/grapher/co2-concentration-long-term.csv","CO₂ concentration in the atmosphere",{"label":31,"prompt":32,"dataset_url":33,"dataset_title":34,"dataset_citation":24},"Energy use lag structure","ACF and PACF of per-capita energy use up to lag 24; plot with 95% confidence bands; identify AR and MA orders from spike pattern; suggest tentative ARIMA(p,d,q) specification","https://ourworldindata.org/grapher/per-capita-energy-use.csv","Per capita energy use",[36],"/img/tools/autocorrelation-plot.png",{"type":38,"children":39,"toc":906},"root",[40,49,89,116,128,134,205,211,324,336,342,492,498,622,628,689,695,732,738,775,827,857,889],{"type":41,"tag":42,"props":43,"children":45},"element","h2",{"id":44},"what-is-an-autocorrelation-plot",[46],{"type":47,"value":48},"text","What Is an Autocorrelation Plot?",{"type":41,"tag":50,"props":51,"children":52},"p",{},[53,59,61,66,68,73,75,80,82,87],{"type":41,"tag":54,"props":55,"children":56},"strong",{},[57],{"type":47,"value":58},"Autocorrelation",{"type":47,"value":60}," measures the correlation of a time series with a lagged version of itself. The ",{"type":41,"tag":54,"props":62,"children":63},{},[64],{"type":47,"value":65},"autocorrelation function (ACF)",{"type":47,"value":67}," plots this correlation coefficient at every lag k — from lag 1 (how correlated is today's value with yesterday's?) to lag 40 or more (how correlated is today's value with the value 40 periods ago?). A value near +1 at lag k means the series strongly repeats its pattern every k periods; a value near −1 means it alternates; a value near 0 means no linear relationship. The ACF is the primary diagnostic tool for detecting ",{"type":41,"tag":54,"props":69,"children":70},{},[71],{"type":47,"value":72},"seasonality",{"type":47,"value":74}," (large positive spikes at multiples of the seasonal period), ",{"type":41,"tag":54,"props":76,"children":77},{},[78],{"type":47,"value":79},"trend",{"type":47,"value":81}," (slowly decaying ACF that stays above zero for many lags), and ",{"type":41,"tag":54,"props":83,"children":84},{},[85],{"type":47,"value":86},"over-differencing",{"type":47,"value":88}," (large negative spike at lag 1 after applying too many differences).",{"type":41,"tag":50,"props":90,"children":91},{},[92,94,99,101,107,109,114],{"type":47,"value":93},"The ",{"type":41,"tag":54,"props":95,"children":96},{},[97],{"type":47,"value":98},"partial autocorrelation function (PACF)",{"type":47,"value":100}," is the correlation at lag k after removing the contribution of all shorter lags. While the ACF reflects all the ways lag-k is correlated (direct and indirect through intermediate lags), the PACF isolates the ",{"type":41,"tag":102,"props":103,"children":104},"em",{},[105],{"type":47,"value":106},"direct",{"type":47,"value":108}," contribution of lag k. This distinction is crucial for ",{"type":41,"tag":54,"props":110,"children":111},{},[112],{"type":47,"value":113},"ARIMA model identification",{"type":47,"value":115},": in an AR(p) process, the PACF cuts off sharply after lag p while the ACF decays gradually; in an MA(q) process, the ACF cuts off after lag q while the PACF decays. The joint pattern of ACF and PACF is the classic method for choosing p and q in the Box-Jenkins ARIMA framework.",{"type":41,"tag":50,"props":117,"children":118},{},[119,121,126],{"type":47,"value":120},"Both plots include ",{"type":41,"tag":54,"props":122,"children":123},{},[124],{"type":47,"value":125},"95% confidence bands",{"type":47,"value":127}," (±1.96/√n), shown as dashed lines. Spikes outside these bands are statistically significant autocorrelations — the time series is not behaving like white noise at those lags. A well-fitted time series model should leave residuals whose ACF shows no spikes outside the bands, confirming that all systematic structure has been captured.",{"type":41,"tag":42,"props":129,"children":131},{"id":130},"how-it-works",[132],{"type":47,"value":133},"How It Works",{"type":41,"tag":135,"props":136,"children":137},"ol",{},[138,163,178],{"type":41,"tag":139,"props":140,"children":141},"li",{},[142,147,149,154,156,161],{"type":41,"tag":54,"props":143,"children":144},{},[145],{"type":47,"value":146},"Upload your data",{"type":47,"value":148}," — provide a CSV or Excel file with a ",{"type":41,"tag":54,"props":150,"children":151},{},[152],{"type":47,"value":153},"date",{"type":47,"value":155}," column and a ",{"type":41,"tag":54,"props":157,"children":158},{},[159],{"type":47,"value":160},"value",{"type":47,"value":162}," column. Daily, weekly, monthly, or annual data all work. One row per time point.",{"type":41,"tag":139,"props":164,"children":165},{},[166,171,173],{"type":41,"tag":54,"props":167,"children":168},{},[169],{"type":47,"value":170},"Describe the analysis",{"type":47,"value":172}," — e.g. ",{"type":41,"tag":102,"props":174,"children":175},{},[176],{"type":47,"value":177},"\"plot ACF and PACF of monthly sales up to lag 36; mark significant lags; identify seasonal period; suggest ARIMA order\"",{"type":41,"tag":139,"props":179,"children":180},{},[181,186,188,195,197,203],{"type":41,"tag":54,"props":182,"children":183},{},[184],{"type":47,"value":185},"Get full results",{"type":47,"value":187}," — the AI writes Python code using ",{"type":41,"tag":189,"props":190,"children":192},"a",{"href":191},"https://www.statsmodels.org/stable/tsa.html",[193],{"type":47,"value":194},"statsmodels acf/pacf",{"type":47,"value":196}," and ",{"type":41,"tag":189,"props":198,"children":200},{"href":199},"https://plotly.com/python/",[201],{"type":47,"value":202},"Plotly",{"type":47,"value":204}," to produce the two-panel ACF/PACF chart with color-coded significance, confidence bands, and a lag interpretation table",{"type":41,"tag":42,"props":206,"children":208},{"id":207},"required-data-format",[209],{"type":47,"value":210},"Required Data Format",{"type":41,"tag":212,"props":213,"children":214},"table",{},[215,239],{"type":41,"tag":216,"props":217,"children":218},"thead",{},[219],{"type":41,"tag":220,"props":221,"children":222},"tr",{},[223,229,234],{"type":41,"tag":224,"props":225,"children":226},"th",{},[227],{"type":47,"value":228},"Column",{"type":41,"tag":224,"props":230,"children":231},{},[232],{"type":47,"value":233},"Description",{"type":41,"tag":224,"props":235,"children":236},{},[237],{"type":47,"value":238},"Example",{"type":41,"tag":240,"props":241,"children":242},"tbody",{},[243,285],{"type":41,"tag":220,"props":244,"children":245},{},[246,256,261],{"type":41,"tag":247,"props":248,"children":249},"td",{},[250],{"type":41,"tag":251,"props":252,"children":254},"code",{"className":253},[],[255],{"type":47,"value":153},{"type":41,"tag":247,"props":257,"children":258},{},[259],{"type":47,"value":260},"Date or timestamp",{"type":41,"tag":247,"props":262,"children":263},{},[264,270,272,278,279],{"type":41,"tag":251,"props":265,"children":267},{"className":266},[],[268],{"type":47,"value":269},"2020-01",{"type":47,"value":271},", ",{"type":41,"tag":251,"props":273,"children":275},{"className":274},[],[276],{"type":47,"value":277},"2020-01-31",{"type":47,"value":271},{"type":41,"tag":251,"props":280,"children":282},{"className":281},[],[283],{"type":47,"value":284},"Jan 2020",{"type":41,"tag":220,"props":286,"children":287},{},[288,296,301],{"type":41,"tag":247,"props":289,"children":290},{},[291],{"type":41,"tag":251,"props":292,"children":294},{"className":293},[],[295],{"type":47,"value":160},{"type":41,"tag":247,"props":297,"children":298},{},[299],{"type":47,"value":300},"Numeric time series",{"type":41,"tag":247,"props":302,"children":303},{},[304,310,311,317,318],{"type":41,"tag":251,"props":305,"children":307},{"className":306},[],[308],{"type":47,"value":309},"245.3",{"type":47,"value":271},{"type":41,"tag":251,"props":312,"children":314},{"className":313},[],[315],{"type":47,"value":316},"312.1",{"type":47,"value":271},{"type":41,"tag":251,"props":319,"children":321},{"className":320},[],[322],{"type":47,"value":323},"198.8",{"type":41,"tag":50,"props":325,"children":326},{},[327,329,334],{"type":47,"value":328},"Any column names work — describe them in your prompt. The series should be ",{"type":41,"tag":54,"props":330,"children":331},{},[332],{"type":47,"value":333},"regularly spaced",{"type":47,"value":335}," (monthly, weekly, daily). For irregular data, ask the AI to resample to a regular frequency first.",{"type":41,"tag":42,"props":337,"children":339},{"id":338},"interpreting-the-results",[340],{"type":47,"value":341},"Interpreting the Results",{"type":41,"tag":212,"props":343,"children":344},{},[345,361],{"type":41,"tag":216,"props":346,"children":347},{},[348],{"type":41,"tag":220,"props":349,"children":350},{},[351,356],{"type":41,"tag":224,"props":352,"children":353},{},[354],{"type":47,"value":355},"Pattern",{"type":41,"tag":224,"props":357,"children":358},{},[359],{"type":47,"value":360},"What it means",{"type":41,"tag":240,"props":362,"children":363},{},[364,380,396,412,428,444,460,476],{"type":41,"tag":220,"props":365,"children":366},{},[367,375],{"type":41,"tag":247,"props":368,"children":369},{},[370],{"type":41,"tag":54,"props":371,"children":372},{},[373],{"type":47,"value":374},"ACF decays slowly",{"type":41,"tag":247,"props":376,"children":377},{},[378],{"type":47,"value":379},"Series is non-stationary (has trend or unit root) — apply first differencing",{"type":41,"tag":220,"props":381,"children":382},{},[383,391],{"type":41,"tag":247,"props":384,"children":385},{},[386],{"type":41,"tag":54,"props":387,"children":388},{},[389],{"type":47,"value":390},"ACF spike at lag k, 2k, 3k",{"type":41,"tag":247,"props":392,"children":393},{},[394],{"type":47,"value":395},"Seasonal period of k (e.g. spikes at 12, 24, 36 = annual seasonality in monthly data)",{"type":41,"tag":220,"props":397,"children":398},{},[399,407],{"type":41,"tag":247,"props":400,"children":401},{},[402],{"type":41,"tag":54,"props":403,"children":404},{},[405],{"type":47,"value":406},"ACF cuts off at lag q, PACF decays",{"type":41,"tag":247,"props":408,"children":409},{},[410],{"type":47,"value":411},"MA(q) process — set q = last significant ACF lag",{"type":41,"tag":220,"props":413,"children":414},{},[415,423],{"type":41,"tag":247,"props":416,"children":417},{},[418],{"type":41,"tag":54,"props":419,"children":420},{},[421],{"type":47,"value":422},"PACF cuts off at lag p, ACF decays",{"type":41,"tag":247,"props":424,"children":425},{},[426],{"type":47,"value":427},"AR(p) process — set p = last significant PACF lag",{"type":41,"tag":220,"props":429,"children":430},{},[431,439],{"type":41,"tag":247,"props":432,"children":433},{},[434],{"type":41,"tag":54,"props":435,"children":436},{},[437],{"type":47,"value":438},"Both decay gradually",{"type":41,"tag":247,"props":440,"children":441},{},[442],{"type":47,"value":443},"ARMA(p,q) process — use AIC-based model selection",{"type":41,"tag":220,"props":445,"children":446},{},[447,455],{"type":41,"tag":247,"props":448,"children":449},{},[450],{"type":41,"tag":54,"props":451,"children":452},{},[453],{"type":47,"value":454},"Large negative ACF at lag 1",{"type":41,"tag":247,"props":456,"children":457},{},[458],{"type":47,"value":459},"Over-differenced — reduce differencing order",{"type":41,"tag":220,"props":461,"children":462},{},[463,471],{"type":41,"tag":247,"props":464,"children":465},{},[466],{"type":41,"tag":54,"props":467,"children":468},{},[469],{"type":47,"value":470},"No significant lags",{"type":41,"tag":247,"props":472,"children":473},{},[474],{"type":47,"value":475},"White noise — series is unpredictable; no ARIMA structure to model",{"type":41,"tag":220,"props":477,"children":478},{},[479,487],{"type":41,"tag":247,"props":480,"children":481},{},[482],{"type":41,"tag":54,"props":483,"children":484},{},[485],{"type":47,"value":486},"Confidence band width",{"type":41,"tag":247,"props":488,"children":489},{},[490],{"type":47,"value":491},"±1.96/√n — wider bands with shorter series; more data = tighter bounds",{"type":41,"tag":42,"props":493,"children":495},{"id":494},"example-prompts",[496],{"type":47,"value":497},"Example Prompts",{"type":41,"tag":212,"props":499,"children":500},{},[501,517],{"type":41,"tag":216,"props":502,"children":503},{},[504],{"type":41,"tag":220,"props":505,"children":506},{},[507,512],{"type":41,"tag":224,"props":508,"children":509},{},[510],{"type":47,"value":511},"Scenario",{"type":41,"tag":224,"props":513,"children":514},{},[515],{"type":47,"value":516},"What to type",{"type":41,"tag":240,"props":518,"children":519},{},[520,537,554,571,588,605],{"type":41,"tag":220,"props":521,"children":522},{},[523,528],{"type":41,"tag":247,"props":524,"children":525},{},[526],{"type":47,"value":527},"Full diagnostic",{"type":41,"tag":247,"props":529,"children":530},{},[531],{"type":41,"tag":251,"props":532,"children":534},{"className":533},[],[535],{"type":47,"value":536},"ACF and PACF up to lag 36; 95% confidence bands; identify seasonal period and ARIMA order",{"type":41,"tag":220,"props":538,"children":539},{},[540,545],{"type":41,"tag":247,"props":541,"children":542},{},[543],{"type":47,"value":544},"Stationarity check",{"type":41,"tag":247,"props":546,"children":547},{},[548],{"type":41,"tag":251,"props":549,"children":551},{"className":550},[],[552],{"type":47,"value":553},"plot ACF of raw series and first-differenced series side by side; does differencing achieve stationarity?",{"type":41,"tag":220,"props":555,"children":556},{},[557,562],{"type":41,"tag":247,"props":558,"children":559},{},[560],{"type":47,"value":561},"Seasonal detection",{"type":41,"tag":247,"props":563,"children":564},{},[565],{"type":41,"tag":251,"props":566,"children":568},{"className":567},[],[569],{"type":47,"value":570},"ACF of monthly data up to lag 48; annotate spikes at seasonal lags 12, 24, 36",{"type":41,"tag":220,"props":572,"children":573},{},[574,579],{"type":41,"tag":247,"props":575,"children":576},{},[577],{"type":47,"value":578},"Residual check",{"type":41,"tag":247,"props":580,"children":581},{},[582],{"type":41,"tag":251,"props":583,"children":585},{"className":584},[],[586],{"type":47,"value":587},"fit AR(2) model; plot ACF of residuals; check if any spikes remain outside the confidence band",{"type":41,"tag":220,"props":589,"children":590},{},[591,596],{"type":41,"tag":247,"props":592,"children":593},{},[594],{"type":47,"value":595},"ARIMA identification",{"type":41,"tag":247,"props":597,"children":598},{},[599],{"type":41,"tag":251,"props":600,"children":602},{"className":601},[],[603],{"type":47,"value":604},"ACF and PACF of the log-differenced series; suggest p, d, q for ARIMA from the spike pattern",{"type":41,"tag":220,"props":606,"children":607},{},[608,613],{"type":41,"tag":247,"props":609,"children":610},{},[611],{"type":47,"value":612},"Multiple series",{"type":41,"tag":247,"props":614,"children":615},{},[616],{"type":41,"tag":251,"props":617,"children":619},{"className":618},[],[620],{"type":47,"value":621},"plot ACF for each region in the 'region' column; compare lag structures side by side",{"type":41,"tag":42,"props":623,"children":625},{"id":624},"assumptions-to-check",[626],{"type":47,"value":627},"Assumptions to Check",{"type":41,"tag":629,"props":630,"children":631},"ul",{},[632,642,652,662,679],{"type":41,"tag":139,"props":633,"children":634},{},[635,640],{"type":41,"tag":54,"props":636,"children":637},{},[638],{"type":47,"value":639},"Stationarity",{"type":47,"value":641}," — ACF and PACF are most interpretable for stationary series (constant mean and variance over time); if the ACF decays very slowly, difference the series first and re-plot",{"type":41,"tag":139,"props":643,"children":644},{},[645,650],{"type":41,"tag":54,"props":646,"children":647},{},[648],{"type":47,"value":649},"Sufficient length",{"type":47,"value":651}," — reliable ACF estimates require at least 50 observations; estimates at long lags (near n/4) are based on few pairs and are noisy",{"type":41,"tag":139,"props":653,"children":654},{},[655,660],{"type":41,"tag":54,"props":656,"children":657},{},[658],{"type":47,"value":659},"Regular spacing",{"type":47,"value":661}," — ACF assumes equally spaced observations; irregular timestamps must be resampled before computing autocorrelations",{"type":41,"tag":139,"props":663,"children":664},{},[665,670,672,677],{"type":41,"tag":54,"props":666,"children":667},{},[668],{"type":47,"value":669},"Linearity",{"type":47,"value":671}," — ACF captures only ",{"type":41,"tag":102,"props":673,"children":674},{},[675],{"type":47,"value":676},"linear",{"type":47,"value":678}," autocorrelation; nonlinear dependence (e.g. volatility clustering in financial data) may not show up in the ACF but will appear in the ACF of squared residuals",{"type":41,"tag":139,"props":680,"children":681},{},[682,687],{"type":41,"tag":54,"props":683,"children":684},{},[685],{"type":47,"value":686},"Outliers",{"type":47,"value":688}," — a single extreme outlier can distort autocorrelation at many lags; identify and handle outliers before interpreting the ACF",{"type":41,"tag":42,"props":690,"children":692},{"id":691},"related-tools",[693],{"type":47,"value":694},"Related Tools",{"type":41,"tag":50,"props":696,"children":697},{},[698,700,706,708,714,716,722,724,730],{"type":47,"value":699},"Use the ",{"type":41,"tag":189,"props":701,"children":703},{"href":702},"/tools/time-series-decomposition",[704],{"type":47,"value":705},"Time Series Decomposition",{"type":47,"value":707}," tool to separate trend, seasonal, and residual components before analyzing the residual ACF structure. Use the ",{"type":41,"tag":189,"props":709,"children":711},{"href":710},"/tools/trendline-calculator",[712],{"type":47,"value":713},"Trendline Calculator",{"type":47,"value":715}," when you just need a trend summary without full ARIMA diagnostics. Use the ",{"type":41,"tag":189,"props":717,"children":719},{"href":718},"/tools/partial-correlation",[720],{"type":47,"value":721},"Partial Correlation Calculator",{"type":47,"value":723}," when you want partial correlations between different variables (cross-series) rather than lags of the same series. Use the ",{"type":41,"tag":189,"props":725,"children":727},{"href":726},"/tools/residual-plot",[728],{"type":47,"value":729},"Residual Plot Generator",{"type":47,"value":731}," to check whether model residuals show remaining autocorrelation after fitting.",{"type":41,"tag":42,"props":733,"children":735},{"id":734},"frequently-asked-questions",[736],{"type":47,"value":737},"Frequently Asked Questions",{"type":41,"tag":50,"props":739,"children":740},{},[741,746,748,753,755,760,762,766,768,773],{"type":41,"tag":54,"props":742,"children":743},{},[744],{"type":47,"value":745},"What is the difference between ACF and PACF?",{"type":47,"value":747},"\nThe ",{"type":41,"tag":54,"props":749,"children":750},{},[751],{"type":47,"value":752},"ACF",{"type":47,"value":754}," at lag k is the raw correlation between the series at time t and time t−k, including both direct and indirect effects through intermediate lags. The ",{"type":41,"tag":54,"props":756,"children":757},{},[758],{"type":47,"value":759},"PACF",{"type":47,"value":761}," at lag k removes the effect of lags 1 through k−1, leaving only the ",{"type":41,"tag":102,"props":763,"children":764},{},[765],{"type":47,"value":106},{"type":47,"value":767}," relationship. In an AR(2) model, for example, the ACF decays gradually over many lags (because lag 1 is correlated with lag 2 through lag 1), while the PACF is non-zero only at lags 1 and 2 and cuts off sharply. Use the ACF and PACF together — the ",{"type":41,"tag":102,"props":769,"children":770},{},[771],{"type":47,"value":772},"pattern of cutoff vs decay",{"type":47,"value":774}," in the two plots identifies the ARIMA order.",{"type":41,"tag":50,"props":776,"children":777},{},[778,783,785,790,792,797,799,804,806,811,813,818,820,825],{"type":41,"tag":54,"props":779,"children":780},{},[781],{"type":47,"value":782},"How do I use ACF/PACF to identify an ARIMA model?",{"type":47,"value":784},"\nThe Box-Jenkins identification rules are: (1) if the ",{"type":41,"tag":54,"props":786,"children":787},{},[788],{"type":47,"value":789},"ACF cuts off",{"type":47,"value":791}," after q lags and the ",{"type":41,"tag":54,"props":793,"children":794},{},[795],{"type":47,"value":796},"PACF decays",{"type":47,"value":798},", the process is MA(q) — set q to the last significant ACF lag; (2) if the ",{"type":41,"tag":54,"props":800,"children":801},{},[802],{"type":47,"value":803},"PACF cuts off",{"type":47,"value":805}," after p lags and the ",{"type":41,"tag":54,"props":807,"children":808},{},[809],{"type":47,"value":810},"ACF decays",{"type":47,"value":812},", the process is AR(p) — set p to the last significant PACF lag; (3) if ",{"type":41,"tag":54,"props":814,"children":815},{},[816],{"type":47,"value":817},"both decay gradually",{"type":47,"value":819},", the process is ARMA(p,q) — try small values of both and compare AIC. Ask the AI to ",{"type":41,"tag":102,"props":821,"children":822},{},[823],{"type":47,"value":824},"\"suggest tentative ARIMA(p,d,q) from the ACF and PACF pattern and fit candidate models\"",{"type":47,"value":826},".",{"type":41,"tag":50,"props":828,"children":829},{},[830,835,837,842,844,849,851,856],{"type":41,"tag":54,"props":831,"children":832},{},[833],{"type":47,"value":834},"My ACF has slowly decaying positive values — what does that mean?",{"type":47,"value":836},"\nA slowly decaying ACF (high positive values for many lags) is the signature of a ",{"type":41,"tag":54,"props":838,"children":839},{},[840],{"type":47,"value":841},"non-stationary series",{"type":47,"value":843}," with a trend or unit root. Apply ",{"type":41,"tag":54,"props":845,"children":846},{},[847],{"type":47,"value":848},"first differencing",{"type":47,"value":850}," (subtract each observation from the previous one) and re-plot the ACF. If it still decays slowly, apply a second difference. The correct differencing order d is the value that produces a stationary ACF. Ask the AI to ",{"type":41,"tag":102,"props":852,"children":853},{},[854],{"type":47,"value":855},"\"plot ACF of the raw series and first- and second-differenced series to determine the differencing order d\"",{"type":47,"value":826},{"type":41,"tag":50,"props":858,"children":859},{},[860,865,867,872,874,879,881,887],{"type":41,"tag":54,"props":861,"children":862},{},[863],{"type":47,"value":864},"What does a spike at lag 12 in monthly data mean?",{"type":47,"value":866},"\nA significant positive spike at lag 12 (and often also at 24, 36) means the series has a ",{"type":41,"tag":54,"props":868,"children":869},{},[870],{"type":47,"value":871},"12-month seasonal cycle",{"type":47,"value":873}," — values are correlated with the value from the same month in the previous year. This is the standard fingerprint of annual seasonality in monthly economic, weather, or sales data. The presence of seasonal spikes means you should either use ",{"type":41,"tag":54,"props":875,"children":876},{},[877],{"type":47,"value":878},"seasonal differencing",{"type":47,"value":880}," (subtract the value 12 periods ago) or include seasonal AR/MA terms — a SARIMA(p,d,q)(P,D,Q)",{"type":41,"tag":882,"props":883,"children":884},"span",{},[885],{"type":47,"value":886},"12",{"type":47,"value":888}," model.",{"type":41,"tag":50,"props":890,"children":891},{},[892,897,899,904],{"type":41,"tag":54,"props":893,"children":894},{},[895],{"type":47,"value":896},"How many lags should I plot?",{"type":47,"value":898},"\nA common rule is to plot lags up to ",{"type":41,"tag":54,"props":900,"children":901},{},[902],{"type":47,"value":903},"n/4",{"type":47,"value":905}," (quarter of the series length) or a domain-relevant maximum. For monthly data with an annual seasonal cycle, plot at least 36 lags (three full seasonal cycles) to see the repeating seasonal spikes clearly. For daily data with a weekly cycle, plot at least 21 lags. For detecting trend-related non-stationarity, even 20–30 lags is usually sufficient to see the slow decay pattern.",{"title":7,"searchDepth":907,"depth":907,"links":908},2,[909,910,911,912,913,914,915,916],{"id":44,"depth":907,"text":48},{"id":130,"depth":907,"text":133},{"id":207,"depth":907,"text":210},{"id":338,"depth":907,"text":341},{"id":494,"depth":907,"text":497},{"id":624,"depth":907,"text":627},{"id":691,"depth":907,"text":694},{"id":734,"depth":907,"text":737},"markdown","content:tools:051.autocorrelation-plot.md","content","tools/051.autocorrelation-plot.md","tools/051.autocorrelation-plot","md",{"loc":4},1775502471825]