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 »
5 questions


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 Due 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

Answer To: Problem Set 3.2 MPCS 58020 Spring 2021 Logistics and Submission Solve the following problems and...

Sanchi answered on May 13 2021
142 Votes
#Question1 (a) xt = .80xt−1 − .15xt−2 + wt − .30wt−1
#solve for AR polynomial for ARMA(2,1)
z = c(1,-0.8
0,0.15)
(a = polyroot(z))
#since both the roote lie outside the unit circle, therefore AR process is casual
y = c(1,-0.30,0)
(b= polyroot(y))
#since the root lies outside the unit circle, therefore MA process is invertible
#Question1 (b) xt = xt−1 − .50xt−2 + wt − wt−1
#solve for AR polynomial for ARMA(2,1)
z = c(1,-1,0.50)
(a = polyroot(z))
#AR process is not casual
y = c(1,-1,0)
(b= polyroot(y))
#since the root is 1, therefore we cannot say whether MA process is invertible or not
#question2 xt = −.9xt−2 + wt
z = c(1,0,0.9)
(a = polyroot(z)[1])
arg = Arg(a)/(2*pi)
1/arg
set.seed(90210)
ar2 = arima.sim(list(order=c(2,0,0), ar=c(0,-.9)), n = 16)
plot(1:16/4, ar2, type="l", xlab="Time (one unit = 4 points)")
abline(v=0:4, lty="dotted", lwd=2)
ACF = ARMAacf(ar=c(0,-.9), ma=0, 50)
plot(ACF, type="h", xlab="lag")
abline(h=0)
#question3
#install.packages("astsa")
library(astsa)
data() ...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here