You've plotted the messy reality of your time series data. Now, let's squint through the noise and try to find some order in the chaos. Even the most erratic systems often hide underlying patterns. In time series analysis, we're particularly interested in two key components: trends and seasonality.
A trend is a long-term movement in the data. Is your "relationship happiness score" generally going down over time (a downward trend, as is statistically probable)? Is your screen time slowly but surely creeping upwards? Trends indicate a fundamental shift in the system's average level.
Seasonality (or cycles) refers to patterns that repeat at fixed intervals. Maybe your existential dread spikes every Monday morning, or your screen time peaks predictably on weekends. These are recurring, predictable fluctuations. Identifying these patterns is like finding the rhythm of your suffering – it might not make it stop, but at least you know when to brace yourself.
Let's look at our hypothetical happiness data again and try to visually identify any trends or cycles.
A trend is a persistent, long-term increase or decrease in the mean level of a time series over time. It can be linear (a straight line) or non-linear.
Visually, a trend is the general direction the line plot is heading. In our visualization, you can observe a general downward movement in the happiness score over the weeks. This suggests a negative trend.
Mathematically, a simple linear trend can be represented as $y_t = a + bt + \epsilon_t$, where $a$ is the intercept, $b$ is the slope (indicating the rate of change), and $\epsilon_t$ is the random error. A negative $b$ indicates a downward trend.
The dashed green line in the visualization is a simple visual representation of the overall downward trend in the data.
Seasonality refers to patterns that repeat at fixed intervals within a time series. These intervals are often related to calendar periods (e.g., daily, weekly, monthly, yearly).
In our relationship happiness example, we don't have enough data points or a clear repeating pattern within this short period to definitively identify strong seasonality. However, if the score consistently dropped mid-week and rose on weekends, that would suggest a weekly seasonal pattern.
Mathematically, seasonality can be incorporated into models using dummy variables or trigonometric functions that capture the repeating pattern.
While not explicitly visualized as a separate component here, visually inspecting the plot for regular ups and downs is the first step in identifying potential seasonality.
A common approach in time series analysis is to decompose the series into its main components: Trend, Seasonality, and Residuals (the random, unpredictable part).
Additive Model: $y_t = \text{Trend}_t + \text{Seasonality}_t + \text{Residuals}_t$
Multiplicative Model: $y_t = \text{Trend}_t \times \text{Seasonality}_t \times \text{Residuals}_t$
By separating these components, we can better understand the underlying forces driving the system's behavior and potentially model them more effectively. The residuals represent the truly random, unpredictable fluctuations – the chaos that remains after accounting for the patterns.