SADC Course in Statistics Trends in time series (Session 02)

Slides:



Advertisements
Similar presentations
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Advertisements

Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
1 Correlation and Simple Regression. 2 Introduction Interested in the relationships between variables. What will happen to one variable if another is.
Module 2 Sessions 10 & 11 Report Writing.
SADC Course in Statistics Common Non- Parametric Methods for Comparing Two Samples (Session 20)
SADC Course in Statistics Multiple Linear Regresion: Further issues and anova results (Session 07)
SADC Course in Statistics Estimating population characteristics with simple random sampling (Session 06)
SADC Course in Statistics Simple Linear Regression (Session 02)
The Poisson distribution
SADC Course in Statistics Further ideas concerning confidence intervals (Session 06)
SADC Course in Statistics Introduction to Non- Parametric Methods (Session 19)
SADC Course in Statistics Tests for Variances (Session 11)
Assumptions underlying regression analysis
SADC Course in Statistics The binomial distribution (Session 06)
SADC Course in Statistics Importance of the normal distribution (Session 09)
SADC Course in Statistics Revision of key regression ideas (Session 10)
Correlation & the Coefficient of Determination
SADC Course in Statistics Confidence intervals using CAST (Session 07)
SADC Course in Statistics Sampling design using the Paddy game (Sessions 15&16)
SADC Course in Statistics Decomposing a time series (Session 03)
SADC Course in Statistics Multi-stage sampling (Sessions 13&14)
SADC Course in Statistics Session 4 & 5 Producing Good Tables.
SADC Course in Statistics Exploratory Data Analysis (EDA) in the data analysis process Module B2 Session 13.
SADC Course in Statistics Graphical summaries for quantitative data Module I3: Sessions 2 and 3.
SADC Course in Statistics Comparing two proportions (Session 14)
SADC Course in Statistics Revision using CAST (Session 04)
SADC Course in Statistics Introduction to Statistical Inference (Session 03)
SADC Course in Statistics Review of ideas of general regression models (Session 15)
SADC Course in Statistics A model for comparing means (Session 12)
SADC Course in Statistics Revision on tests for means using CAST (Session 17)
SADC Course in Statistics Analysing Data Module I3 Session 1.
SADC Course in Statistics Revision on tests for proportions using CAST (Session 18)
Probability Distributions
SADC Course in Statistics Good graphs & charts using Excel Module B2 Sessions 6 & 7.
SADC Course in Statistics Excel for statistics Module B2, Session 11.
Learning Objectives for Section 3.2
September 2005Created by Polly Stuart1 Analysis of Time Series For AS90641 Part 2 Extra for Experts.
Simple Linear Regression 1. review of least squares procedure 2
Module 4. Forecasting MGS3100.
Chapter 4 Systems of Linear Equations; Matrices
Quantitative Analysis (Statistics Week 8)
The x- and y-Intercepts
The Slope-Intercept Form of a Line
Drawing Graphs of Quadratic Functions
Multivariate Data/Statistical Analysis SC504/HS927 Spring Term 2008 Week 18: Relationships between variables: simple ordinary least squares (OLS) regression.
Lecture Unit Multiple Regression.
25 seconds left…...
Chapter 2 Functions and Graphs
We will resume in: 25 Minutes.
Copyright © Cengage Learning. All rights reserved.
Simple Linear Regression Analysis
Copyright © 2012 by Nelson Education Limited. Chapter 13 Association Between Variables Measured at the Interval-Ratio Level 13-1.
Correlation and Linear Regression
Multiple Regression and Model Building
Heibatollah Baghi, and Mastee Badii
MA 1128: Lecture 06 – 2/15/11 Graphs Functions.
©The McGraw-Hill Companies, Inc. 2008McGraw-Hill/Irwin Lesson 12.
Objectives 10.1 Simple linear regression
CORRELATON & REGRESSION
McGraw-Hill/Irwin Copyright © 2010 by The McGraw-Hill Companies, Inc. All rights reserved. Time Series and Forecasting Chapter 16.
Time Series and Forecasting
Business Forecasting Used to try to predict the future Uses two main methods: Qualitative – seeking opinions on which to base decision making – Consumer.
INTERNAL ACHIEVEMENT STANDARD 3 CREDITS Time Series 1.
Demand Management and Forecasting Module IV. Two Approaches in Demand Management Active approach to influence demand Passive approach to respond to changing.
SADC Course in Statistics Forecasting and Review (Sessions 04&05)
Relationships If we are doing a study which involves more than one variable, how can we tell if there is a relationship between two (or more) of the.
Jon Curwin and Roger Slater, QUANTITATIVE METHODS: A SHORT COURSE ISBN © Thomson Learning 2004 Jon Curwin and Roger Slater, QUANTITATIVE.
Time Series and Trend Analysis
F5 Performance Management. 2 Section C: Budgeting Designed to give you knowledge and application of: C1. Objectives C2. Budgetary systems C3. Types of.
Demand Management and Forecasting
Presentation transcript:

SADC Course in Statistics Trends in time series (Session 02)

To put your footer here go to View > Header and Footer 2 Learning Objectives By the end of this session, you will be able to explain the main components of a time series use graphical procedures to examine a time series for possible trends describe the trend in the series –using a moving average –by fitting a line to the trend use the trend to do simple forms of forecasting

