0% found this document useful (0 votes)
15 views

M1_L1 (Introduction, Applications)

Uploaded by

shivansh9tamta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

M1_L1 (Introduction, Applications)

Uploaded by

shivansh9tamta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 39

A Time Series is a set of observations that are collected after regular intervals of time.

If plotted, the Time


series would always have one of its axes as time.

Time Series Analysis considers data collected over time might have some structure; hence it analyses Time Series
data to extract its valuable characteristics.
What Are the Different Components of Time Series Analysis?
Example of Time Series Data:
Example of Time Series Data:
Example of Time Series Data:
Example of Time Series Data:
The importance of time series analysis for science, industry, and commerce

1.The study of past history is necessary for forecasting future events.

2.Time series analysis shows why trends exist in past data and how they may be explained by underlying
patterns or processes.

3.Time series analysis is a basic tool for the analysis of natural systems, which cannot be understood
without it. For example, climate cycles and fluctuations in the economy, as well as volcanic eruptions and
earthquakes, are examples of natural systems, whose behavior can best be studied using time series
analysis.
Applications

Weather data

Stock prices
Quarterly Rainfall
sales measurement

Industry forecasts
Applications

Interest rates
Brain Temperature
monitoring readings

Heart rate
monitoring
Non- Stationary Time Series Data
Seasonality
Trend Irregularity
Stationary Time Series Data

Stationary data refers to


the time series data that mean
and variance do not vary across
time.

As shown in the picture above from only (b) and (g) are considered
stationary.
Clear Trend observed: a, c, e, f, i Clear Seasonality observed: d, h, i
Is Stationarity important for time series analysis?

 In most cases it is important. This is because much statistical analysis or


model is built upon the assumption that mean and variance are
consistent over time.

 When we fit a stationary model to the time series data that we want to
analyze, we should detect the stationarity of the data and remove the
trend/seasonality effect from the data.
Many current time series models like ARIMA have
options to include steps to convert the original data
into stationary data
How do we know whether the data is
stationary?

What can I do if my data is non-stationary?


Notes:

What is Time Series Analysis?


Time-series analysis is a method of analyzing a collection of data points over a period of time. Instead of recording
data points intermittently or randomly, time series analysts record data points at consistent intervals over a set period
of time.
Time-Series Data / Time-Dependent Data:
With the amount of data present in today’s business world, it is easy to keep
track of changes in patterns and trends. Stocks, sales, and census all have one
thing in common, their data, which changes according to time, and hence, it is
called time-series data.
Given time-dependent data, you can analyze the past to predict the future. The
future prediction will also include time as a variable, and the output will vary
with time. Using time-dependent data, you can find patterns that repeat over
time.

Example: Consider the running of a bakery. Given the data of the past few months, you can predict what items you
need to bake at what time. The morning crowd would need more bread items, like bread rolls, croissants, breakfast
muffins, etc. At night, people may come in to buy cakes and pastries or other dessert items. Using time series analysis,
you can predict items popular during different times and even different seasons.
Notes:

What Are the Different Components of Time Series Analysis?


The diagram depicted below shows the different components of Time Series Analysis:

1.Trend: The Trend shows the variation of data with time or the frequency of data. Using a Trend, you can see how your
data increases or decreases over time. The data can increase, decrease, or remain stable. Over time, population, stock
market fluctuations, and production in a company are all examples of trends.

2.Seasonality: Seasonality is used to find the variations which occur at regular intervals of time. Examples are festivals,
conventions, seasons, etc. These variations usually happen around the same time period and affect the data in specific
ways which you can predict.
Notes:

What Are the Different Components of Time Series Analysis?

3. Irregularity: Fluctuations in the time series data do not correspond to the trend or seasonality. These variations in your
time series are purely random and usually caused by unforeseeable circumstances, such as a sudden decrease in
population because of a natural calamity.

4. Cyclic: Oscillations in time series which last for more than a year are called cyclic. They may or may not be periodic.

5. Stationary: A time series that has the same statistical properties over time is stationary. The properties remain the same
anywhere in the series. Your data needs to be stationary to perform time-series analysis on it. A stationary series has a
constant mean, variance, and covariance.

Why Do We Need Time-Series Analysis?


