 Forecasting Average Global Temperature - Maple Programming Help

Home : Support : Online Help : Applications and Example Worksheets : Statistics : examples/GlobalTemperature

Forecasting Average Global Temperature

The following examples demonstrate techniques for analyzing time series data sets with the TimeSeriesAnalysis package.

 > $\mathrm{with}\left(\mathrm{TimeSeriesAnalysis}\right):$

Global Temperature Data

The following example uses a data set containing yearly global temperature measurements from 1901 to 2010. The data is compiled by the Earth Policy Institute from National Aeronautics and Space Administration (NASA) and Goddard Institute for Space Studies (GISS).

The first step is to retrieve the data. The data set is stored in the data center for the Earth Policy Institute.

The Import command can read in the data.

 > $\mathrm{AverageGlobalTemperature}≔\mathrm{Import}\left("http://www.earth-policy.org/datacenter/xls/indicator8_2011_1.xls",\mathrm{output}=\mathrm{Matrix}\right)\left[27..136,1..2\right];$
 ${\mathrm{AverageGlobalTemperature}}{≔}\left[\begin{array}{c}{\mathrm{110 x 2}}{\mathrm{Matrix}}\\ {\mathrm{Data Type:}}{\mathrm{anything}}\\ {\mathrm{Storage:}}{\mathrm{rectangular}}\\ {\mathrm{Order:}}{\mathrm{Fortran_order}}\end{array}\right]$ (1.1)

The TimeSeries constructor turns this data set into a TimeSeries object.

 >
 ${\mathrm{AverageGlobalTemperature}}{≔}\left[\begin{array}{c}{\mathrm{Time series}}\\ {\mathrm{Temperature \left(Degrees Celcius\right)}}\\ {\mathrm{110 rows of data:}}\\ {\mathrm{1901-12-31 - 2010-12-31}}\end{array}\right]$ (1.2)

The data can be plotted using the TimeSeriesPlot command:

 > $\mathrm{TimeSeriesPlot}\left(\mathrm{AverageGlobalTemperature}\right)$ Visualizing Trend & Modeling Future Global Temperatures

From the previous plot, it can be observed that the time series seems to have an upwards trend. To forecast future temperatures, first find a suitable model to match the actual data. Maple can select a suitable model from a family of 30 related models and adjust it to this time series.

 >
 ${\mathrm{TimeSeriesAnalysis}}{:-}{\mathrm{ExponentialSmoothingModel}}{}\left({\mathrm{errors}}{=}\left\{{"A"}\right\}{,}{\mathrm{trend}}{=}\left\{{"A"}\right\}{,}{\mathrm{seasonal}}{=}\left\{{"N"}\right\}{,}{\mathrm{α}}{=}{0.3142762575944068}{,}{\mathrm{β}}{=}{0.000006794010678434119}{,}{\mathrm{γ}}{=}{0.}{,}{\mathrm{φ}}{=}{1.}{,}{\mathrm{period}}{=}{1}{,}{\mathrm{l0}}{=}{13.732843382927616}{,}{\mathrm{b0}}{=}{0.008332679074619069}{,}{s}{=}{{\mathrm{_rtable}}}_{{18446744074663830462}}{,}{\mathrm{σ}}{=}{0.09917709117990757}{,}{\mathrm{constraints}}{=}{"both"}\right)$ (2.1)

To evaluate the fit of the model, view the OneStepForecast:

 > $\mathrm{modelts}≔\mathrm{OneStepForecasts}\left(\mathrm{model},\mathrm{AverageGlobalTemperature}\right)$
 ${\mathrm{modelts}}{≔}\left[\begin{array}{c}{\mathrm{Time series}}\\ {\mathrm{Temperature \left(Degrees Celcius\right) \left(1 step forecasts\right)}}\\ {\mathrm{110 rows of data:}}\\ {\mathrm{1901-12-31 - 2010-12-31}}\end{array}\right]$ (2.2)
 > $\mathrm{TimeSeriesPlot}\left(\left[\mathrm{modelts},\mathrm{color}="Orange",\mathrm{thickness}=2\right],\left[\mathrm{AverageGlobalTemperature},\mathrm{color}="Niagara Burgundy",\mathrm{thickness}=2\right],\mathrm{font}=\left["Helvetica",14\right],\mathrm{legendstyle}=\left[\mathrm{font}=\left["Helvetica"\right]\right]\right)$ From this plot, you can see that the forecast model follows the data suitably well. Using the model data, you can predict twenty years of future data using the forecast command and include a 95% confidence interval in order to see if the trend for global temperatures continues to increase based on previous data.

 >
 ${\mathrm{ForecastTemperatures}}{≔}\left[\begin{array}{c}{\mathrm{Time series}}\\ {\mathrm{Temperature \left(Degrees Celcius\right) \left(forecast - 2 percentile\right), Temperature \left(Degrees Celcius\right) \left(forecast - 50 percentile\right), Temperature \left(Degrees Celcius\right) \left(forecast - 98 percentile\right)}}\\ {\mathrm{20 rows of data:}}\\ {\mathrm{2011-12-31 - 2030-12-30}}\end{array}\right]$ (2.3)
 > From this plot, you can observe that based on the past 100 years of data, the trend indicates that global temperatures will increase.

 > $\mathrm{max}\left(\mathrm{GetData}\left(\mathrm{ForecastTemperatures}\left[2\right]\right)\right)-\mathrm{min}\left(\mathrm{GetData}\left(\mathrm{ForecastTemperatures}\left[2\right]\right)\right)$
 ${0.14671628}$ (2.4)

Based on the forecast model, you can expect the global temperature to go up 0.15°C over the next twenty years.

Notes

 Notes Note: The margin of error for these data is 0.05 °C; as such, it is impossible to distinguish between the years 2005 and 2010 on a statistical level.\nSource: Compiled by Earth Policy Institute from National Aeronautics and Space Administration (NASA), Goddard Institute for Space Studies (GISS), \"Global Land-Ocean Temperature Index in 0.01 degrees Celsius\" at http://data.giss.nasa.gov/gistemp/tabledata/GLB.Ts+dSST.txt, updated January 2011; Reto Ruedy, NASA GISS, e-mail to Alexandra Giese, Earth Policy Institute, 12 January 2010.