Statistical Tests to Check the Stationarity of Time Series Data
Posted On: 1/27/2025 11:37:32 AM |  Written By: Dr. Tej Bahadur Chandra
Reads 199   Likes 0   Share           

Statistical Tests to Check the Stationarity of Time Series Data

Two statistical test are broadly used to test the stationarity of the time series data:
1. Augmented Dickey-Fuller (ADF) test
2. KPSS (Kwiatkowski-Phillips-Schmidt-Shin) Test


1. Augmented Dickey-Fuller (ADF) test


The Augmented Dickey-Fuller (ADF) test is a statistical test used to determine whether a time series is stationary or contains a unit root. In time series analysis, stationarity is an essential property, as many statistical models assume the data is stationary (i.e., its statistical properties, like mean and variance, are constant over time).

Key Concepts

  1. Stationarity:

    • A time series is stationary if its statistical properties, such as mean, variance, and autocorrelation, do not change over time.
    • Non-stationary time series often exhibit trends, seasonality, or changing variance.
  2. Unit Root:

    • A unit root is a feature of some non-stationary time series that causes random shocks to have permanent effects.
    • The presence of a unit root indicates the series is non-stationary.
  3. Purpose of ADF Test:

    • To test the null hypothesis (H0) that the time series has a unit root (i.e., it is non-stationary).
    • The alternative hypothesis (Ha) is that the time series is stationary.

The Test Equation

The ADF test is based on estimating the following regression:

Δyt=α+βt+γyt1+δ1Δyt1+δ2Δyt2++δpΔytp+ϵt\Delta y_t = \alpha + \beta t + \gamma y_{t-1} + \delta_1 \Delta y_{t-1} + \delta_2 \Delta y_{t-2} + \dots + \delta_p \Delta y_{t-p} + \epsilon_t

Where:

  • yty_t: The time series value at time tt.
  • Δyt=ytyt1\Delta y_t = y_t - y_{t-1}: The first difference of the series.
  • tt: Time trend (optional).
  • α\alpha: Constant term (drift).
  • β\beta: Coefficient of the time trend.
  • γ\gamma: Coefficient that determines the presence of a unit root.
  • Δytp\Delta y_{t-p}: Lagged differences to account for autocorrelation in residuals.
  • ϵt\epsilon_t: White noise error term.

Steps to Perform the ADF Test

  1. State the Hypotheses:

    • H0H_0: The time series has a unit root (non-stationary).
    • HaH_a: The time series does not have a unit root (stationary).
  2. Estimate the Test Statistic:

    • Perform a regression using the above equation and calculate the test statistic for γ\gamma.
  3. Compare with Critical Values:

    • The test statistic is compared against critical values at different significance levels (e.g., 1%, 5%, 10%).
    • If the test statistic is less than the critical value, reject H0H_0 and conclude the series is stationary.
  4. P-Value Approach:

    • Alternatively, a p-value is provided. If the p-value is less than the chosen significance level (e.g., 0.05), reject H0H_0.

Outputs of the ADF Test

  1. Test Statistic:

    • Indicates whether to accept or reject H0H_0.
  2. Critical Values:

    • Thresholds for rejecting H0H_0 at 1%, 5%, and 10% significance levels.
  3. P-Value:

    • A measure of the strength of evidence against H0H_0.
  4. Lag Order:

    • The number of lags used to address autocorrelation in the time series.

Interpreting Results

  • If H0H_0 is rejected:

    • The series is stationary (no unit root).
    • You can proceed with models that assume stationarity (e.g., ARIMA).
  • If H0H_0 is not rejected:

    • The series is non-stationary (has a unit root).
    • Consider transforming the data (e.g., differencing or detrending).

Limitations of ADF Test

  1. Low Power:

    • The ADF test might struggle to reject H0H_0 for near-stationary series.
  2. Sensitivity to Lag Selection:

    • The number of lags chosen can impact results.
  3. Not Robust to Structural Breaks:

    • If the time series has structural breaks, the ADF test might fail to detect stationarity.

Practical Use (Python Example)

from statsmodels.tsa.stattools import adfuller

# Example time series
data = [your_time_series_data]

# Perform ADF test
result = adfuller(data)

# Display results
print("ADF Statistic:", result[0])
print("p-value:", result[1])
print("Critical Values:", result[4])

if result[1] < 0.05:
    print("Reject null hypothesis: The series is stationary.")
else:
    print("Fail to reject null hypothesis: The series is non-stationary.")





Comments

Leave a comment

 
 
 
 

TheNewsCG.com

RJPT House, Lokmanya Grih Nirman Society,
'Rohanipuram, In-front of Sector- 1, Pt. Deendayal Upadhyay Nagar, Raipur 492 010. (CG) India.
Email: support@thenewscg.com

Connect us using following social media:

Visitors

  • Today: 59
  • Yesterday: 57
  • Total: 38688
Designed and Developed by: T-Labs Solutions