



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
weekly homework solution 6.2 weekly homework solution 6.2 weekly homework solution 6.2
Typology: Exercises
1 / 5
This page cannot be seen from the preview
Don't miss anything!




Question 6.
1. Using July through October daily-high-temperature data for Atlanta for 1996 through 2015, use a CUSUM approach to identify when unofficial summer ends (i.e., when the weather starts cooling off) each year. You can get the data that you need from the file temps.txt or online, for example at http://www.iweathernet.com/atlanta-weather-records or https://www.wunderground.com/history/airport/KFTY/2015/7/1/CustomHistory.html. You can use R if you’d like, but it’s straightforward enough that an Excel spreadsheet can easily do the job _too.
temperatures (i.e., the average of: July 1’s average, July 2’s average, …, July 31’s average)^1. That turns out to be 88.75, which is pretty reasonable compared to the July average temperature range from 87 to 90.4. By changing the values in cells D1 and F1, you can test different values of C and T, some of which are shown in this chart: C T Change detected Avg temp on change date 5 25 Sep 26 78. 5 15 Sep 24 80. 5 5 Sep 18 81. 1 25 Sep 9 85. 1 15 Sep 6 84. 1 5 Sep 1 85. 0.44262 4.42625 Aug 30 85. Table 1. Change detection for different values of C and T. The last row shows C as ½ standard deviation of the July data, and T as 5 standard deviations of the July data, which is sometimes used as a default. My personal judgment (which you don’t have to agree with – there’s not a single “right” answer) is that the default values are too sensitive. There is a small change (from the 87-88 range to the 85 range) that starts on August 30, but that change seems too small to call the end of summer. Something closer to (^1) Of course, this is the same as the average over all 620 July observations (31 days each year for 20 years).
Sep 24 or 25 seems like a more-significant change. On the other hand, the graph below does seem to show a change around the end of August (close to Labor Day, the traditional end of summer). 1-Jul 21-Jul 10-Aug 30-Aug 19-Sep 9-Oct 29-Oct 60 65 70 75 80 85 90 95 100 Figure 2. Average (1996-2015) temperature day by day. A second approach is shown in the file solution 6.2.xlsx (sheet “Part 1 Approach 2”). In this approach, we find the change point for each year individually, and then average them. In the “CUSUM” sheet, each column B through U corresponds to a year. B12:B134, C12:C134, etc. are the values of St for 1996, 1997, etc. Rows 1-4 show the July average, max, min, and standard deviation each year. Rows 5 through 7 show the values of C, T, and mu each year. Rows 8 and 9 show the date a change is detected each year. Finally, cells V8 and V9 show the average day that change is detected. As in the first approach, the key is finding the right values of C and T. Looking at the year-to-year data, there are certainly some days where the temperature is temporarily 10-15 degrees colder than average, but then goes back up – we don’t want to mistakenly identify that randomness as a change. C T Avg date change detected Avg temp on change date 0 35 Aug 18 90. 5 35 Sep 19 82. 10 35 Oct 7 75. 0 25 Jul 22 89. 5 25 Sep 17 79. 10 25 Oct 4 77. 0 15 Jul 17 89. 5 15 Sep 2 85. 10 15 Sep 26 78. Table 2. End-of-summer estimates using approach 2.
7 15 2007 Oct 13 14 60 Never n/a 14 45 Never n/a 14 30 Never n/a 14 15 Never n/a Table 3. End-of-summer estimates. As you can see, this is ambiguous. It’s not clear if summer is ending later. In fact, as Figure 6 shows below, if anything there was a blip in 2012-2013 where our Part 1 Approach 2 model shows summer ending significantly earlier. 1995 2000 2005 2010 2015 2020 14-Jul 24-Jul 3-Aug 13-Aug 23-Aug 2-Sep 12-Sep 22-Sep 2-Oct 12-Oct 22-Oct Figure 4. Year-by-year end-of-summer estimates (same as Figure 5). A second approach is to answer “however long summer is, are those days getting hotter?” As shown in solution 6.2.xlsx (sheet “Part 2 Approach 2”, for each year we could take the end-of-summer estimate from Part 1 Approach 2, and calculate the average daily temperature through that date. Figure 4 shows the year-by-year average summer temperature estimates. Visually, it seems difficult to identify a change point – 2010-2012 appears higher, but then the 2013-2015 drop back to the standard range. CUSUM similarly is ambiguous about whether/when there was a change; see Table 6. For more- sensitive values of C and T, change is detected in 2011 or 2012, but other values of C and T don’t detect a change, because the temperatures drop back starting in 2013.
1995 2000 2005 2010 2015 2020
Figure 5. Year-by-year average summer temperature estimates. C T Year change detected Avg temp through day 0 5 2011 92. 0 10 Never n/a 0 15 Never n/a 1 5 2012 91. 1 10 Never n/a 1 15 Never n/a 2 5 Never n/a 2 10 Never n/a 2 15 Never n/a Table 4. End-of-summer estimates using approach 2.