11 Time Series in Official Stats: Statistical Thinking and Communication about Variation over Time STOR 481: 14 Oct 2015 Emma Mawby Sonya McGlone: Statistics

Embed Size (px)

DESCRIPTION

A 1 minute challenge Write down all the ways that you have ever accessed outputs produced by Statistics New Zealand. e.g. looked at a media release on 3

Citation preview

11 Time Series in Official Stats: Statistical Thinking and Communication about Variation over Time STOR 481: 14 Oct 2015 Emma Mawby & Sonya McGlone: Statistics New Zealand 22 Contents: Green: activities, on paper, to discuss 1.Introduction 2.Two fascinating series, and reflections on them 3.What are TS, and what do you do with them? What do OS people do: filtering and seasonal adjustment Electronic card transactions 4.iNZight: smart new software (Break) 5.Births per quarter, and the Poisson distribution 6.Assignment 5 Time Series questions 7.The challenges and opportunities in Official Stats 8.Summary: signal and noise and, if we have time: 9.Big ideas in Time Series and Official Stats 10.Earnings and OSS issues 11. Term Test (Richard Arnold) A 1 minute challenge Write down all the ways that you have ever accessed outputs produced by Statistics New Zealand. e.g. looked at a media release on 3 Some tweets about Official Statistics 4 55 1: Introduction: Aims: 1.The world of Official Stats time series (essential, exhilarating, accessible) 2. iNZight 3. Apply statistical thinking and communication skills to variation in time series 4. Access and enjoy Assignment 5 questions Learning objectives for STOR 481: 1.key aspects of Official Statistics 2.legal and ethical constraints on organisations producing Official Statistics 3.principal methods for data collection, analysis and interpretation of health, social and economic data, including spatial data 4.methods for presenting and preparing commentaries on Official Statistics 7 Resources (1) Statistics New Zealand homepage:Stories about data: eg: Labour Market Statisticswork/employment_and_unemployment/LabourMarketStatisti cs_HOTPJun15qtr.aspxwork/employment_and_unemployment/LabourMarketStatisti cs_HOTPJun15qtr.aspx Data: NZ.StatInfoshare: (to eventually be replaced by NZ.Stat) Resources (2) Demonstration:tsnz.nsf/htmldocs/Seasonal+decomposition+demon strationtsnz.nsf/htmldocs/Seasonal+decomposition+demon stration Background on TS and Seasonal Adjustment:hods/data-analysis/seasonal-adjustment.aspxhods/data-analysis/seasonal-adjustment.aspx Software: iNZight and its time series module 8 9 2. What is Statistics all about? One answer is: _ _ _ _ _ t _ _ n 10 What is Statistics all about? One answer is: Variation Which occurs: in estimates from samples across time across a population or sample Thats us today Where does variation arise in OS? What does it look like? Nov Cross-sectional data: Income (NZIS) Series data: Guest nights: back packers Inference: Income: 100 means: SuperSURF 12 Official Stats and Time Series: Official Stats Stats Admin data Time Series stats Graph of my happiness score for Tuesday 13 th October 1.1 What has happened over these 27 years? 1.2 How does this data get collected? Does it have sampling error? 1.3 Why are there high values in some of the Q1s ( first quarters)? 1.4 What are these series going to do next? 1.5 What are these Quarter things that official stats folk are so keen on ? 14 Activity 1 : Two fascinating series Yes Unemployment Rate does have SE: (published from 1990 Q2, (found via resampling: jacknife)roundtable/statistics-roundtable-the-trusty-jackknife.html 16 3: What are time series?... A time series is a statistical record of a particular social or economic activity, with the data usually measured at regular intervals over a period of time. and what do we do with them? Time series are analysed to: understand the past predict the future A time series analysis quantifies the main features in the data (the signal) and the random variation (the noise) 17 18 So what are TS?? EG:So what do we do with it now??? 19 Crime data: Obvious things to do: Graph the series: Divide, to get Percent Resolved: And divide by Population to get Rates (offences per person) (from 1991) 20 Components of a time series The actual values of a time series are made up of the following components: Trend Long term cycle Seasonal component Irregular component We assume that some relationship exists between them. It is either multiplicative: A = C x S x I or additive: A = C + S + I 21 22 Filtering, seasonal adjustment and decomposition Statistics New Zealand time series tend to be either: The actual series Seasonally adjusted series with regular seasonal component removed Trend series just the trend cycle component Activity 2: A monthly series, filtered and seasonally adjusted (by Stats NZ): 2.1 Describe the features of the variation in debit card transactions 2.2 Why does Stats NZ publish the Seasonally Adjusted series? 2.3 Imagine that you own a business that receives mainly debit card transactions, and get StatsNZs latest info release. Of the three series (Actual, Seasonally adjusted, Trend), which might you use and why? 2.4 What do you expect to happen next in the series? 23 $million 4: iNZight: an intro: 8 slides24 Get some data TS, and other goodies, here TS here 26 Our unemployment TS Use Ignore Results: Decomposition: Seasonal features: For 2 or more series: Use Multi-Plot Results: multiplicative 5: Activity 3: Births per quarter What do you think the two series (male births, female births) look like? What features might they have? Sketch your guesses in. 3.2 Can you think of a sensible way to model this? Which distribution would be appropriate? Assumptions? Births per quarter actual data 33 Births per quarter and the Poisson distribution 34 If we assume the number of male or female births per quarter is Poisson with lambda = 7,077, then the two births series would look like this: 6. Four slides: STOR 481: 2015: Assignment 5: Time Series questions shortened version: Note: Assignment 5 will include questions from the Data Visualisation, Time Series and Macroeconomic Statistics lectures Please install iNZight:and try its Time Series option. Youll find this under the Advanced tab. In iNZights Data folder, youll find times series datasets for practice. To use a time series dataset from Infoshare (from the Statistics NZ website) in iNZight, you need to simplify it so that it contains only simple headings and the columns of data, and then save it as a csv file. 35 STOR 481: 2015: Assignment 5 Time Series questions, shortened version: 3: Number of Guest nights from the Accommodation Survey The Accommodation Survey consists of several series describing the number of guest nights spent in different types of accommodation in New Zealand. These series are found in the Industry sectors section of the Statistics New Zealand website:Statistics NZ HomeStatistics NZ Home > Browse for statistics > Industry sectors > AccommodationBrowse for statisticsation Please read all sections of the Accommodation Survey: August 2015 release. Also, please examine the second download, which contain tables and components of Accommodation Survey data for the last twelve months. Also, note the short Media Release. 36 STOR 481: 2015: Assignment 5 Time Series questions, shortened version: 3: Number of Guest nights from the Accommodation Survey (6% of final grade) From the Statistics New Zealand website (www.stats.govt.nz), select Infoshare, then use the Browse tab to selectwww.stats.govt.nz Tourism > Accommodation Survey- ACS> Actual by Accommodation by Type by Variable (Monthly) (See the assignment questions on which elements to select.) Read this csv file into iNZight and decompose it using the Decompose option (accessed via the Advanced and Time Series buttons). Use the graphs you produce to help you answer the questions. 37 STOR 481: 2015: Assignment 5: Time Series: shortened version: 3.1 (12 marks) Choose one accommodation type from Hotels, Motels or Backpackers. Describe the behaviour of the Number of guest nights for the period July 1996 to August 2015 for this accommodation type. Youll need to discuss the usual components of time series and any other feature or features that the number of guest nights shows. Now describe the behaviour of the Number of guest nights for the period July 1996 to August 2015 for Holiday parks. Now describe the differences between the two series. 3.2 (2 marks) Why do you think the series total excluding holiday parks is published as well as the series total. 3.3 (4 marks) As an Official Statistics agency, Statistics NZ aims to convey information about very complex situations to very wide audiences. Discuss and give examples of the communication methods that Statistics NZ uses to tell the stories that come from Accommodation Survey Statistics 38 End of Assignment 5 slides. 39 More media coverage. 40itics/ /Stats-NZ-anger-at- Labours-bias-claim 09/11/11 The end: enjoy the assignment! 41