Historigram (2020)

Here we will discuss the graphical representation of time series data, called historigram.

As we have discussed in the introduction to Time Series, given an observed time series, the first step in analyzing a time series is to plot the given series on a graph taking time intervals ($t$) along X-axis (as an independent variable) and the observed value ($Y_t$) on Y-axis (as the dependent variable: as a function of time). Such a graph will show various types of fluctuations and other points of interest.

A historigram is a graphical representation of a time series that reveals the changes that occurred at different time periods. The first step in the prediction (or forecast) of a time series involves an examination of the set of past observations. In this case, the historigram may be a useful tool. The construction of this involves the following steps described below:

  • Use an appropriate scale and take time $t$ along the $x$-axis as an independent variable.
  • Use an appropriate scale, and plot the observed values of variable $Y$ as a dependent variable against the given points of time.
  • Join the plotted points by line segments to get the required graphical representation.

Historigram Example

Draw a graphical representation of the data to show the population of Pakistan in various census years.

Census Year195119611972198119982017
Population (Million)33.4442.8865.3183.78130.58200.17
Historigram

R Programming Language

MCQs General Knowledge

https://itfeature.com statistics help

Time Series Introduction (2020)

Here we will discuss Time Series Data and Time Series Analysis.

The sequence $y_1,y_2,cdots, y_n$ of $n$ observations of a variable (say $Y$), recorded in accordance with their time of occurrence $t_1, t_2, cdots, t_n$, is called a time series. Symbolically, the variable $Y$ can be expressed as a function of time $t$ as

$$y = f(t) + e,$$

where $f(t)$ is a completely determined (or a specified sequence) that follows some systematic pattern of variation, and $e$ is a random error (probabilistic component) that follows an irregular pattern of variation. For example,

Signal: The signal is a systematic component of variation in a time series.

Noise: The noise is an irregular component of variation in a time series.

  • The hourly temperature recorded at a weather bureau,
  • The total annual yield of wheat over a number of years,
  • The monthly sales of fertilizer at a store,
  • The enrollment of students in various years in a college,
  • The daily sales at a departmental store, etc.

Time Series

A time series ${Y_t}$ or ${y_1,y_2,cdots,y_T}$ is a discrete-time, continuous state process where time $t=1,2,cdots,=T$ are certain discrete time points spaced at uniform time intervals.

A sequence of random variables indexed by time is called a stochastic process (stochastic means random). A data set is one possible outcome (realization) of the stochastic process. If history had been different, we would observe a different outcome, thus we can think of a time series as the outcome of a random variable.

Time Series Introduction Data Analysis

Usually, time is taken at more or less equally spaced intervals such as minutes, hours, days, months, quarters, years, etc. More specifically, it is a set of data in which observations are arranged in chronological order (A set of repeated observations of the same variable arranged according to time).

In different fields of science (such as signal processing, pattern recognition, econometrics, mathematical finance, weather forecasting, earthquake prediction, electroencephalography, control engineering, astronomy, and communications engineering among many other fields) Time-Series-Analysis is performed.

Continuous Time Series

A time series is said to be continuous when the observation is made continuously in time. The term, continuous is used for a series of this type even when the measured variable can only take a discrete set of values.

Discrete Time Series

A time series is said to be discrete when observations are taken at specific times, usually equally spaced. The term discrete is used for a series of this type even when the measured variable is continuous.

We can write a series as ${x_1,x_2,x_3,cdots,x_T}$ or ${x_t}$, where $t=1,2,3,cdots,T$. $x_t$ is treated as a random variable. The arcane difference between time-series variables and other variables is the use of subscripts.

Time series analysis comprises methods for analyzing time-series data to extract some useful (meaningful) statistics and other characteristics of the data, while time-series forecasting is the use of a model to predict future values based on previously observed values.

The first step in analyzing time-series data is to plot the given series on a graph taking time intervals ($t$) along the $X$-axis (as an independent variable) and the observed value ($Y_t$) on the $Y$-axis (as dependent variable). Such a graph will show various types of fluctuations and other points of interest.

https://itfeature.com statistics help

R and Data Analysis

Random Walk Model (2016)

The random walk model is widely used in the area of finance. The stock prices or exchange rates (Asset prices) follow a random walk. A common and serious departure from random behavior is called a random walk (non-stationary) since today’s stock price is equal to yesterday’s stock price plus a random shock.

