Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

#Please Answer in python Codeblock #2 Examining the Data A) To start, check the stationarity of the data by plotting the rolling mean and standard

#Please Answer in python Codeblock

#2 Examining the Data

image text in transcribed

A)

To start, check the stationarity of the data by plotting the rolling mean and standard deviation alongside the data itself.

Based on your plot, is the data stationary? Provide reasons with your answes. Include your answer either as a text cell or in-line comment.

B)

Use seasonal_decompose to observe the trend, seasonality, and residuals for the data by plotting all plots alongside one another.

Based on your plots, is there a cyclical pattern in the data? Provide reasons with your answers. Include your answer either as a text cell or in-line comment.

C)

To further confirm stationarity or non-stationarity, perform the Dickey-Fuller Test on the data. You may use the run_adftest method provided in lecture (below).

from statsmodels.tsa.stattools import adfuller

def run_adftest(s): print("Dickey-Fuller Test") adftest = adfuller(s, autolag='AIC') print(f"Test Statistic: {adftest[0]}") print(f"p-value: {adftest[1]}") print("Critical Values:") for k, v in adftest[4].items(): print("\t{}: {} - The data is{} stationary with {}% confidence".format(k, v, " not" if v

run_adftest(series['IOP'])

**IOP can be replaces with series of interest

Based on the result, is any differencing needed? If so, first-order difference the data and re-run the Dickey-Fuller Test to see if the results change.

Production Volume B 1 Date IOP 2 1995 JAN 89.9 3 1995 FEB 93.3 4 1995 MAR 108.2 5 1995 APR 91 6 1995 MAY 101.2 7 1995 JUN 101.4 8 1995 JUL 95 9 1995 AUG 95.3 10 1995 SEP 101.4 11 1995 OCT 107.4 12 1995 NOV 109 13 1995 DEC 92.7 14 1996 JAN 96.1 15 1996 FEB 97.2 16 1996 MAR 103.6 17 1996 APR 95.8 18 1996 MAY 100.1 19 1996 JUN 97.8 20 1996 JUL 99.4 21 1996 AUG 90.6 22 1996 SEP 100.8 23 1996 OCT 109.9 24 1996 NOV 104.6 25 1996 DEC 95 26 1997 JAN 97.2 27 1997 FEB 97.1 Production Volume B 1 Date IOP 2 1995 JAN 89.9 3 1995 FEB 93.3 4 1995 MAR 108.2 5 1995 APR 91 6 1995 MAY 101.2 7 1995 JUN 101.4 8 1995 JUL 95 9 1995 AUG 95.3 10 1995 SEP 101.4 11 1995 OCT 107.4 12 1995 NOV 109 13 1995 DEC 92.7 14 1996 JAN 96.1 15 1996 FEB 97.2 16 1996 MAR 103.6 17 1996 APR 95.8 18 1996 MAY 100.1 19 1996 JUN 97.8 20 1996 JUL 99.4 21 1996 AUG 90.6 22 1996 SEP 100.8 23 1996 OCT 109.9 24 1996 NOV 104.6 25 1996 DEC 95 26 1997 JAN 97.2 27 1997 FEB 97.1

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning VB 2008 Databases

Authors: Vidya Vrat Agarwal, James Huddleston

1st Edition

1590599470, 978-1590599471

Students also viewed these Databases questions

Question

List elements to consider when developing an employee handbook.

Answered: 1 week ago