Presentation is loading. Please wait.

Presentation is loading. Please wait.

Topic11: Time series and trend analysis 060074 STATISTICS.

Similar presentations


Presentation on theme: "Topic11: Time series and trend analysis 060074 STATISTICS."— Presentation transcript:

1

2 Topic11: Time series and trend analysis 060074 STATISTICS

3 Introduction A time series consists of a set of observations which are measured at specified (usually equal) time intervals. Time series analysis attempts to identify those factors that exert an influence on the values in the series. Once these factors are identified, the time series may be used for both short-term and long-term forecasting.

4 A several of time series year GDP (100 million yuan) Total population (year-end) (10000 persons) Natural Growth Rate of Population (‰) Household consumption expenditures (yuan) 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 18547.9 21617.8 26638.1 34634.4 46759.4 58478.1 67884.6 74772.4 79552.8 80471.6 114333 115823 117171 118517 119850 121121 122389 123626 124810 125924 14.39 12.98 11.60 11.45 11.21 10.55 10.42 10.06 9.53 9.48 803 896 1070 1331 1781 2311 2726 2944 3094 3130

5 Time series components The four components usually identified are: Secular trend ----the underlying movement of the series Seasonal variation Cyclical variation Irregular variation While it is possible to break down a time series into these four components, the task is not always simple.

6 t indication Nov. 1992 The value in November, 1992 was decided by four factors in which the secular trend is more important.

7 Secular trend The secular trend is the long-term growth or decline of a series. It is decided by the property of the variable itself. In typical economic contexts, ‘long-term’ may mean 10 years or more. Essentially, the period should be long enough for any persistent pattern to emerge. Secular trends allow us to look at past patterns or trends and use these to make some prediction about the future. In some situations it is possible to isolate the effect of secular trends from the time series and hence make studies of the other components easier.

8 Actual data Straight-line trend Exponential trend The longer the time, the clearer the trend

9 Seasonal variation The seasonal variation of a time series is a pattern of change that recurs regularly over time. Seasonal patterns typically are one year long; that is, the pattern starts repeating itself at a fixed time each year. While variations may recur every year, the concept of seasonal variation also extends to those patterns that occur monthly, weekly, daily or even hourly. Time series graphs may be seasonally adjusted or deseasonalized by “seasonal index” when the seasonal variation of it is very strong. Such graphs give us a true picture of genuine movements in the time series after the seasonal effects have been removed.seasonal index

10 Examples of seasonal variation Air conditioner sales are greater in the summer months. Heater sales are greater in the winter months The total number of people seeking work is large at the end of each year when students leave school Motels, hotels and camping grounds have a greater volume of customers in holiday seasons Train ticket sales increase dramatically during festive seasons

11 Medical practitioners report a substantial increase in the number of flu cases each winter Liquor outlets undergo increased sales during festive seasons Airline ticket sales (and price!) increase during school holidays The amount of electricity and water used varies within each 24-hour period The volume of work for tax agents increases dramatically around the time when income tax forms have to be filed.

12 Cyclical variation In a similar manner to seasonal variations, cyclical variations have recurring patterns, but have a longer and move erratic time scale. Unlike seasonal variation, there is no guarantee that there will be any regularly recurring pattern of cyclical variation. It is usually impossible to predict just how long these periods of expansion and contraction will be.

13 Examples of causes of cyclical variation Floods Earthquakes / hurricanes Droughts Wars Changes in interest rates Major increases or decreases in the population

14 The opening of a new shopping complex The building of a new airport Economics depressions or recessions Major sporting events, such as the Olympic Games Changes in consumer spending (i.e. lack of confidence) Changes in government monetary policy

15 Irregular variation Irregular variation in the time series occurs varying (usually short) periods. It follows no regular pattern and is by nature unpredictable. It usually occurs randomly and may be linked to events that also occur randomly. It cannot be explained mathematically. In general, if the variation in a time series cannot be accounted for by secular trend, or by seasonal or cyclical variation, then it is usually attributed to irregular variation.

16 Examples of events that might cause irregular variation The assassination (or disappearance) of a country’s leader Short-term variation in the weather, such as unseasonably warm winters (they may affect sales of certain products) Sudden changes in interest rates The collapse of large (or even small) companies

17 Strikes (e.g. a strike by airline pilots affects many people working in the travel industry) A government calling an unexpected election Sudden shifts in government policy Natural disasters Dramatic changes to the stock market The effect of war in the Middle East on petrol prices around the world

18 Measurement of secular trend Measurement of secular trend can be somewhat subjective, depending on the technique used to measure it. The methods used to measure it. 1. semi-averages 2. least-squares linear regression 3. moving averages 4. exponential smoothing 5. growth model

19 Semi-averages yearExtra income($)Semi-totals ($)Semi-averages ($) 19984701 298195963.8 19995298 20005938 20016673 20027209 20037422disregard 20047780 445708914.0 20058476 20069066 20079363 20089885

20 5963.8 8914.0 Graph of actual data Semi-average trend line 2000 2006

21 Least-squares linear regression A more sophisticated way of fitting a straight line to a time series is to use the method of least-squares linear regression In this case, the observations are the (dependent) y-variables and time is the (independent) x-variable Since in this case the x-variable is time units, the calculations may be simplified as follows

22 yearValue of xExtra income-yx2x2 xy 1998-5470125-23505 1999-4529816-21192 2000-359389-17814 2001-266734-13346 200272091-7209 20030742200 2004177801 200528476416592 200639066927198 2007493631637452 2008598852549425 total08181111055381 n= 奇数

23 Excel

