Moving Averages Objectives: D GradeInterpret a Time Series Graph B Grade Construct a Time Series Graph and Plot the Moving Averages
A line graph is a series of points joined with straight lines e.g.a patient’s temperature was recorded every 2 hours after receiving medication: Note the features: Title Axis Labels The points are plotted as coordinates The points are joined with straight lines A second set (or more) of data may be added to the graph. What does this line represent? Normal body temperature
Moving Averages Because the line graph of temperature was plotted against time it can also be called a ‘Time Series Graph’ Time Series Graphs are often used by people to identify trends over a period of time where they may be natural fluctuations. For example, after installing loft and cavity wall insulation a householder wants to review his gas bills to see if he is saving money.
Moving Averages A graph of gas bills plotted against time. Why is the x axis labelled with years and 1 st, 2 nd, 3 rd, 4 th ? Why is there so much fluctuation in the graph – is there a pattern? Utility (gas, electric, water, etc.,) bills are sent out every 3 months (quarter of a year) The 1 st quarter is winter when you would expect to use a lot of gas for heating, the 3 rd quarter is the summer when you don’t use the heating.
Moving Averages A different number of points for a moving average can be selected depending upon the data being analysed. Different types of data suit different moving averages Electricity BillThree-point moving average Gas Bill Four-point moving average Half-term test results Five-point moving average Phone Bill Six-point moving average Daily Superstore Sales Seven-point moving average Termly test results Which type of moving average which suit which data set?
Moving Averages Time Series Graph Year Quarter1st2nd3rd4th1st2nd3rd4th1st2nd3rd4th Ice Cream Sales (£) Plot the data as a time series graph: This is essentially a line graph. The time is always plotted on the x-axis st Qtr 2 nd Qtr 3 rd Qtr 4thQtr 1 st Qtr 3 rd Qtr 4 th Qtr 1 st Qtr 2 nd Qtr 3 rd Qtr 2 nd Qtr 4 th Qtr Ice Cream Sales (£) x x x x x x x x x x x x
Representing Data Moving Averages Moving Averages are a way of looking at a trend over a period of time. For a four-point the mean is calculated from the first four pieces of data, then the next point is calculated by moving the selection one place across to calculate the mean of 4 points again Year Quarter1st2nd3rd4th1st2nd3rd4th1st2nd3rd4th Ice Cream Sales (£) Moving Average 1 The moving average point is plotted in the middle of the 4 points the average is taken from st Qtr 2 nd Qtr 3 rd Qtr 4thQtr 1 st Qtr 3 rd Qtr 4 th Qtr 1 st Qtr 2 nd Qtr 3 rd Qtr 2 nd Qtr 4 th Qtr Ice Cream Sales (£) x x x x x x x x x x x x x x x x x x x x You can see there is a general increase in sales over time For a 3 point moving average take the mean over 3 points, for a 5 point moving average take the mean over 5 points, etc. 575 Ice Cream Sales (£) Moving Average Calculate the mean of the first 4 points i.e = Calculate the mean of the second 4 points i.e = 579 4
Moving Averages P20 Q 5 P21 Q 6 Year Quarter1st2nd3rd4th1st2nd3rd4th Cost£230£120£50£80£215£120£25£55 Four-point moving average £120£116 DayMon Tue Wed Thu Fri Sessiona.m.p.m.a.m.p.m.a.m.p.m.a.m.p.m.a.m.p.m. Number Two point moving average
Moving Averages P21 Q 7 P21 Q 8 QuarterJul-04Oct-04Jan-05Apr-05Jul-05Oct-05Jan-05Apr-06 Shop Sales Jul-04 Oct-04 Jan-05 Apr-05 Jul-05 Oct-05 Jan-05 Apr Sales (£ thousands) x x x x x x x Year SessionAutumnSpringSummerAutumnSpringSummerAutumn Exam Result (%) x
Moving Averages P20 Q 5 Year Quarter1st2nd3rd4th1st2nd3rd4th Cost£230£120£50£80£215£120£25£55 Four-point moving average £120£116 1 st 2 nd 3 rd 4 th Time (year, quarter) Cost (£) x x x x x x x x £ £110 £ x x x x The trend is moving downwards which means that the electricity costs are falling
Moving Averages P21 Q 6 DayMon Tue Wed Thu Fri Sessiona.m.p.m.a.m.p.m.a.m.p.m.a.m.p.m.a.m.p.m. Number Two point moving average Mon a.m. Mon p.m. Tue a.m. Tue p.m. Wed a.m. Wed p.m. Thu p.m.Thu a.m. Fri a.m. Fri p.m Number Present x x x x x x x x x x x x x x x x x x x The trend is downwards – starting low on Monday, then rising to Wednesday, but Falling sharply towards Friday.
Moving Averages P21 Q 7 P21 Q 8 Jul-04 Oct-04 Jan-05 Apr-05 Jul-05 Oct-05 Jan-05 Apr Sales (£ thousands) x x x x x x x Year SessionAutumnSpringSummerAutumnSpringSummerAutumn Exam Result (%) QuarterJul-04Oct-04Jan-05Apr-05Jul-05Oct-05Jan-05Apr-06 Shop Sales x x x x x x c. The trend is slightly upwards d. The next point would probably lie at 67 67= x 4 67 × 4 = x 268 = x x = 122 So the next quarter sales would be about £ Aut-05 Spr-06 Sum-06 Aut-06 Spr-07 Sum-07 Aut-07 x x x x x x x x x x x x x