To put your footer here go to View > Header and Footer 3 General approach to analysis Step 1: Plot the data with time on x-axis Step 2: Study the pattern over time –Is there a trend? –Is there a seasonality effect? –Are there any long term cycles? –Are there any sharp changes in behaviour? –Can such changes be explained? –Are there any outliers, i.e. observations that differ greatly from the general pattern

To put your footer here go to View > Header and Footer 4 General approach to analysis Step 3: State clearly your objectives for study of the time series Step 4: Paying attention to the objectives, analyse the data, using descriptive analyses first, and moving later to other forms of analyses Step 5: Write a report giving the key results and the main findings and conclusions

To put your footer here go to View > Header and Footer 5 Main components of a time series Trend: the general direction in which the series is running during a long period Seasonal effects: Short-term fluctuations that occur regularly – often associated with months or quarters Cyclical effects: Long-term fluctuations that occur regularly in the series Residual: Whatever remains after the above have been taken into account, i.e. the unexplained (random) components of variation

To put your footer here go to View > Header and Footer 6 Examining trends Following slides include: Identifying if there appears to be a trend Describing and examining the trend using –Moving averages –Fitting a straight line to the data Simple approaches to forecasts, and likely dangers Note: Cyclical effects will not be covered since they are usually difficult to identify and need long series

To put your footer here go to View > Header and Footer 7 An Example Data below show the number of unemployed school leavers in the UK (in 000) Source: Employment Gazette YearJan-MarApr-JunJul-SepOct-Dec Graphing the data is needed, but first need to put data in list format

To put your footer here go to View > Header and Footer 8 Putting the data in list format YearQuarterLeavers The decimals for the quarters are only intended to give a rough approximation of the time point

To put your footer here go to View > Header and Footer 9 Clear seasonal and trend effects:

To put your footer here go to View > Header and Footer 10 Estimating trend - moving average We will ignore the seasonal pattern for now, and concentrate on estimating the trend… Purpose: to smooth out the local variation and possibly seasonal effects Method: Replace each observation by a weighted average of observations around (and including) the particular observation. Results will depend on –number of observations used –weights used

To put your footer here go to View > Header and Footer 11 An example Suppose we have the series Y 1, Y 2, ……….., Y n Then a moving average with weights 1 / 8, ¼, ¼, ¼, 1 / 8 Would have the i th value equal to Y i * = ( 1 / 8 )Y i-2 + ( ¼) Y i-1 + ( ¼) Y i + ( ¼) Y i+1 + ( 1 / 8 )Y i+2

To put your footer here go to View > Header and Footer 12 Points to note… Weights should always add to 1. To find a moving average, need to decide what order to use, i.e. how many to average. For data in quarters, sensible to use order=4 Where order=r, and r is odd, moving average (m.a.) values cannot be defined for the first (r-1)/2 and last (r-1)/2 obs ns in the series If r is even, m.a. values will lie midway between times of observation - nicer to have it coinciding with the time points of observed data

To put your footer here go to View > Header and Footer 13 Possible action when r is even If data are in quarters (say) could use a 4-point moving average first with equal weights, i.e. ¼, ¼, ¼, ¼ Then use a further moving average of order 2 on the first computed moving average, again with equal weights, i.e. ½, ½ This is equivalent to using weights 1 / 8, ¼, ¼, ¼, 1 / 8 on the original data series! i.e. it is equivalent to a 5-point m.a. See next slide last column for an example…

To put your footer here go to View > Header and Footer 14 Calculating the moving average YearQuarterLeaversThree-point mean Five-point moving average Verify a few of the values in the last 2 columns…

To put your footer here go to View > Header and Footer 15 Time Series & the fitted trend The increasing trend is now clearly visible

To put your footer here go to View > Header and Footer 16 Estimating trend – fitting a line A second method for estimating trend is to find an equation giving the best fit to the trend. The simplest is a straight line, i.e. Y =a + bX Here a is called an intercept and b is called the slope of the line. Formulae for a and b, which minimise the squared distances of each data point from the line, are given on the final slide.

To put your footer here go to View > Header and Footer 17 Interpreting the line p q a The intercept a is shown on the graph. The slope b is given by b = p/q

To put your footer here go to View > Header and Footer 18 Equation of the line Equation of line is y = x

To put your footer here go to View > Header and Footer 19 Forecasting – simple approach Return to the equation of the line of best fit to the data, i.e. y = x For a future value of x, say at quarter 13, we may find y as y = (13) = However, there are many dangers involved with doing this – and it is not advisable to do without recognising these

To put your footer here go to View > Header and Footer 20 Some dangers in predictions Fitting a straight line as done here is part of a larger topic called Regression Analysis (contents of Module H8) One basic assumption is that repeat observations taken in time are assumed to be independent. This is rarely the case. Another is that the validity of the prediction becomes poorer as the value of x used (in the prediction) moves away from the time values used in finding the equation. DO NOT MAKE FORECASTS without further knowledge of many statistical and other practical issues involved in doing so.

To put your footer here go to View > Header and Footer 21 Practical work Use data on temperature records, to find a moving average, study its pattern, and write a short report of the results and conclusions Go through parts of Section 2 of CAST for SADC : Higher Level for improving your knowledge of the basic ideas of this session. Details of both exercises are given in the handout entitled Estimating Trend in a Time Series (Practical 02).

To put your footer here go to View > Header and Footer 22 Calculations for best fit line Let the equation of line be: Y = a + b*i, where i refers to the time points, incrementing by 1. Then and

To put your footer here go to View > Header and Footer 23 Some practical work follows…