Skip to content

Commit

Permalink
Update for week 2
Browse files Browse the repository at this point in the history
  • Loading branch information
robjhyndman committed Mar 7, 2024
1 parent 17bee39 commit 3d8ec0a
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 12 deletions.
4 changes: 2 additions & 2 deletions _freeze/week2/slides/execute-results/tex.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"hash": "0c2b7d878f98ef4c951977b9b55c1428",
"hash": "31e5a31bb38bfdaa76821a6e4d92a655",
"result": {
"engine": "knitr",
"markdown": "---\ntitle: ETC3550/ETC5550 Applied forecasting\nauthor: \"Week 2: Time series graphics\"\nformat:\n beamer:\n aspectratio: 169\n fontsize: 14pt\n section-titles: false\n knitr:\n opts_chunk:\n dev: \"cairo_pdf\"\n pdf-engine: pdflatex\n fig-width: 7.5\n fig-height: 3.5\n include-in-header: ../header.tex\n---\n\n\n\n\n## CASE STUDY 1: Paperware company\n\n\\fontsize{11.5}{13}\\sf\n\n\\begin{textblock}{9.2}(0.2,1.5)\n\\textbf{Problem:} Want forecasts of each of hundreds of\nitems. Series can be stationary, trended or seasonal. They currently\nhave a large forecasting program written in-house but it doesn't seem\nto produce sensible forecasts. They want me to fix it.\n\n\\textbf{Additional information}\\vspace*{-0.2cm}\\fontsize{11.5}{13}\\sf\n\\begin{itemize}\\itemsep=0cm\\parskip=0cm\n\\item Program written in COBOL making numerical calculations limited. It is not possible to do any optimisation.\n\\item Their programmer has little experience in numerical computing.\n\\item They employ no statisticians and want the program to produce forecasts automatically.\n\\end{itemize}\n\\end{textblock}\n\n\\placefig{10.2}{1.4}{width=5.8cm}{tableware2}\n\n## CASE STUDY 1: Paperware company\n\\vspace*{0.2cm}\n\n### Methods currently used\n\nA\n: 12 month average\n\nC\n: 6 month average\n\nE\n: straight line regression over last 12 months\n\nG\n: straight line regression over last 6 months\n\nH\n: average slope between last year's and this year's values.\n (Equivalent to differencing at lag 12 and taking mean.)\n\nI\n: Same as H except over 6 months.\n\nK\n: I couldn't understand the explanation.\n\n## CASE STUDY 2: PBS\n\n\\fullwidth{pills}\n\n## CASE STUDY 2: PBS\n\n### The Pharmaceutical Benefits Scheme (PBS) is the Australian government drugs subsidy scheme.\n\n * Many drugs bought from pharmacies are subsidised to allow more equitable access to modern drugs.\n * The cost to government is determined by the number and types of drugs purchased. Currently nearly 1\\% of GDP.\n * The total cost is budgeted based on forecasts of drug usage.\n\n## CASE STUDY 2: PBS\n\n\\fullheight{pbs2}\n\n## CASE STUDY 2: PBS\n\n * In 2001: \\$4.5 billion budget, under-forecasted by \\$800 million.\n * Thousands of products. Seasonal demand.\n * Subject to covert marketing, volatile products, uncontrollable expenditure.\n * Although monthly data available for 10 years, data are aggregated to annual values, and only the first three years are used in estimating the forecasts.\n * All forecasts being done with the \\texttt{FORECAST} function in MS-Excel!\n\n## CASE STUDY 3: Car fleet company\n\n**Client:** One of Australia's largest car fleet companies\n\n**Problem:** how to forecast resale value of vehicles? How\nshould this affect leasing and sales policies?\n\n\\pause\n\n### Additional information\n - They can provide a large amount of data on previous vehicles and their eventual resale values.\n - The resale values are currently estimated by a group of specialists. They see me as a threat and do not cooperate.\n\n## CASE STUDY 4: Airline\n\n\\fullheight{ansettlogo}\n\n## CASE STUDY 4: Airline\n\n\n::: {.cell}\n::: {.cell-output-display}\n![](slides_files/figure-beamer/unnamed-chunk-1-1.pdf)\n:::\n:::\n\n\n\\only<2>{\\begin{textblock}{4.2}(11,5.5)\n\\begin{alertblock}{}\nNot the real data! Or is it?\n\\end{alertblock}\n\\end{textblock}}\n\n## CASE STUDY 4: Airline\n\n**Problem:** how to forecast passenger traffic on major routes?\n\n### Additional information\n\n * They can provide a large amount of data on previous routes.\n * Traffic is affected by school holidays, special events such as\nthe Grand Prix, advertising campaigns, competition behaviour, etc.\n * They have a highly capable team of people who are able to do\nmost of the computing.\n\n## Seasonal or cyclic?\n\n\\alert{Differences between seasonal and cyclic patterns:}\n\n * seasonal pattern constant length; cyclic pattern variable length\n * average length of cycle longer than length of seasonal pattern\n * magnitude of cycle more variable than magnitude of seasonal pattern\n\n\\pause\n\n\\begin{alertblock}{}\nThe timing of peaks and troughs is predictable with seasonal data, but unpredictable in the long term with cyclic data.\n\\end{alertblock}\n\n\n## Trend and seasonality in ACF plots\n\n- When data have a trend, the autocorrelations for small lags tend to be large and positive.\n- When data are seasonal, the autocorrelations will be larger at the seasonal lags (i.e., at multiples of the seasonal frequency)\n- When data are trended and seasonal, you see a combination of these effects.\n\n## Your turn\n\nWe have introduced various functions for time series graphics include `autoplot()`, `gg_season()`, `gg_subseries()`, `gg_lag()` and `ACF`. Use these functions to explore the quarterly tourism data for the Snowy Mountains.\n\n```r\nsnowy <- tourism |> filter(Region == \"Snowy Mountains\")\n```\n\nWhat do you learn?\n\n\n## Which is which?\n\n\n::: {.cell}\n::: {.cell-output-display}\n![](slides_files/figure-beamer/unnamed-chunk-2-1.pdf){width=14.5cm}\n:::\n:::\n",
"markdown": "---\ntitle: ETC3550/ETC5550 Applied forecasting\nauthor: \"Week 2: Time series graphics\"\nformat:\n beamer:\n aspectratio: 169\n fontsize: 14pt\n section-titles: false\n knitr:\n opts_chunk:\n dev: \"cairo_pdf\"\n pdf-engine: pdflatex\n fig-width: 7.5\n fig-height: 3.5\n include-in-header: ../header.tex\n---\n\n\n\n\n## CASE STUDY 1: Paperware company\n\n\\fontsize{11.5}{13}\\sf\n\n\\begin{textblock}{9.2}(0.2,1.5)\n\\textbf{Problem:} Want forecasts of each of hundreds of\nitems. Series can be stationary, trended or seasonal. They currently\nhave a large forecasting program written in-house but it doesn't seem\nto produce sensible forecasts. They want me to fix it.\n\n\\textbf{Additional information}\\vspace*{-0.2cm}\\fontsize{11.5}{13}\\sf\n\\begin{itemize}\\itemsep=0cm\\parskip=0cm\n\\item Program written in COBOL making numerical calculations limited. It is not possible to do any optimisation.\n\\item Their programmer has little experience in numerical computing.\n\\item They employ no statisticians and want the program to produce forecasts automatically.\n\\end{itemize}\n\\end{textblock}\n\n\\placefig{10.2}{1.4}{width=5.8cm}{tableware2}\n\n## CASE STUDY 1: Paperware company\n\\vspace*{0.2cm}\n\n### Methods currently used\n\nA\n: 12 month average\n\nC\n: 6 month average\n\nE\n: straight line regression over last 12 months\n\nG\n: straight line regression over last 6 months\n\nH\n: average slope between last year's and this year's values.\n (Equivalent to differencing at lag 12 and taking mean.)\n\nI\n: Same as H except over 6 months.\n\nK\n: I couldn't understand the explanation.\n\n## CASE STUDY 2: PBS\n\n\\fullwidth{pills}\n\n## CASE STUDY 2: PBS\n\n### The Pharmaceutical Benefits Scheme (PBS) is the Australian government drugs subsidy scheme.\n\n * Many drugs bought from pharmacies are subsidised to allow more equitable access to modern drugs.\n * The cost to government is determined by the number and types of drugs purchased. Currently nearly 1\\% of GDP.\n * The total cost is budgeted based on forecasts of drug usage.\n\n## CASE STUDY 2: PBS\n\n\\fullheight{pbs2}\n\n## CASE STUDY 2: PBS\n\n * In 2001: \\$4.5 billion budget, under-forecasted by \\$800 million.\n * Thousands of products. Seasonal demand.\n * Subject to covert marketing, volatile products, uncontrollable expenditure.\n * Although monthly data available for 10 years, data are aggregated to annual values, and only the first three years are used in estimating the forecasts.\n * All forecasts being done with the \\texttt{FORECAST} function in MS-Excel!\n\n## CASE STUDY 3: Car fleet company\n\n**Client:** One of Australia's largest car fleet companies\n\n**Problem:** how to forecast resale value of vehicles? How\nshould this affect leasing and sales policies?\n\n\\pause\n\n### Additional information\n - They can provide a large amount of data on previous vehicles and their eventual resale values.\n - The resale values are currently estimated by a group of specialists. They see me as a threat and do not cooperate.\n\n## CASE STUDY 4: Airline\n\n\\fullheight{ansettlogo}\n\n## CASE STUDY 4: Airline\n\n\n::: {.cell}\n::: {.cell-output-display}\n![](slides_files/figure-beamer/unnamed-chunk-1-1.pdf)\n:::\n:::\n\n\n\\only<2>{\\begin{textblock}{4.2}(11,5.5)\n\\begin{alertblock}{}\nNot the real data! Or is it?\n\\end{alertblock}\n\\end{textblock}}\n\n## CASE STUDY 4: Airline\n\n**Problem:** how to forecast passenger traffic on major routes?\n\n### Additional information\n\n * They can provide a large amount of data on previous routes.\n * Traffic is affected by school holidays, special events such as\nthe Grand Prix, advertising campaigns, competition behaviour, etc.\n * They have a highly capable team of people who are able to do\nmost of the computing.\n\n## Your turn\n\nWe have introduced various functions for time series graphics include `autoplot()`, `gg_season()`, `gg_subseries()`, `gg_lag()` and `ACF`. Use these functions to explore the quarterly tourism data for the Snowy Mountains.\n\n```r\nsnowy <- tourism |> filter(Region == \"Snowy Mountains\")\n```\n\nWhat do you learn?\n\n\n## Seasonal or cyclic?\n\n\\alert{Differences between seasonal and cyclic patterns:}\n\n * seasonal pattern constant length; cyclic pattern variable length\n * average length of cycle longer than length of seasonal pattern\n * magnitude of cycle more variable than magnitude of seasonal pattern\n\n\\pause\n\n\\begin{alertblock}{}\nThe timing of peaks and troughs is predictable with seasonal data, but unpredictable in the long term with cyclic data.\n\\end{alertblock}\n\n\n## Trend and seasonality in ACF plots\n\n- When data have a trend, the autocorrelations for small lags tend to be large and positive.\n- When data are seasonal, the autocorrelations will be larger at the seasonal lags (i.e., at multiples of the seasonal frequency)\n- When data are trended and seasonal, you see a combination of these effects.\n\n\n## Which is which?\n\n\n::: {.cell}\n::: {.cell-output-display}\n![](slides_files/figure-beamer/unnamed-chunk-2-1.pdf){width=14.5cm}\n:::\n:::\n",
"supporting": [
"slides_files"
],
Expand Down
Binary file modified _freeze/week2/slides/figure-beamer/unnamed-chunk-1-1.pdf
Binary file not shown.
Binary file modified _freeze/week2/slides/figure-beamer/unnamed-chunk-2-1.pdf
Binary file not shown.
21 changes: 11 additions & 10 deletions week2/slides.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,17 @@ the Grand Prix, advertising campaigns, competition behaviour, etc.
* They have a highly capable team of people who are able to do
most of the computing.

## Your turn

We have introduced various functions for time series graphics include `autoplot()`, `gg_season()`, `gg_subseries()`, `gg_lag()` and `ACF`. Use these functions to explore the quarterly tourism data for the Snowy Mountains.

```r
snowy <- tourism |> filter(Region == "Snowy Mountains")
```

What do you learn?


## Seasonal or cyclic?

\alert{Differences between seasonal and cyclic patterns:}
Expand All @@ -177,16 +188,6 @@ The timing of peaks and troughs is predictable with seasonal data, but unpredict
- When data are seasonal, the autocorrelations will be larger at the seasonal lags (i.e., at multiples of the seasonal frequency)
- When data are trended and seasonal, you see a combination of these effects.

## Your turn

We have introduced various functions for time series graphics include `autoplot()`, `gg_season()`, `gg_subseries()`, `gg_lag()` and `ACF`. Use these functions to explore the quarterly tourism data for the Snowy Mountains.

```r
snowy <- tourism |> filter(Region == "Snowy Mountains")
```

What do you learn?


## Which is which?

Expand Down

0 comments on commit 3d8ec0a

Please sign in to comment.