ISYE 6402 Midterm 1 Questions and 100% Correct Answers 2026/27 Latest - Georgia
Institute Of Technology.
Background
For this midterm exam, you will analyze monthly domestic passenger data for two of largest airports servicing the New York City metro area:
LaGuardia Airport (LGA) and John F. Kennedy International Airport (JFK). The data records the number of passengers embarking on domestic
flights out of each airport each month from January 2003 to December 2019.
library(zoo)
library(lubridate)
library(mgcv)
library(TSA)
library(dynlm)
Instructions on reading the data
To read the data in R , save the file in your working directory (make sure you have changed the directory if different from the R working directory)
and read the data using the R function read.csv()
passengers<-read.csv("Midterm 1 Data.csv")
Part 1: Trend and Seasonality Modeling
1a. Plot the Time Series and the ACF plots for both airports. Comment on the stationarity of both time series based on these plots. Which (if any)
assumptions of stationarity are violated for the two time series?
lga<-ts(passengers$LGA,start=2003,frequency = 12)
jfk<-ts(passengers$JFK,start=2003,frequency = 12)
par(mfrow=c(2,2))
plot(lga,col="purple",lwd=1.5,ylab="Passengers",main="LGA Time Series Plot")
plot(jfk,col="orange",lwd=1.5,ylab="Passengers",main="JFK Time Series Plot")
acf(lga,lag.max=12*4,col="purple",lwd=1.5,ylab="Passengers",main="LGA ACF Plot")
acf(jfk,lag.max=12*4,col="orange",lwd=1.5,ylab="Passengers",main="JFK ACF Plot")
Response: Question 1a
The time series plots showing domestic passenger volume for LGA and JFK both exhibit overt monthly seasonality and a fluctuating overall trend.
The ACF plots for both series show lags that follow a cyclical trend and slowly decrease, which is indicative of trend and seasonality patterns in
both series. Based on these plots, both series clearly violate the stationarity assumptions of a constant mean and non-seasonality.
1b. Fit a moving average trend and a splines smoothing trend on both time series. Overlay the fitted values derived from each trend estimation
model on the corresponding data and calculate the MAPE for each model. Comment on the effectiveness of each model to estimate the trend for
Both series
ISYE 6402 Midterm 1
, time.pts = c(1:length(lga))
time.pts = c(time.pts - min(time.pts))/max(time.pts)
mav.lga<-ksmooth(time.pts,lga,kernel="box")
tsmav.lga<-ts(mav.lga$y,frequency=12,start=2003)
spl.lga<-gam(lga~s(time.pts))
tsspl.lga<-ts(fitted(spl.lga),frequency=12,start=2003)
ts.plot(lga,ylab="Passengers",main="LGA Domestic Passengers with Trend Estimations")
lines(tsmav.lga,lwd=2,col="plum")
lines(tsspl.lga,lwd=2,col="purple")
legend(x=2003,y=1250000,legend=c("Moving Average","Splines"),
lty = 1, lwd=2, col=c("plum","purple"))
mav.jfk<-ksmooth(time.pts,jfk,kernel="box")
tsmav.jfk<-ts(mav.jfk$y,freq=12,start=2003)
spl.jfk<-gam(jfk~s(time.pts))
tsspl.jfk<-ts(fitted(spl.jfk),freq=12,start=2003)
ts.plot(jfk,ylab="Passengers",main="JFK Domestic Passengers with Trend Estimations")
lines(tsmav.jfk,lwd=2,col="hotpink")
lines(tsspl.jfk,lwd=2,col="orange")
legend(x=2003,y=1250000,legend=c("Moving Average","Splines"),
lty = 1, lwd=2, col=c("hotpink","orange"))
ISYE 6402 Midterm 1
Institute Of Technology.
Background
For this midterm exam, you will analyze monthly domestic passenger data for two of largest airports servicing the New York City metro area:
LaGuardia Airport (LGA) and John F. Kennedy International Airport (JFK). The data records the number of passengers embarking on domestic
flights out of each airport each month from January 2003 to December 2019.
library(zoo)
library(lubridate)
library(mgcv)
library(TSA)
library(dynlm)
Instructions on reading the data
To read the data in R , save the file in your working directory (make sure you have changed the directory if different from the R working directory)
and read the data using the R function read.csv()
passengers<-read.csv("Midterm 1 Data.csv")
Part 1: Trend and Seasonality Modeling
1a. Plot the Time Series and the ACF plots for both airports. Comment on the stationarity of both time series based on these plots. Which (if any)
assumptions of stationarity are violated for the two time series?
lga<-ts(passengers$LGA,start=2003,frequency = 12)
jfk<-ts(passengers$JFK,start=2003,frequency = 12)
par(mfrow=c(2,2))
plot(lga,col="purple",lwd=1.5,ylab="Passengers",main="LGA Time Series Plot")
plot(jfk,col="orange",lwd=1.5,ylab="Passengers",main="JFK Time Series Plot")
acf(lga,lag.max=12*4,col="purple",lwd=1.5,ylab="Passengers",main="LGA ACF Plot")
acf(jfk,lag.max=12*4,col="orange",lwd=1.5,ylab="Passengers",main="JFK ACF Plot")
Response: Question 1a
The time series plots showing domestic passenger volume for LGA and JFK both exhibit overt monthly seasonality and a fluctuating overall trend.
The ACF plots for both series show lags that follow a cyclical trend and slowly decrease, which is indicative of trend and seasonality patterns in
both series. Based on these plots, both series clearly violate the stationarity assumptions of a constant mean and non-seasonality.
1b. Fit a moving average trend and a splines smoothing trend on both time series. Overlay the fitted values derived from each trend estimation
model on the corresponding data and calculate the MAPE for each model. Comment on the effectiveness of each model to estimate the trend for
Both series
ISYE 6402 Midterm 1
, time.pts = c(1:length(lga))
time.pts = c(time.pts - min(time.pts))/max(time.pts)
mav.lga<-ksmooth(time.pts,lga,kernel="box")
tsmav.lga<-ts(mav.lga$y,frequency=12,start=2003)
spl.lga<-gam(lga~s(time.pts))
tsspl.lga<-ts(fitted(spl.lga),frequency=12,start=2003)
ts.plot(lga,ylab="Passengers",main="LGA Domestic Passengers with Trend Estimations")
lines(tsmav.lga,lwd=2,col="plum")
lines(tsspl.lga,lwd=2,col="purple")
legend(x=2003,y=1250000,legend=c("Moving Average","Splines"),
lty = 1, lwd=2, col=c("plum","purple"))
mav.jfk<-ksmooth(time.pts,jfk,kernel="box")
tsmav.jfk<-ts(mav.jfk$y,freq=12,start=2003)
spl.jfk<-gam(jfk~s(time.pts))
tsspl.jfk<-ts(fitted(spl.jfk),freq=12,start=2003)
ts.plot(jfk,ylab="Passengers",main="JFK Domestic Passengers with Trend Estimations")
lines(tsmav.jfk,lwd=2,col="hotpink")
lines(tsspl.jfk,lwd=2,col="orange")
legend(x=2003,y=1250000,legend=c("Moving Average","Splines"),
lty = 1, lwd=2, col=c("hotpink","orange"))
ISYE 6402 Midterm 1