Types of Random Walk Model

There are two types of random walks

  1. Random walk without drift (no constant or intercept)
  2. Random walk with drift (with a constant term)

Definition

A time series is said to follow a random walk if the first differences (difference from one observation to the next observation) are random.

Note that in a random walk model, the time series itself is not random, however, the first differences in time series are random (the differences change from one period to the next).

A random walk model for a time series $X_t$ can be written as

[X_t=X_{t-1}+e_t, , ,]

where $X_t$ is the value in time period $t$, $X_{t-1}$ is the value in time period $t-1$ plus a random shock $e_t$ (value of error term in time period $t$).

Since the random walk is defined in terms of first differences, therefore, it is easier to see the model as

[X_t-X_{t-1}=e_t, , ,]

where the original time series is changed to a first difference time series, that is the time series is transformed.

The transformed time series:

  • Forecast the future trends to aid in decision-making
  • If the time series follows a random walk, the original series offers little or no insights
  • May need to analyze the first differenced time series

Real World Example

Consider a real-world example of the daily US-dollar-to-Euro exchange rate. A plot of the entire history (of daily US-dollar-to-Euro exchange rate) from January 1, 1999, to December 5, 2014, looks like

Random Walk model

The historical pattern from the above plot looks quite interesting, with many peaks and valleys. The plot of the daily changes (first difference) would look like

Random Walk Model first difference

The volatility (variance) has not been constant over time, but the day-to-day changes are almost completely random.

Key Characteristics of a Random Walk

  • No Pattern: The path taken by a random walk is unpredictable.
  • Independence: Each step is independent of the previous one.
  • Probability distribution: The size and direction of each step can be defined by a probability distribution.

Applications of Random Walk Models

Beyond finance, random walk models have applications in:

  • Physics: Brownian motion and diffusion processes
  • Biology: Population dynamics and genetic drift
  • Computer science: Algorithms and simulations

Remember that, random walk patterns are also widely found elsewhere in nature, for example, in the phenomenon of Brownian Motion that was first explained by Einstein.

Computer MCQs Test Online

R and Data Analysis

Objectives of Time Series Analysis (2014)

There are many objectives of time series analysis. The one of major Objectives of Time Series is to identify the underlying structure of the Time Series represented by a sequence of observations by breaking it down into its components (Secular Trend, Seasonal Variation, Cyclical Trend, Irregular Variation).

Objectives of Time Series Analysis

The objectives of Time Series Analysis are classified as follows:

  1. Description
  2. Explanation
  3. Prediction
  4. Control

The description of the objectives of time series analysis is as follows:

Description of Time Series Analysis

The first step in the analysis is to plot the data and obtain simple descriptive measures (such as plotting data, looking for trends,  seasonal fluctuations, and so on) of the main properties of the series. In the above figure, there is a regular seasonal pattern of price change although this price pattern is not consistent. The Graph enables us to look for “wild” observations or outliers (not appear to be consistent with the rest of the data). Graphing the time series makes possible the presence of turning points where the upward trend suddenly changed to a downward trend. If there is a turning point, different models may have to be fitted to the two parts of the series.

Explanation

Observations were taken on two or more variables, making it possible to use the variation in a one-time series to explain the variation in another series. This may lead to a deeper understanding. A multiple regression model may be helpful in this case.

Prediction

Given an observed time series, one may want to predict the future values of the series. It is an important task in sales forecasting and is the analysis of economic and industrial time series. Prediction and forecasting are used interchangeably.

Control

When time series is generated to measure the quality of a manufacturing process (the aim may be) to control the process. Control procedures are of several different kinds. In quality control, the observations are plotted on a control chart and the controller takes action as a result of studying the charts. A stochastic model is fitted to the series. Future values of the series are predicted and then the input process variables are adjusted to keep the process on target.

Objectives of Time Series Analysis seasonal-effects
Image taken from: http://archive.stats.govt.nz

The figure shows that there is a regular seasonal pattern of price change although this price pattern is not consistent.

In quality control, the observations are plotted on the control chart and the controller takes action as a result of studying the charts.

A stochastic model is fitted to the series. Future values of the series are predicted and then the input process variables are adjusted to keep the process on target.

Learn more about Time Series on Wikipedia

Learn R Programming