Problem Set 3.2 MPCS 58020 Spring 2021 Logistics and Submission Solve the following problems and show your work. All problems are worth the same number of points. • You may use any programming...

1 answer below »
Problem Set 3.2
MPCS 58020
Spring 2021
Logistics and Submission
Solve the following problems and show your work. All problems are worth the same number of points.
• You may use any programming language, but you may not use any high-level functionality specific
to the homework problem (e.g. ACF, Yule-Walker, ARMA) . In particular, you may use basic linear
algebra routines, but not specialized statistics libraries or black-box solvers (e.g. regression toolkit).
You may use a uniform random number generator on (0, 1) and on integers within a range, but you
may not use built-in generators for more complicated distributions. However, you are allowed to use
built-in normal distribution functions for generating (Gaussian) white noise in all homework problems.
If you are unsure if a feature is allowed, ask for clarification on Slack.
Specific to homework ≥3: you are now allowed to use built-in functions for computing the mean,
variance, correlation. E.g. np.correlate is ok.
• For the programming/simulation problems, your program should support running with no arguments
and use enough realizations (trials) to get a good estimate of the result with a reasonably low execution
time (less than 5 seconds is preferable). A command line program that prints the results is preferred,
but a main script (e.g. in MATLAB) is also fine.
• All written responses, plots, and required program outputs should be included in (ideally) a single
writeup file named writeup.pdf. This could be rendered from a Jupyter notebook, LATEXsource,
and/or scanned pages. At most 2x PDFs are allowed, if you are having trouble merging the rendered
Jupyter notebook and a scanned document, for example.
• For non-programming homework problems involving derivations, you may use your favorite symbolic
solver (Mathematica, Wolfram Alpha, MATLAB, SymPy, Maple, SageMath) to evaluate integrals.
• You must also include a plain-text README file with your name, assignment number, list of any references
used (if any), a clear explanation of how to run your simulations, and what arguments (if any) each of
the scripts takes.
• If you use a compiled language (e.g., C++), you must provide a Makefile.
• All source code and scripts should be labelled according to the problem number. For instance, code
required for problem 6 should be labelled as p6 d[.py, .jl, .m, ...] and p6 e[.py, .jl, .m,
...] (if the parts are contained in separate files). If you have more than one source file for a given
problem and part, give them more descriptive labels so we know where to start grading and what is
contained in them.
• Aside on Jupyter notebooks: Jupyter notebooks are an increasingly popular, open-source, interactive
web-based medium for computational work. Code, plots, and rich text can all live side-by-side in a
1
XXXXXXXXXXDue Date: May 16, 2021 @ 11:00 AM CDT
single notebook. All or part of your assignment can be written in and submitted as a single Jupyter
notebook. You can use any of the 100+ kernels supported Jupyter, but let us know ahead of time if
you are going to use a more exotic kernel than the core three: IPython, IRkernel, IJulia. Still include
a minimalist README if you submit a notebook containing all the code and instructions.
• Your programs should be human readable, which means it they should be well-commented, well-
structured, and easy for the grader to understand. Messy and/or poorly commented code that is
unreasonably difficult to follow may receive deductions even if it is logically correct.
• The total submission should be less than 20 MB in size. Each file should be no larger than a few MB
(preferably/typically much smaller).
2
Problems
1. Identify the following models as ARMA(p,q) models (watch out for parameter redundancy), and de-
termine whether they are causal and/or invertible:
(a) xt = .80xt−1 − .15xt−2 + wt − .30wt−1
(b) xt = xt−1 − .50xt−2 + wt − wt−1
2. For the AR(2) model given by xt = −.9xt−2 +wt, find the roots of the autoregressive polynomial, and
then plot the ACF, ρ(h)
3. Let xt represent the cardiovascular mortality series (cmort) discussed in Chapter 2, Example 2.2 of
Shumway (3rd or 4th edition).
(a) Fit an AR(2) to xt using linear regression as in Example 3.18 in Shumway 4th edition (Example
3.17 in 3rd edition).
(b) Assuming the fitted model in (a) is the true model, find the forecasts over a four-week horizon,
xn+mn , for m = 1, 2, 3, 4 and the corresponding 95% prediction intervals.
4. Fit an AR(2) model to the cardiovascular mortality series (cmort) discussed in Chapter 2, Example
2.2 of Shumway (3rd or 4th edition) using both linear regression and using the Yule–Walker equations.
(a) Compare the parameter estimates obtained by the two methods.
(b) Compare the estimated standard errors of the coefficients obtained by linear regression with their
corresponding asymptotic approximations, as given in Property 3.10 (3rd or 4th edition).
5. Generate 10 realizations of length n = 200 each of an ARMA(1,1) process with φ = .9 and θ = .5 and
σ2 = 1. Estimate the three parameters in each case (using a method of your choice) and compare the
estimators to the true values.
3
Answered 2 days AfterMay 12, 2021

Solution

Sanchi answered on May 13 2021
23 Votes

#Question1 (a) xt = .80xt−1 − .15xt−2 + wt − .30wt−1
#solve for AR polynomial for ARMA(2,1)
z = c(1,-0.80,0.15)
(a = polyroot(z))
#since both the roote lie outside the unit circle,...

Submit New Assignment

Copy and Paste Your Assignment Here