PSTAT 174/274 Midterm1 Answers
2
Q1 (15pts). Consider the time series Xt = t + Wt , where Wt WN(0, w ).
(a)(5pts) Show that Xt is not stationary.
(b)(5pts) Consider the rst dierence, Yt = Xt Xt1 . Is Yt stationary? Why?
(c)(5pts) Derive the mean and autoc

PSTAT 174/274 hw1 answers
Q1:
x= rnorm(100,5,1)
x=ts(x,start=1,end=100,frequency=1)
plot.ts(x)
(a) Explain what each line in the code does briey in one or two sentences.
(b) Attach the graph and identify if there is any (i) global trend, (ii) periodic tre

PSTAT 174/274 HW1, due 2pm Wednesday April 8th in class at Teachers
podium
Instructions:
(1) Write clearly your firstname and lastname in capitals, 174 or 274 hw #, perm
id on top of your answers. Write your TA name (Ling or Michelle) on the top right
cor

PSTAT 174/274 Practice Midterm2
Instructions: 0. all the topics after the midterm1 from Y-W equations to Spectral
density function. i Closed books and notes. ii one cheat sheet and a calculator
allowed. iii Be on time!
Q1 (20pts). Suppose we have 100 obse

PSTAT 174/274 Practice Midterm2
Instructions: 0. all the topics after the midterm1 from Y-W equations to Spectral
density function. i Closed books and notes. ii one cheat sheet and a calculator
allowed. iii Be on time!
Q1 (20pts). Suppose we have 100 obse

Time Series Analysis and Its Applications: With R Examples
http:/www.stat.pitt.edu/stoffer/tsa3/
(click the above textbook link on-campus and/or the click the link Springer's Site for the Text
and download the free e-text on to desktop/notebook)
Third Edi

Appendix R
R Supplement
R.1 First Things First
The website for the text is http:/www.stat.pitt.edu/stoffer/tsa3/. If you
do not already have R, point your browser to the Comprehensive R Archive
Network (CRAN), http:/cran.r-project.org/ and download and in

Source: http:/programming-r-pro-bro.blogspot.com/2011/10/predictability-of-stock-returnsusing.html
Predictability of stock returns : Using runs.test()
Financial market is interesting place, you find people taking positions (buying/selling) based on their

PSTAT 174/274 Lectures 19 and 20
Chapter 4 pages 173-200 in Text
Spectral Analysis or Fourier Analysis
Review of Trigonometric and Complex Exponential
functions
sin2 + cos2 = 1
sin = cos( ) and cos = sin( )
2
2
cos( ) = cos cos
sin sin
sin( ) = sin

