<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Elif Bayındır on Medium]]></title>
        <description><![CDATA[Stories by Elif Bayındır on Medium]]></description>
        <link>https://medium.com/@elif.bayindir1?source=rss-44a86f423e4e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*gDoMVzxlxiylE8aMnVnhEQ.png</url>
            <title>Stories by Elif Bayındır on Medium</title>
            <link>https://medium.com/@elif.bayindir1?source=rss-44a86f423e4e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 12:15:50 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@elif.bayindir1/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Part 5 — Choosing a Forecasting Method]]></title>
            <link>https://medium.com/@elif.bayindir1/part-5-choosing-a-forecasting-method-fa344079e65f?source=rss-44a86f423e4e------2</link>
            <guid isPermaLink="false">https://medium.com/p/fa344079e65f</guid>
            <category><![CDATA[time-series-forecasting]]></category>
            <category><![CDATA[forecasting]]></category>
            <category><![CDATA[time-series-analysis]]></category>
            <dc:creator><![CDATA[Elif Bayındır]]></dc:creator>
            <pubDate>Mon, 12 Oct 2026 08:36:20 GMT</pubDate>
            <atom:updated>2026-10-12T08:36:20.887Z</atom:updated>
            <content:encoded><![CDATA[<p>Before picking a forecasting method, there’s a more fundamental question: what data do you actually have?</p><p>If the answer is “none”, or the data you have isn’t relevant to what you’re trying to predict, then statistical models are off the table entirely. This is more common than it sounds. Forecasting sales for a product that doesn’t exist yet, estimating demand in a market you’ve never operated in, or predicting behaviour after a major structural change all fall into this category. In these cases, you’re not guessing, there are structured approaches for forecasting without historical data, relying on expert judgment, analogies, and scenario thinking. But that’s a different toolbox.</p><p>When relevant historical data is available, and when it’s reasonable to assume that past patterns carry some signal about the future, quantitative methods come into play.</p><h3>Two kinds of data, two different questions</h3><p>Most quantitative forecasting problems work with one of two data types.</p><p><strong>Cross-sectional data</strong> is a snapshot, observations collected at a single point in time across many units. Think of a survey of household incomes, or a dataset of apartment prices across a city. It’s useful for understanding relationships and making comparisons, but it doesn’t tell you anything about how things change over time.</p><p><strong>Time series data</strong> is sequential, the same variable measured repeatedly at regular intervals. Daily temperatures, monthly sales figures, hourly website traffic. If you’re trying to forecast the future value of something, this is almost always what you’re working with.</p><h3>The question behind the model</h3><p>Once you have time series data, there’s still a choice to make: do you forecast based purely on the variable’s own past, or do you bring in external factors?</p><p>A pure time series model only looks inward. It asks: given how this variable has behaved in the past, what comes next? This works surprisingly well for many problems, especially when the patterns are stable and the external drivers are hard to measure or forecast themselves.</p><p>An explanatory model takes a different approach. Instead of asking what happened before, it asks what causes the variation. If you’re forecasting whether to carry an umbrella tomorrow, temperature and cloud cover are better predictors than yesterday’s umbrella usage. The model tries to capture the relationship between the outcome and the factors that drive it.</p><p>In practice, the choice isn’t always obvious. Explanatory models are more informative, they tell you <em>why</em>, not just <em>what</em>. But they come with a catch: you need to know or forecast the predictor variables too. If those are hard to get, or if the causal structure isn’t well understood, a simpler time series model often wins on accuracy.</p><p>There’s also a middle ground, mixed models that combine both approaches, using past values of the variable alongside external predictors. These are powerful but require more data and more careful handling.</p><p>The honest answer is that no single method is always best. The right choice depends on what data is available, how well the underlying system is understood, and what the forecast is actually for. A model that works beautifully for next week’s sales will likely fall apart when asked to say something about next year’s market share.</p><p>That’s not a flaw in forecasting; it’s just the nature of it.</p><p><em>Hyndman, R.J. &amp; Athanasopoulos, G. (2021). Forecasting: Principles and Practice, 3rd ed., Chapter 1. OTexts. </em><a href="https://otexts.com/fpp3/"><em>https://otexts.com/fpp3/</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fa344079e65f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Part 4 — What Is Forecasting, Really?]]></title>
            <link>https://medium.com/@elif.bayindir1/part-4-what-is-forecasting-really-c54dca9b19b4?source=rss-44a86f423e4e------2</link>
            <guid isPermaLink="false">https://medium.com/p/c54dca9b19b4</guid>
            <category><![CDATA[time-series-forecasting]]></category>
            <category><![CDATA[forecasting]]></category>
            <dc:creator><![CDATA[Elif Bayındır]]></dc:creator>
            <pubDate>Sun, 11 Oct 2026 07:05:35 GMT</pubDate>
            <atom:updated>2026-10-11T07:05:35.010Z</atom:updated>
            <content:encoded><![CDATA[<p>Forecasting gets misunderstood more often than it deserves. It’s treated as a magic number that justifies a decision already made, or worse, is confused with the goal itself.</p><p><strong>Forecasting</strong> is predicting the future as accurately as possible, given the available data and any known future events. <strong>Goals</strong> are what you’d like to happen. <strong>Planning</strong> is how you close the gap between the two. They’re related, but they’re not the same thing, and treating them as identical is where a lot of organisational decision-making goes wrong.</p><h3>What can actually be forecast?</h3><p>Some things are highly predictable. How long it takes you to commute on a Tuesday morning, how many coffees a café sells before noon, how quickly a supermarket runs out of bread before a snowstorm. Others are essentially random, whether your freelance client will pay on time this month, or what a cryptocurrency will be worth tomorrow. The difference isn’t about effort or model complexity.</p><p>It comes down to four things:</p><ol><li>how well we understand the underlying drivers,</li><li>how much historical data is available,</li><li>how stable the relationship between past and future is,</li><li>whether the forecast itself changes the thing being forecast.</li></ol><p>That last point is worth sitting with. Think about restaurant reviews: if a food critic publishes a glowing forecast that a new place will become the hottest spot in town, people flood in, and it becomes exactly that. The forecast shaped the outcome. Exchange rates work the same way at a larger scale: the moment a credible prediction circulates, traders adjust, and the forecast gets priced in before it can come true. The coin-flip analogy holds, not because we lack data, but because the system responds to our predictions.</p><p>Your morning commute, on the other hand, behaves well. You know the route, you have months of personal experience, the patterns are stable, and your individual estimate doesn’t change traffic. All four conditions are roughly met, which is why “it usually takes me 35 minutes on a Tuesday” is a perfectly reasonable forecast.</p><h3>Basic Questions to be Asked</h3><p>Before building any model, you need to answer some basic questions: Are you forecasting total sales, or sales per product? For one region, or every store individually? Are you projecting sales for the upcoming month or the upcoming decade? These sound like admin decisions, but they’re not. The answers determine which methods are even usable. A model that works well for short-term predictions will often fall apart when stretched to long horizons.</p><p>There’s also a less glamorous side to forecasting that doesn’t get talked about enough: a lot of the actual work is just finding the right data. It usually exists somewhere, in a spreadsheet, a database, a government archive. Getting it into a usable shape is often where most of the time goes.</p><p>What I find useful about this framing is the honesty about limits. Good forecasting isn’t about predicting everything it’s about knowing which patterns in historical data are genuine and which are noise, and being clear about where the boundary of predictability lies. That’s harder than it sounds, and more useful than pretending the boundary doesn’t exist.</p><p><em>Hyndman, R.J. &amp; Athanasopoulos, G. (2021). Forecasting: Principles and Practice, 3rd ed., Chapter 1. OTexts. </em><a href="https://otexts.com/fpp3/"><em>https://otexts.com/fpp3/</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c54dca9b19b4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Part 3 — Nature of Time Series Models]]></title>
            <link>https://medium.com/@elif.bayindir1/part-3-nature-of-time-series-models-95c245cba56b?source=rss-44a86f423e4e------2</link>
            <guid isPermaLink="false">https://medium.com/p/95c245cba56b</guid>
            <category><![CDATA[time-series-data]]></category>
            <category><![CDATA[time-series-forecasting]]></category>
            <category><![CDATA[timeseries]]></category>
            <dc:creator><![CDATA[Elif Bayındır]]></dc:creator>
            <pubDate>Sat, 10 Oct 2026 13:42:47 GMT</pubDate>
            <atom:updated>2026-10-10T13:42:47.866Z</atom:updated>
            <content:encoded><![CDATA[<p>In the previous section we explored the <strong>structural properties of time series. </strong>Now, we will discuss one of the most useful techniques for analysing time series, the moving average.</p><p>Now we move one step further and ask a practical question:</p><p><strong>How can we make forecasts without using machine learning?</strong></p><p>Before jumping into modern models, it is important to understand the <strong>intuition behind time series forecasting</strong>.</p><p>In this article we will explore several simple approaches:</p><ul><li>Moving averages</li><li>Weighted averages</li><li>Trend extrapolation</li></ul><p>These methods are simple, but they reveal an important idea: Future values often depend on past observations.</p><p>To illustrate these ideas, consider the following example. Suppose we observe <strong>hourly electricity demand</strong> in a city over several days.</p><p>Electricity demand typically shows patterns such as:</p><ul><li>higher demand during the day</li><li>lower demand at night</li><li>repeating patterns across days</li></ul><p>This means the series may contain:</p><ul><li>seasonality</li><li>short-term fluctuations</li><li>possibly a trend</li></ul><p>Below is a visualization of hourly electricity demand over several days.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/989/0*Afvna7GIzevtwP-y.png" /></figure><p>From the graph, we may observe a repeating daily pattern and fluctuations around that pattern. At first glance there is no obvious long-term trend, but visual inspection alone is not enough to determine whether the series is stationary.</p><h3>Forecasting Goal</h3><p>Suppose our goal is to estimate: Electricity demand at the <strong>next hour</strong>.</p><p>To do this, we can start by using <strong>past observations</strong>.</p><h3>A Fundamental Intuition in Time Series</h3><p>Many time series models rely on the idea that: The current value depends on previous observations. In other words, past values contain information about the future.</p><p>For example:</p><ul><li>the last few hours</li><li>the same hour yesterday</li><li>recent trends</li></ul><p>can all help us estimate the next value.</p><h3>Using Past Observations</h3><p>There are several intuitive approaches we can try.</p><p>For example:</p><p>1️⃣ Take the <strong>average of recent observations</strong></p><p>2️⃣ Give <strong>more weight to recent values</strong></p><p>3️⃣ Use the <strong>recent growth or decline rate</strong></p><p>We begin with the simplest approach.</p><h3>Moving Average</h3><p>A <strong>moving average</strong> estimates the next value using the average of the last k observations.</p><p>y^t=1k∑n=1kyt−n\hat{y}_t = \frac{1}{k} \sum_{n=1}^{k} y_{t-n}</p><p>where:</p><ul><li>kk is the window size</li><li>yt−ny_{t-n} are past observations</li></ul><p>Moving averages are primarily used for <strong>smoothing time series</strong>, but they can also be used for simple forecasts.</p><h4>Example</h4><p>Below we compute a moving average with a window size of <strong>4 hours</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/831/0*ZJUe-PSRDvMEb6EV.png" /></figure><p>We observe that the moving average:</p><ul><li>reduces short-term fluctuations</li><li>produces a smoother curve</li></ul><p>This helps reveal the <strong>underlying pattern</strong> of the data.</p><h3>Window Size</h3><p>The window size determines how many past observations are used.</p><p>For example, window = 4 &amp; window = 10</p><p>A larger window produces a smoother curve. However, there is an important consequence. Larger windows respond more slowly to changes.</p><p>This phenomenon is called a <strong>lagging indicator</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/831/0*_KynrTRnFJ7e-fzd.png" /></figure><p>With a larger window:</p><ul><li>the curve becomes smoother</li><li>but it reacts <strong>more slowly to new changes</strong></li></ul><p>This creates a lag relative to the actual data.</p><h3>Limitations of Moving Averages</h3><p>Moving averages treat all past observations equally. But in many real situations, recent observations are more informative than older ones.</p><p>This leads to a natural idea. Instead of equal weights, we can assign <strong>different weights</strong> to past observations.</p><h3>Weighted Average</h3><p>A weighted average assigns different importance to past values.</p><p>y^t=∑n=1kωnyt+1−n\hat{y}_t = \sum_{n=1}^{k} \omega_n y_{t+1-n}</p><p>where the weights satisfy:</p><p>∑n=1kωn=1\sum_{n=1}^{k} \omega_n = 1</p><p>Recent observations typically receive <strong>higher weights</strong>.</p><p><strong>Example:</strong></p><p>Suppose the last three electricity demand observations were:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1023/0*LeHM3KKfd7KN-L_E.png" /></figure><h4>Moving Average Forecast</h4><p>(210 + 195 + 180)/3 → <strong>Result</strong>: 195</p><p><strong>Error</strong>: 195 − 170 = 25</p><h4>Weighted Average Forecast</h4><p>Weights: 0.1, 0.3, 0.6</p><p>210×0.1 + 195×0.3 + 180×0.6 → <strong>Result</strong>: 186</p><p><strong>Error</strong>: 186 − 170 = 16</p><p>Weighted averages perform better here because <strong>recent observations contain more information about the immediate future</strong>.</p><h3>When These Methods Fail</h3><p>If the data contains:</p><ul><li>strong trend</li><li>strong seasonality</li></ul><p>simple averaging methods may perform poorly.</p><p>These techniques work best when the time series is <strong>approximately stationary</strong>.</p><h3>Using Recent Percentage Changes</h3><p>Instead of averaging past observations, another simple approach is to examine the <strong>rate of change </strong>between observations.</p><p>We can compute the percentage changes of Figure 4:</p><p>195−210210=−7.1%\frac{195–210}{210} = -7.1\% (3rd obs. to 2nd obs.)</p><p>180−195195=−7.7%\frac{180–195}{195} = -7.7\% (2nd obs. to 1st obs.)</p><p>Average rate of change:</p><p>(−7.1%+−7.7%)/2=−7.4%(-7.1\% + -7.7\%) / 2 = -7.4\%</p><p>We can apply this average decline to estimate the next value:</p><p>180×(1−0.074)=166.7180 \times (1–0.074) = 166.7</p><p><strong>Actual value:</strong> 170</p><p><strong>Prediction:</strong> 166.7</p><p><strong>Error:</strong> 3.3</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/521/0*QauRSfdcAwwq5MQR.png" /></figure><p>This approach can sometimes outperform simple averaging when the series exhibits a <strong>consistent upward or downward movement</strong>.</p><p>This approach is sometimes called: <strong>trend extrapolation</strong> or <strong>growth-rate modeling</strong>.</p><h3>Next Step</h3><p>In the next article we will explore smoothing methods.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=95c245cba56b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Part 2 - Expected Value in Time Series]]></title>
            <link>https://medium.com/@elif.bayindir1/expected-value-in-time-series-a229a891580a?source=rss-44a86f423e4e------2</link>
            <guid isPermaLink="false">https://medium.com/p/a229a891580a</guid>
            <category><![CDATA[timeseries]]></category>
            <category><![CDATA[time-series-analysis]]></category>
            <category><![CDATA[expected-value]]></category>
            <dc:creator><![CDATA[Elif Bayındır]]></dc:creator>
            <pubDate>Fri, 09 Oct 2026 14:45:24 GMT</pubDate>
            <atom:updated>2026-10-10T13:40:22.591Z</atom:updated>
            <content:encoded><![CDATA[<p>In time series analysis, many core definitions rely on one central quantity: <strong>E[Y_t]</strong></p><p>To understand stationarity properly, we first need to define what this means.</p><h3>Expected Value: Formal Definition</h3><p>A <a href="https://en.wikipedia.org/wiki/Random_variable"><strong>random variable</strong></a> is a numerical outcome of a random process.</p><p>If Y is a discrete random variable with probability distribution P(Y=y), its expected value is defined as:</p><p>𝔼[Y]=∑y⋅P(Y=y)</p><p>This is the probability-weighted average of all possible values the variable can take.</p><p>It represents the <strong>long-run average</strong> implied by the underlying probability distribution.</p><h3>Example: Rolling a Fair Die</h3><p>Let Y be the number that appears when rolling a fair die.</p><p>Each outcome has probability 16\frac{1}{6}</p><p>Then, 𝔼[Y]=1⋅16+2⋅16+⋯+6⋅16\mathbb{E}[Y] = 1\cdot\frac{1}{6} + 2\cdot\frac{1}{6} + \dots + 6\cdot\frac{1}{6}=3.5 = 3.5</p><p>The value 3.5 never appears on the die. But if we roll the die many times, the average of observed outcomes will approach 3.5.</p><p>Expected value does <strong>not</strong> represent a typical single observation. It represents the average level implied by the random mechanism.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*VZ-rY7Hsq7p0Hd8C.png" /></figure><p><strong>Figure 1.</strong> Convergence of the sample mean to the expected value (3.5) as the number of die rolls increases.</p><p>The numbers we multiply by probabilities are the numerical values of the random variable itself. We could define a different random variable. For example, 1 if the result is even and 0 otherwise, the expected value would be different. Expected value depends entirely on how the random variable is defined.</p><h3>Linearity of Expectation</h3><p>The expected value operator is linear.</p><p>For random variables X and Y:</p><p>𝔼[X+Y]=𝔼[X]+𝔼[Y]</p><p>If cc is a constant:</p><p>𝔼[cX]=c𝔼[X]If aa is a constant number:</p><p>𝔼[a+X]=a+𝔼[X]</p><p>This property makes expectations easy to compute in time-series models.</p><h3>Expected Value in Time Series</h3><p>In time series, observations are written as: Y_t</p><p>Here, each time index t corresponds to a random variable.</p><p>Even though we observe a single historical sequence, each Y_t is modeled as the outcome of an underlying stochastic process.</p><p>The expected value at time t is: 𝔼[Yt]</p><p>This represents the theoretical mean of the process. The observed value may fluctuate around this level due to random errors.</p><h3>One Realization vs The Underlying Process</h3><p>In practice, we observe one historical path: Y1,Y2,…,YnY_1, Y_2, \dots, Y_n</p><p>But conceptually, time series theory treats these as one realization of a stochastic process.</p><p>At each time point, there is uncertainty.</p><ul><li>The <strong>observed value</strong> (y_t) is one draw from an underlying distribution.</li><li>The <strong>expected value</strong> describes the mean of that distribution, not merely the single observed outcome.</li></ul><p>This distinction becomes important when defining stationarity.</p><h3>Expected Value and Stationarity</h3><p>A time series is <strong>weakly stationary</strong> if its mean does not change over time:</p><p>𝔼[Yt]=μ for all t</p><p>The expected value is constant.</p><p>If instead, 𝔼[Yt]=μ+βt</p><p>Then the expected value depends on time. The mean drifts upward or downward. In that case, the series is not stationary.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*2PsLAszRk3VLxicF.png" /></figure><p><strong>Figure 2. </strong>A stationary process with constant expected value (green) versus a process with a time-varying expected value due to a trend (orange).</p><p>The sample mean is computed from observed data: Y‾=1n∑t=1nYt\bar{Y} = \frac{1}{n}\sum_{t=1}^{n} Y_t</p><p>The sample mean estimates the expected value, but they are not the same object. We use the data to approximate 𝔼[Yt], because the true expected value is not directly observable.</p><h3>Example 1</h3><p>Suppose, Yt=5+ϵt</p><p>where ϵt is a random error with mean zero, 𝔼[ϵt]=0\mathbb{E}[\epsilon_t] = 0</p><p>Then, 𝔼[Yt]=𝔼[5+ϵt]=5+𝔼[ϵt]= 5</p><p>The expected value is constant. The mean is constant.</p><h3>Example 2</h3><p>Now suppose, Yt=5+t+ϵt</p><p>Then, 𝔼[Yt]=5+t+𝔼[ϵt]=5+t</p><p>The expected value depends on time. The series has a deterministic trend and is not stationary.</p><h3>Example 3</h3><p>Suppose daily video views at 14:00 average 150,000 and remain stable across years.</p><p>Then, 𝔼[Yt]=150,000</p><p>The mean is constant.</p><p>Now suppose that in 2017 the average was 150,000, but in 2018 it increased to 300,000. Then the expected value depends on time. There is a trend. The series is not stationary.</p><h3>Variance and Stationarity</h3><p>Weak stationarity requires not only a constant mean but also constant variance.</p><p>Formally: Var(Yt)=σ2 for all t</p><p>This means the magnitude of fluctuations does not systematically grow or shrink over time.</p><p>Adding a constant does not change variance: Var(a+X)=Var(X)</p><p>So in the model, Yt=5+ϵtY_t = 5 + \epsilon_t</p><p>We have, Var(Yt)=Var(ϵt)</p><p>If Var(ϵt)=σ^2</p><p>then, Var(Yt)=σ^2</p><p>The variance remains constant, it is time-invariant. However, if the variance increases over time (for example, volatility grows with t), the process is not weakly stationary.</p><h3>Next</h3><p>In the next post, we will move from theoretical expected values to practical estimation tools, beginning with moving averages and weighted averages in time series.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a229a891580a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Time Series Forecasting Fundamentals — Part 1]]></title>
            <link>https://medium.com/@elif.bayindir1/time-series-forecasting-fundamentals-part-1-043339a79e1a?source=rss-44a86f423e4e------2</link>
            <guid isPermaLink="false">https://medium.com/p/043339a79e1a</guid>
            <category><![CDATA[time-series-data]]></category>
            <category><![CDATA[towards-data-science]]></category>
            <category><![CDATA[timeseries]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Elif Bayındır]]></dc:creator>
            <pubDate>Fri, 05 Jun 2026 13:19:30 GMT</pubDate>
            <atom:updated>2026-06-05T13:19:30.237Z</atom:updated>
            <content:encoded><![CDATA[<p>Before building any forecasting model, you need to understand what kind of structure you are dealing with.</p><p>A time series is simply data ordered in time.</p><p>But what makes it different from classical datasets is this:</p><p>In many datasets, observations can be independent. In time series, observations are usually dependent on previous values.</p><p>Yesterday influences today. This dependency fundamentally changes how we model and forecast such data.</p><p>Let’s build intuition step by step.</p><h3>What Does a Time Series Look Like?</h3><p>Below is a real-world example: weekly atmospheric CO₂ measurements from the Mauna Loa Observatory (1958–2001).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1023/0*q_wMKoky3iWPQ8ge.png" /></figure><p>What do you see?</p><ul><li>A long-term upward movement.</li><li>A repeating yearly pattern.</li></ul><p>Already, we are observing two fundamental components: <strong>trend</strong> and <strong>seasonality</strong>.</p><h3>Trend</h3><p>A trend is the <strong>long-term increase</strong> or <strong>decrease</strong> in a time series.</p><p>It does not have to be linear. Trends can also be exponential, logarithmic, or follow other nonlinear patterns. What matters is not the shape of the curve, but the presence of a sustained long-term directional movement.</p><p>Let’s look at an example.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1023/0*J26us2clz5amw458.png" /></figure><p><strong>Figure 2.</strong> Annual Nile River flow (1871–1912). The series exhibits a sustained downward trend over time.</p><p>This series gradually declines over decades. That is a decreasing trend.</p><p>If the average level of the series moves upward or downward over time, a trend exists. When a trend is present, the series is usually <strong>not stationary</strong>.</p><h3>Seasonality</h3><p><a href="https://en.wikipedia.org/wiki/Seasonality">Seasonality</a> refers to patterns that repeat at <strong>fixed intervals</strong>.</p><p>The key characteristic: The period is constant.</p><p>Examples from real life:</p><ul><li>Ice cream sales increase every summer.</li><li>Restaurant bookings rise every weekend.</li><li>Electricity consumption increases every evening.</li></ul><p>Let’s look at another dataset that clearly illustrates seasonality.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_ucIUKm7YB6QqI5L.png" /></figure><p><strong>Figure 3. </strong>Monthly airline passenger counts (1949–1960), illustrating a clear annual seasonal pattern with recurring peaks each year.</p><p>Passenger volume increases every summer, showing a clear repeating annual seasonal pattern.</p><p>Seasonality is often calendar-based. It aligns with time units such as days, weeks, months, or years.</p><h3>Cycle</h3><p>A cycle is a pattern of long-term rises and falls in a time series that <strong>does not repeat at a fixed or predictable period</strong>.</p><p>Cycles are often driven by structural forces such as economic crises, political shifts, regulatory changes, or global events like pandemics. They unfold over longer horizons and tend to be stochastic.</p><p>Now look at this dataset:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Uu1SoyJ7bIhd_VGG.png" /></figure><p><strong>Figure 4. </strong>Real private investment (quarterly, billions of dollars), illustrating irregular cyclical fluctuations driven by economic expansions and recessions.</p><p>Unlike seasonality, which repeats at fixed calendar intervals, economic cycles are driven by structural forces such as recessions and expansions. In the investment series above, we can observe irregular downturns in the mid-1970s, during the 1980–82 recession, in the early 1990s, and most dramatically during the 2008 financial crisis. These contractions occur at unpredictable intervals and are not tied to the calendar. Instead, they reflect broader economic dynamics unfolding over longer and uncertain horizons. This irregular, non-calendar-based fluctuation is what defines cyclical behavior.</p><h3>Stationarity</h3><p>This is one of the most important concepts in time series analysis.</p><p>A time series is called <strong>stationary</strong> if its statistical properties do not change over time.</p><p>More precisely:</p><ul><li>The mean remains constant.</li><li>The variance remains constant.</li><li>The covariance structure does not change over time.</li></ul><p>Let’s compare visually.</p><h3>Stationary vs Non-Stationary</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*gfNXSwMBnCrPW_dG.png" /></figure><p><strong>Figure 5. </strong>Stationary series (constant mean and variance) on the left; non-stationary series (changing mean and variance) on the right.</p><p>In the stationary case, the series fluctuates around a stable level. Its average does not drift over time, the variability remains roughly constant, and the overall structure looks similar from beginning to end.</p><p>In contrast, the non-stationary series behaves differently. The average gradually shifts upward, the magnitude of fluctuations increases, and the underlying structure evolves over time. Because its statistical properties change, it no longer behaves in a stable way.</p><p>This is what we call non-stationary behavior.</p><p>A useful intuition:</p><p>If the “behavior regime” of the series changes over time, the series is not stationary. When a series is stationary, its future behavior is easier to model — its statistical structure remains stable.</p><h3>A Small Note on Differencing</h3><p>If a series is not stationary, one common approach is to look at changes between consecutive observations.</p><p>For example, instead of looking at the value on Monday, we look at: Monday − Sunday.</p><p>This transformation often removes linear trend components and stabilizes the mean.</p><p>This is called taking the <strong>first difference</strong>. ΔYt=Yt−Yt−1\Delta Y_t = Y_t — Y_{t-1}</p><p>It does not solve everything, but it is often the first step when non-stationarity is observed.</p><p>Important nuance: Non-stationary series can still be forecasted.</p><p>However, many classical approaches work more reliably once the series is stabilized.</p><h3>Bringing It All Together</h3><p>When you look at any time series, ask four questions:</p><ol><li>Is there a long-term direction? (Trend)</li><li>Does a pattern repeat at fixed intervals? (Seasonality)</li><li>Are there longer irregular waves? (Cycle)</li><li>Do the statistical properties stay constant? (Stationarity)</li></ol><p>These are not modeling techniques. They are diagnostic lenses. Without them, forecasting becomes guesswork.</p><p>Next, we will go deeper into one specific concept that sits at the heart of stationarity: <strong>Expected Value in Time Series.</strong></p><p>You can access the Google Colab notebook used to generate the figures here: 🔗 <a href="https://colab.research.google.com/drive/18lD_zJyJ6Q0rCiJld1LZwSRscCcSFM4d#scrollTo=vwf-CnpRO83x">Open the Colab Notebook</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=043339a79e1a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>