Course contentsShow
← Data Science
Lesson 746 of 2,14519. Time Series FoundationsFree lesson

Choosing Seasonal Period

Identifying the correct seasonal period from data frequency and domain knowledge.

Choosing Seasonal Period

What you'll learn: How to identify the correct seasonal period based on your data's frequency and domain knowledge.

Understanding Seasonal Period

The seasonal period is the number of observations it takes for a seasonal pattern to complete one full cycle and repeat. Choosing the right period is crucial because it tells your decomposition model where to look for repeating patterns.

Think of it like knowing when to expect holidays: if you're tracking retail sales, you need to tell the model "look for patterns every 12 months" so it can recognize that December spike happens annually.

Matching Period to Data Frequency

Your seasonal period depends on your data's granularity and the natural cycle of the phenomenon:

  • Monthly data with yearly seasonality → period = 12
  • Quarterly data with yearly seasonality → period = 4
  • Daily data with weekly seasonality → period = 7
  • Hourly data with daily seasonality → period = 24
  • Hourly data with weekly seasonality → period = 168 (24 × 7)

Using Domain Knowledge

Sometimes the "correct" period isn't obvious from the data alone. Domain expertise helps you decide:

  • Electricity demand might show daily (24-hour) and weekly (168-hour) patterns
  • Website traffic could have both weekly patterns and monthly billing-cycle effects
  • Agricultural data might follow growing seasons that vary by region

The period you choose should match the business question. If you're studying weekly shopping habits, use period=7 even if monthly patterns also exist.

Testing Your Choice

After choosing a period, visually inspect the decomposition. Does the seasonal component look regular and interpretable? If not, you may need to adjust the period or consider multiple seasonal patterns.

Key Takeaway: The seasonal period must align with both your data's frequency (observations per cycle) and the real-world rhythm of the process you're modeling—getting this right is essential for meaningful decomposition.