24 yearx Number of house y x2x2 xy 1995-749 -343 1996-513325-665 1997-3696-207 19981701-170 199911331 200031759525 2001515225760 20027185491295 total 010661681328 n= 偶数

25

26 Moving averages The method of moving averages is based on the premise that, if the values in a time series are averaged over a sufficient period, the effect of short-term variations will be reduced. That is, short-term cyclical, seasonal and irregular variations will be smoothed out, leaving an apparently smooth graph to show the overall trend.

27 Calculation of the 3-year moving averages for data yearNumber of sales 3-year moving total 3-year moving average 19941011---- 1995103130181006 199697630271009 1997102031911064 1998119533891130 1999117436301210 2000126137651255 2001133039751325 20021384----

28 Calculation of the 4-year moving averages for data yeary 4-year total 4-year average 4-year total 4-year average Moving average 199247.6---- 199348.9---- 203.350.8---- 199451.5203.350.8213.653.452.1 199555.3213.653.4226.456.655.0 199657.9226.456.6240.260.058.3 199761.7240.260.0255.163.861.9 199865.3255.163.8273.368.366.0 199970.2273.368.3296.374.171.2 200076.1296.374.1324.281.077.6 200184.7324.281.0---- 200293.2----

29 Exponential smoothing nExponential smoothing is a method for continually revising an estimate in the light of more recent trends. It is based on averaging (or smoothing) the past values in a series in an exponential manner. Recurrence relation: S x =αy x +(1 - α)S x-1 where: S x = the smoothed value for observation x y x = the actual value of observation x S x-1 = the smoothed value previously calculated for observation (x-1) α= the smoothing constant, (1 - α) is referred to as resistant coefficient where 0≤α≤1 Generally, we choose: S 1 =y 1, so S 2 =αy 2 + (1-α) S 1

30 yearxObservation y x S x-1 ( 1-α) S x-1 αy x SxSx 1992147.647.60 1993248.947.6028.5619.5648.12 1994351.548.1228.8720.6049.47 1995455.349.4729.6822.1251.80 1996557.951.8031.0823.1654.24 1997661.754.2432.5424.6857.22 1998765.357.2234.3326.1260.45 1999870.260.4536.2728.0864.35 2000976.164.3538.6130.4469.05 20011084.769.0541.4333.8875.31 20021193.275.3145.1937.2882.47 α=0.40 S 1 =y 1, S 2 = αy 2 +(1-α) S 1, S 3 = αy 3 +(1-α)S 2,----- S x =αy x +(1 - α)S x-1

31 Actual data Exponential smoothing trend curve (α=0.40) Excel The exponential model uses the current smoothed estimate as a forecast for future years. In this case, we would therefore forecast average daily sales of milk to be 82.47L in 2003

32 The smoothing constant ----α The selection of the most suitable value of α is not easy. The greater α is the more important recent trends are. Generally the value of α is chosen rather subjectively and However, the following criteria are useful: 1. suppose that the time series has strong irregular variation, or a seasonal variation causing wide swings, which it is desired to suppress. Then we might want to take more account of past trends of the series than recent trends. In this case, the value of α could be set small (say, =0.1) so that the history dominates the value of the smoothed observation. 2. suppose that the time series has little variation. Then we might want to take more account of recent observations than those in the past. In this case, the value of α could be set large (say, =0.9). Recent observations will dominate the value of the smoothed observation, with previous values providing merely a kind of background stability. S x =αy x + (1-α) S x-1

33 Growth model nSuppose that we note from a graph of the data that the trend appears to be exponential. In this case, a growth model may be appropriate. A growth model is one that takes account of this exponential trend. Suppose that we have a time series in which time is represented by the variable x and the corresponding observations are represented by the variable y. Further, suppose that we feel that the values of y are rising exponentially in relation to x. Then we may fit the model:

34 Constants----a and b sample (z, x)

35 Actual data Growth curve

36 year199719981999200020012002 Sales (y)127130148160185220 x123456 Z=lny4.8444.8684.9975.0755.2205.394 The least-squares regression line of z on x z=4.678+0.111x c 1 =4.678 c 2 =0.111 a=e 4.678 =107.55 b=0.111 Homework:S368 11.3, 11.6, 11.8, 11.19, 11.21 Excel

37 Class work Output of automobile made in China from 1991 to 2008 year Output (10 thousands) year Output (10 thousands) 1991 1992 1993 1994 1995 1996 1997 1998 1999 17.56 19.63 23.98 31.64 43.72 36.98 47.18 64.47 58.35 2000 2001 2002 2003 2004 2005 2006 2007 2008 51.40 71.42 106.67 129.85 136.69 145.27 147.52 158.25 163.00 1.Find the 3-year moving average for output of auto in the table 2.Find the least- squares regression line of output of auto in the table 3.Use the exponential smoothing model in the table to forecast the average output of auto in 2009 (α=0.4)

38 The average retail price of one dozen eggs in Hobart at 30 June is shown below at each of the 5-year intervals between 1971 and 1996. Use the growth model (use the last two digits of the year, i.e. 71, 76, etc.) to predict the price of eggs (to the nearest cent) in Hobart on 30 June 2001 Year197119761981198619911996 Price($)0.701.081.632.022.392.75

39 Answer z=-4.038+0.05394(year) c 1 =-4.038 c 2 =0.05394 a=e -4.038 =0.01763 b=0.05394

40 The key of multiple choice in pre-topic and this topic S.288 d, e, b, d, a b, e, b, e, e S.367 e, a, b, d, d d, b, b, e, b


Download ppt "Topic11: Time series and trend analysis 060074 STATISTICS."

Similar presentations


Ads by Google