Time series analysis has a range of applications in statistics, sales, economics, and many more areas. The common point
is the technique used to model the data over a given period of time.

The reasons for doing time series analysis are as follows:


• Features: Time series analysis can be used to track features like trend, seasonality, and variability.
• Forecasting: Time series analysis can aid in the prediction of stock prices. It is used if you would like to know if the
price will rise or fall and how much it will rise or fall.
• Inferences: You can predict the value and draw inferences from data using Time series analysis.
Notes:

How To Understand A Time Series?


The preliminary step in understanding a time series is its visualization. The time-series visualization plots data points on
the y-axis w.r.t time on the x-axis. The graph may show some of the following features:
1. Trend: A trend is a long-running pattern of time series. It may be upwards or downwards.
2. Seasonality: The repetitive patterns at certain times of year are called seasonality. For example, sales of cakes will
peak every December in the US because of Christmas.
3. Cyclical pattern: The data shows fluctuations at any time of the year.

As shown in Figure 1, there is an upward trend in the graph, and there


is a repetitive pattern every year representing seasonality. Removing
trend and seasonality is sometimes important for analyzing a time
series as seasonality may hinder getting the actual randomness of the
data and give its cyclical pattern in the prediction.
Notes:

What Are Stationary And Non-stationary Time Series?


The time series which has constant mean and variance is called stationary time series. It is recommended to have
the stationary time series for better analysis. The predictions on non-stationary series may give wrong values.

To check whether a series is stationary or not, there are several tests in the literature. One of them is the
Augmented Dickey-Fuller (ADF) test which is a unit root test. Its null hypothesis is that the series is non-stationary. If the
p-value is less than 0.05, the null hypothesis can be rejected, and the series can be considered stationary.

How To Make A Series Stationary?


A series can be made stationary by various methods like:
1. Difference Transform: Subtracting previous value with current value is called differencing. It is done to remove the
dependency of values on time. One can check the differenced series with the ADF test for stationary.
2. Second differencing: If the result of the ADF test on the differenced series shows that the series is still non-
stationary, then one can subtract the differenced series again.
3. Removing trend and seasonality by using HP-filter or band-pass filters and X12 ARIMA analysis.
Notes:

Is it Necessary To Remove Trend And Seasonality?


No. There are some models like Prophet, SARIMAX, etc., which take care of seasonality while modeling. The basic
ARIMA model needs the de-seasonal data.

Which Algorithms Can Be Used For Time Series Forecasting?


There are various methods for analyzing time-series data:

1. Autoregressive Integrated Moving Average (ARIMA) Models

2. Seasonal Autoregressive Integrated Moving Average (SARIMA) Models

3. Vector Autoregression (VAR)

4. Exponential Smoothing models

5. Prophet model.
Once you have the data ready, you can divide the dataset into train and test data, train any of the above models, and test
the performance using test data.
Notes:

How To Compare Performance Of Different Models?


The models can be compared on various metrics like:
1. MSE (Mean squared error)
2. RMSE(Root Mean Squared error)
3. MAPE(Mean Absolute Percentage Error) etc.
Out of these metrics, MAPE has generally been considered a good metric for comparing models.

What Are The Business Applications Of Time Series Analysis?


1. The forecasting of future values and the identification of trends using linear regression methods, moving
averages, variance forecasts, and wavelets
2. Seasonal analysis using univariate (trends) and multivariate (stratification) techniques
3. Research using regression models
4. Commodity markets
5. Forecasting (all levels)
6. Finding anomalies
REFERENCES:

 Time Series Analysis: Definition, Types, Techniques, and When It's Used,
https://www.tableau.com/learn/articles/time-series-analysis
 A Complete Guide To Get A Grasp Of Time Series Analysis,
https://www.simplilearn.com/tutorials/statistics-tutorial/what-is-time-series-analysis
 Understanding Time Series Analysis in Python,
https://www.simplilearn.com/tutorials/python-tutorial/time-series-analysis-in-python
 5 Applications of Time Series Analysis, https://www.analyticssteps.com/blogs/5-applications-time-series-analysis
 Stationarity Assumption in Time Series Data,
https://towardsdatascience.com/stationarity-assumption-in-time-series-data-67ec93d0f2f

You might also like