Definition
In time-series analysis and monitoring, a window is a time interval (slice) of data that you analyze.
- It defines how much past data you consider when computing a statistic (mean, sum, baseline, anomaly score, etc.).
- Windows can move (rolling/sliding), stay fixed, or expand.
Types of Windows
- Fixed Window
- Always refers to a fixed period, like last 7 days.
- Example: “Compute weekly sales average from Monday–Sunday.”
- Rolling / Sliding Window
- Moves forward in time step by step, recalculating metrics.
- Example: “7-day rolling average of daily temperature.”
- Used for smoothing, anomaly detection, baselines.
- Expanding Window
- Starts at a point in time and grows as more data arrives.
- Example: “Cumulative average sales from product launch to today.”
Example
rolling baseline (last N weeks) vs current (last 24h–7d)
- Baseline Window (last N weeks):
- A rolling/sliding window of N weeks, computing the historical average.
- Used as the “normal” reference.
- Current Window (last 24h–7d):
- A short, recent window.
- Used to see if current behavior deviates from the baseline.
Example (API monitoring)
- Rolling baseline (last 8 weeks) → avg latency = 200 ms.
- Current window (last 24h) → avg latency = 350 ms.
- Since 350 ms >> 200 ms, this flags performance degradation.
Summary:
A window is a chosen time interval of data for calculating metrics.
- Windows let you compare recent trends vs. historical baselines.
- Main types: fixed, rolling, expanding.
