\newcommand\prob{\mathbb{P}}
\newcommand\E{\mathbb{E}}
\newcommand\var{\mathrm{Var}}
\newcommand\cov{\mathrm{Cov}}

-----------

This is a two week homework and will count for twice the credit of other one week homeworks. It is the first homework which we require to be submitted as an Rmarkdown (.Rmd) file which the GSIs will compile into an HTML document. Most of you will find that editing the Rmd file in Rstudio may be the simplest solution. Also, the source files for this homework and all the notes are on the class github site: if you see anything in the notes that you'd like to reproduce, you can take advantage of that. Opening the file [hw03.Rmd](hw03.Rmd) in Rstudio and editing it to produce your solution is one way to proceed. You may also like to browse http://www.stat.cmu.edu/~cshalizi/rmarkdown/.

As mentioned in class, you will need to know some Latex to write equations in Rmarkdown. Many tutorials exist online, e.g. [http://www.latex-tutorial.com/tutorials](http://www.latex-tutorial.com/tutorials/). One legitimate approach is to identify equations in the notes that you would like to modify, and then dig out the source code from github. 

Your homework should be submitted as a single Rmd file on the STATS 531 Canvas site. The GSI should be able to compile the Rmd file that you submit to HTML. Thus, any data you need to import should be read from an internet source. If technical difficulties arise, please consult your peers, piazza, the GSI or myself. 

Your report should contain a section on sources used. Anything and anyone consulted while you are working on the homework should be credited. As usual, a substantial fraction of the points for this homework will be allocated for proper attribution of sources. In the rare case where you might complete the project without consulting any sources, be sure to state that too.


--------

**<big>Question 3.1</big>**. Try out some of the ARMA techniques studied in class on the Ann Arbor January Low temperature time series that we saw in Chapter 1 of the notes. Write a report as an Rmd file and submit this file on the class Canvas site. This is an open-ended assignment, but you're only expected to do what you can in a reasonable amount of time. Some advice follows.

1.  You can read in the data with 
```{r read_data, eval=FALSE}
x <- read.table(file="http://ionides.github.io/531w20/01/ann_arbor_weather.csv",header=TRUE)
plot(Low~Year,data=x,type="l")
```

2.  Your report should involve model equations and hypotheses, and should define the notation used. Please be careful to distinguish between symbols representing random variables (usually using capital letters) and numbers. You're welcome to follow the notation in the course notes, and if you deviate from this notation it is especially necessary to define the notation that you choose. 

3.  You are advised to try a few things from the notes, spot something that catches your attention, and try a few more things to investigate it. Write up what you found, and you're finished!

4.  When writing up your homework report, you must choose which pieces of R code to include in the HTML document. To tell Rmarkdown not to include the R code in the HTML document, use the `echo=FALSE` chunk option, e.g.,
<pre><code>```{r chunk_without_code, echo=FALSE}
cat("only the output of this code chunk will be printed\n")
```</code></pre>
You should only display the code in the HTML document if you think that, in your context, the helpfulness of showing the code outweighs the extra burden on the reader. Recall that the reader can work through the Rmd source file if necessary.

5.  When you think you have got everything you can out of the Ann Arbor January Low temperature time series, you might like to consider it in the context of the global mean annual temperature time series on the class github site:
```{r read_global_data, eval=FALSE}
global <- read.table(file="http://ionides.github.io/531w20/hw03/Global_Temperature.txt",header=TRUE)
plot(Anomaly~Year,data=global,type="l")
```

-----------