PSTAT 174/274 Lectures 9 to 11
Sections 3.1 to 3.4
Chapter 3 Cont.
Working with Backshift operator to get ACVF/ACF
Finding ACVF and ACF of ARMA(p, q)
Dierence equations(Review Text page 97,98)
Review :
Suppose Yt =
y (h) =
y (h) =
j Wtj ,
2
Wt W N (0,

PSTAT 174/274 Lectures 3 and 4
To calculate autocovariances and autocorrelations for time series data,
we need the following two denitions:
Section 1.5 from Text
Denition lag : Consider two random variables Xr , Xs from a stochastic process Xt1 , Xt2 , Xt

PSTAT 174/274 Lectures 12 and 13
Sections 1.6, 3.6 and Appendix A
Descriptive or Sample Estimators
1. Moment estimators for , (h) and correlations (h)
2. MLE estimators for , (h) and correlations (h)
3. Simulate estimators in R (?)
(See Appendix A in Text

PSTAT 174/274 Lecture 7, page 27 of Text
2-sided innite MA model Yt =
j= j Wtj with Wt WN(w =
2
0, w ) is always stationary because:
E(Yt ) = E(
j Wtj ) = w
j=
j
j=
E(Yt ) = 0
y (t, t + h) = E(Yt Yt+h )
= E
j Wtj
j
=
i Wt+hi
i
i j E (Wtj Wt+hi )
i
j
i j

PSTAT 174/274 hw2 answers
10pts for each question; undergrads (grads) max is 40(50)pts
Q1: Run (execute) the following six lines code in R.
x= rnorm(2200)
acv = acf(x[1:200], type="cov", lag.max=20)
plot(acv$lag, acv$acf, type="l")
for(i in 1:10)cfw_
acv

PSTAT 174/274 HW6, due 2pm June 3rd at Teachers podium
Instructions:
(1) Write your firstname and lastname clearly in capitals, 174 or 274 hw #, perm
id on top of your answers. Write your TA name (Ling/Michelle) on the top right
corner of the first page.

Pstat 174/274, Fall 2015
Solutions to Homework 3
Problem 1. Which of the following models are invertible? Answer yes/no, and explain
briefly why. You may assume any results that I gave you in lecture. You do not need to find
any complex roots to answer th

Homework 1 Solutions - for use by Fall 2015 PSTAT 174/274 students only
Problem 1. Suppose that X1 , . . . , Xn are independently and identically distributed with
pdf
(
( + 1)x 0 < x < 1
fX (x; ) =
where > 1.
0
otherwise
(a) Find the method of moments est

Homework 2 solutions - for use by Fall 2015 PSTAT 174/274 students only
Problem 1. Let cfw_Xt be the moving-average process of order 2 given by Xt = Zt + Zt2 ,
where cfw_Zt is WN(0,1).
(a) If = 0.8 and if t is a fixed value of time index, find
E(Xt ),

Pstat 174/274, Fall 2015
Solutions to Homework 5
Problem 1. Suppose that U and V are two random variables such that
(
1
, if (u, v) = (1, 0), (0, 1), (1, 0)
P (U = u, V = v) = 3
0, elsewhere.
Find Cov(U, V ), showing clear working. Are U and V dependent?

Pstat 174/274, Fall 2015
Solutions to Homework 4
Problem 1. Suppose Xt is a stationary time series. In the October 19 lecture we used the
Yule-Walker equations for n = 1 and n = 2, to express the first two values of the PACF (11
and 22 ) as functions of A

Fall 2015 - PSTAT 174/274 Final Project:
Due uploaded no later than 5 pm on Monday December 7, 2015.
Any late projects will be assessed a 10% penalty for each day late (or part thereof ).
Each student must complete their data analysis and report writing w

#2
By estimating , we can see the correlation between each observation from time period to time period.
This is the display of the standardized residuals of the ACF of the residuals, and Ljung-Box Plot. And we
have the Cauchy with aprameters 1.02 and scal

PSTAT 174/274 Practice Midterm 1
Instructions: i Closed books and notes. ii One cheat sheet and one calculator
are allowed. iii Answer all questions, write them clearly/neatly. iv Need extra
space, write answers back. iv. Topics from the first class to la

Question Q1 Q2 Q3 Q4 Q5 Q6
Total
Points
20 20
3
7
20 10 70/80(G)
PSTAT 174/274 Midterm II Answers, UCSB, Spring 2015
Q1 (20pts). Suppose we have 100 observations X1 , X2 , , X100 of a time series, and we
have chosen to estimate an AR(3) model: Xt = 1 Xt1

PSTAT 174/274 HW6answers (Total 40/50 for undergrads/grads)
1. Fit an ARIMA(p,d,q) model to US monthly percentage of savings to disposable income.
The saverate.txt on gauchospace includes the data. You may use the attached code to answer
the questions.
(a

PSTAT174/274 HW3 answers
Exercise 1.7
a. x(t) = w(t 1) + 2w(t) + w(t + 1) and x(t h) = w(t h 1) + 2w(t h) + w(t h + 1).
Not for grading: Note that this is 2-sided MA(1) process or 2-sided MA(1) filter.
(i) E(x(t) = 0.
(ii) Multiply LHSs of X(t) and X(t-h)

PSTAT 174/274 HW4, due 2pm Monday May 11th at Teachers podium
Instructions:
(1) Write your firstname and lastname clearly in capitals, 174 or 274 hw #, perm
id on top of your answers. Write your TA name (Michelle or Ling) on the top right
corner of the fi

PSTAT 174/274: Homework #4
(Due 10/26/2016 23:55 hours)
1.
a. The fitted AR model has coefficients 1.3175 and -0.6341. The overlaid plot of the AR(2)fitted values on the original mean-corrected series are shown below.
AR(1) fit (with estimated coefficient

PSTAT 174/274 Homework 2
Problem 1. Analisys for worldpop.
a. Plot the data.
b. f i t c u b = lm(wp . ts poly ( year , 3 ) ) $ f i t
c. Residuals plot.
Figure 1: Residuals plot.
d. ACF Plot
Figure 2: ACF of the residuals.
e. The AR model is the one that b

HW#3 - indicative solutions
Javier Zapata
October 24, 2016
P1
From the ACF plot below, we see that most of its values are significantly different from zero (values are
beyond the dotted blue line). Moreover, the theoretical ACF values obtained from the es

PSTAT 174/274: Homework #1
(Due 10/5/2016 23:55 hours)
1. The following are some comments. Students are required to provide their own comments, but
not required to include the plot in their homework.
a. The time plot of the percentage daily returns of Dow

PSTAT 174/274: Homework #1
(Due 10/5/2016 23:55 hours)
1. Inspect the following time series data sets, and report whatever feature catches your eye,
including any trend, seasonality and whatever else you may find noteworthy.
a. The percentage daily return