Forecasting Singapore Temperature
Data Preperation
- The original dataset was adjusted for forecasting by removing commas from numeric values using Excel’s substitute function, ensuring compatibility with R. After cleaning, the dataset was imported into R using the read_excel function. The data was then transformed into a numeric format, and the “Year” column was pivoted into a long format. Subsequently, the “Data Series” column was pivoted to a wide format and ordered by year, with 1960 as the starting point. The dataset is now ready for forecasting and analysis.

Forecasting Models
- Time Series Analysis
The time series plot below highlights the trend in Singapore’s average daily maximum temperature over the past 60 years. The red line indicates an upward trend, demonstrating that temperatures have increased, consistent with global warming patterns. This preliminary analysis provides a clear visual representation of the warming trend before any further data preparation.

- Moving Average Decomposition
A 3-year moving average was applied to the time series data to smooth out daily fluctuations, reducing noise and providing a clearer view of the trend. In the plot, the red line represents the moving average, while the black line shows the raw data. The decomposition reveals periods of both decrease and increase in temperature over time. However, the recent years indicate a rising trend, possibly reflecting the impact of global warming.

- Double Exponential Smoothing Model
A double exponential smoothing model was applied to the dataset due to the presence of a trend and the absence of seasonality in the annual data. This model offers a reliable short-term forecast. The red line in the plot represents the smoothed data, which effectively dampens sudden changes and spikes. Towards the end of the series, the forecasted values indicate an upward trend, aligning with the observed data pattern.

- ARIMA Model
Various ARIMA models were compared, and ARIMA(1,1,1) was selected as the best fit, with the lowest AIC value of 43.78. Differencing was applied with a lag of 1 to improve accuracy, as the first lag was identified as the only significant one. The ARIMA model order was confirmed using the ACF and PACF plots, ensuring the chosen model accurately captures the underlying data patterns.
The plot below showcases the forecasting of the next 10 years with the Arima model after the model has been checked through diagnostic in R. The red line shows the forecasted values with Arima and forecasts a steep increase followed by a gradual increase in temperature.

Best Model Selection
After comparing four models, the ARIMA model emerged as the best fit for the dataset, boasting the lowest AIC value, along with lower RMSE and MAE, indicating better predictive performance. The MASE for the ARIMA model was also below 1, outperforming a naïve model. In contrast, the linear regression model, despite having a significant p-value and high variance proportion, might not be the best fit for forecasting due to potential issues highlighted by the Durbin-Watson test. The ARIMA model’s superior fit makes it the most reliable choice for this dataset.
Short and Medium-Term Future
The models predict a positive trend in temperature, suggesting a potential increase in daily temperatures in Singapore. While the exact amount of temperature increase will depend on various external factors, the trend aligns with global climate change patterns. The National Environment Agency has also indicated that more hot days and warm nights could become the norm by the end of the century, supporting our forecast. As temperatures rise, the emphasis on green energy and sustainability will be crucial to mitigating the impact. Proactive planning and early action will be vital for Singapore to address these challenges effectively.