Back to all projects
Statistics

Air Quality Prediction Using Statistical and Machine Learning Models in Lagos State, Nigeria

Admin 0 views 0 downloadsBSc/BA

Notice: This is a sample project for study and reference. Submitting it as your own work violates most universities' academic integrity policies.

Abstract



About This Research Topic

Lagos traffic is famous for the wrong reasons, but sitting in it does more than waste time. The exhaust, the idling generators, the dust that rolls in every harmattan season, all of it adds up to some of the most polluted air in West Africa, and most residents have no way of knowing on any given morning whether that day's air is merely bad or genuinely dangerous. Lagos currently has no system that tells people in advance. It reports what the air was like, not what it's about to become.

This article rewrites and expands a research study that builds toward exactly that missing capability, comparing four statistical and machine learning models, Multiple Linear Regression, Random Forest, Gradient Boosting, and an LSTM neural network, to see which one best predicts next-day PM2.5 concentrations in Lagos State using three years of monitoring data. It sits alongside other applied machine learning work in ScholarNestHub's project topics library, including a related study on an explainable AI framework for medical diagnosis decision support. The sections below walk through the study's background, problem, objectives, and scope, before closing with answers to the questions most commonly asked about air quality prediction and PM2.5 modelling.

Main Abstract

Air pollution is a leading environmental health risk globally and in Nigeria, with urban centres like Lagos State experiencing chronically elevated concentrations of particulate matter (PM2.5 and PM10), nitrogen dioxide, sulphur dioxide, carbon monoxide, and ground-level ozone. Accurate prediction of air quality concentrations enables early warning systems, health risk communication, and targeted pollution control interventions. This study developed and compared four air quality prediction models for PM2.5 concentration in Lagos State using three years of daily air quality and meteorological data, January 2021 to December 2023, comprising 1,095 daily observations. The models compared were Multiple Linear Regression (MLR), Random Forest (RF), Gradient Boosting Machine (GBM), and a Long Short-Term Memory (LSTM) neural network, using predictor variables that included meteorological factors and anthropogenic emission proxies such as traffic density and industrial activity indices.

Descriptive analysis revealed that Lagos State's mean PM2.5 concentration over the study period was 47.3 micrograms per cubic metre (SD = 28.4), substantially exceeding the WHO annual guideline of 5 micrograms per cubic metre and the Nigerian NESREA 24-hour standard of 35 micrograms per cubic metre. Harmattan season (November to February) concentrations were significantly higher, at a mean of 71.8 micrograms per cubic metre, than rainy season (May to September) concentrations, at a mean of 28.4 micrograms per cubic metre.

On the test dataset, the final 20 percent of chronological data comprising 219 days, the GBM model achieved the best predictive performance: RMSE = 8.74 micrograms per cubic metre, MAE = 6.12, R-squared = 0.877. Random Forest was second (RMSE = 9.41, R-squared = 0.854), LSTM was third (RMSE = 10.23, R-squared = 0.831), and multiple linear regression performed worst but still adequately (RMSE = 13.87, R-squared = 0.741). GBM feature importance identified relative humidity (24.3%), wind speed (18.7%), month as a harmattan indicator (14.2%), and temperature (12.8%) as the four most important predictors, and all four null hypotheses were rejected. The study recommends deploying the GBM model as the operational air quality prediction tool in Lagos State's early warning system, expanding the monitoring station network from the current eight stations to at least twenty stations across all local government areas, and implementing targeted emission control measures during identified high-risk periods.



Chapter One Preview

Background to the Study

Air pollution is the world's largest environmental health risk, responsible for an estimated 7 million premature deaths annually, according to the World Health Organization. The health impacts of air pollution are diverse and severe: short-term exposure to elevated concentrations of fine particulate matter, nitrogen dioxide, sulphur dioxide, and carbon monoxide triggers acute respiratory and cardiovascular events including asthma attacks, cardiac arrhythmias, and myocardial infarctions. Long-term exposure is causally linked to chronic obstructive pulmonary disease, lung cancer, ischaemic heart disease, stroke, and type 2 diabetes, as well as developmental effects including reduced foetal growth, preterm birth, and cognitive impairment in children.

Particulate matter with aerodynamic diameter less than 2.5 micrometres, PM2.5, is the air pollutant of greatest public health concern because it can penetrate deep into the lungs, enter the bloodstream, and reach vital organs including the heart and brain. Unlike larger particles that are filtered by the nose and upper respiratory tract, PM2.5 bypasses these natural defences and deposits in the pulmonary alveoli, causing direct cellular damage, inflammatory responses, and systemic oxidative stress. PM2.5 has no safe exposure level; even at concentrations below current WHO guidelines, measurable health impacts are documented in epidemiological studies.

In sub-Saharan Africa, rapid urbanisation, industrial expansion, increasing motor vehicle density, widespread use of diesel generators due to unreliable grid electricity, open burning of waste, and domestic use of biomass fuels for cooking have created severe urban air quality problems in major cities. Lagos State, as the most populous city and largest economic hub in Africa, with a metropolitan population estimated at 15 to 20 million people and one of the highest vehicle densities on the continent, faces particularly acute air quality challenges. The Apapa-Oshodi Expressway and Third Mainland Bridge corridors, with their notorious multi-hour traffic gridlock, generate concentrated vehicular emission plumes that affect millions of daily commuters, while Apapa port, with its diesel-powered cargo handling equipment and thousands of heavy trucks idling in approach queues, is one of the most significant stationary pollution sources in West Africa.

The Lagos State Environmental Protection Agency (LASEPA) operates eight air quality monitoring stations across the state, measuring hourly concentrations of PM2.5, PM10, NO2, SO2, CO, and O3. Data from these stations consistently show PM2.5 concentrations substantially exceeding both WHO guidelines and Nigeria's NESREA 24-hour standard of 35 micrograms per cubic metre. Annual mean PM2.5 concentrations at LASEPA monitoring stations have ranged from 40 to 90 micrograms per cubic metre in recent years, representing 8 to 18 times the WHO annual guideline.

Accurate prediction of daily PM2.5 concentrations is a critical component of effective air quality management. Reliable forecasts enable public health authorities to issue health advisories to sensitive population groups, children, the elderly, people with respiratory and cardiovascular conditions, before high pollution episodes occur, enabling protective behavioural adjustments. They also enable emission control authorities to implement temporary targeted interventions such as traffic restriction zones, industrial production limits, and open burning bans during predicted high-pollution periods. The rapid development of machine learning methods has dramatically expanded the toolkit available for environmental prediction tasks. Traditional statistical models such as multiple linear regression, while interpretable and computationally efficient, cannot capture the complex non-linear interactions between meteorological variables, emission sources, and atmospheric chemistry that determine ambient PM2.5 concentrations. Machine learning models including Random Forest, Gradient Boosting, and deep learning architectures including LSTM neural networks have demonstrated substantially superior predictive performance for air quality prediction in multiple international studies.

Despite the clear public health need and the global proliferation of machine learning-based air quality prediction studies, rigorous comparative analyses of statistical and machine learning models for PM2.5 prediction in Nigerian urban settings remain scarce. Most existing Nigerian air quality studies are descriptive, reporting observed concentration levels without developing predictive models. The few predictive modelling studies that exist use relatively short datasets and simple regression approaches without ensemble or deep learning methods. This study addresses these gaps using three years of high-quality monitoring data from Lagos State.

Statement of the Problem

Lagos State lacks an operational real-time air quality prediction system. LASEPA's current practice is to report current and historical air quality measurements but not to issue forecasts of expected pollution concentrations for the following day or days. This reactive rather than predictive approach means that vulnerable populations receive no advance warning of impending high pollution episodes, and that emission control interventions cannot be pre-emptively deployed before pollution events materialise.

A critical knowledge gap is the absence of a rigorously validated comparative analysis of statistical and machine learning prediction models for Lagos State PM2.5 concentrations using multi-year monitoring data. Without this comparison, LASEPA cannot make an evidence-based choice of which modelling approach to implement in an operational forecasting system. Furthermore, without identification of the dominant meteorological and anthropogenic predictors of PM2.5 variability in Lagos specifically, targeted pollution control interventions cannot be designed with the required precision.

Aim and Objectives of the Study

The aim of the study was to develop and compare statistical and machine learning models for predicting daily PM2.5 concentrations in Lagos State, and to identify the key meteorological and anthropogenic predictors of PM2.5 variability. The specific objectives were to:

●        Describe the temporal, seasonal, and spatial patterns of PM2.5 concentrations in Lagos State from 2021 to 2023.

●        Develop a multiple linear regression model for daily PM2.5 prediction and evaluate its assumptions and performance.

●        Develop and tune a Random Forest model for daily PM2.5 prediction.

●        Develop and tune a Gradient Boosting Machine (GBM) model for daily PM2.5 prediction.

●        Develop and train a Long Short-Term Memory (LSTM) neural network for daily PM2.5 sequence prediction.

●        Compare the predictive performance of all four models on a held-out test dataset using RMSE, MAE, and R-squared.

●        Identify the most important predictors of PM2.5 concentration using GBM feature importance analysis.

●        Make evidence-based recommendations for deploying the best model in Lagos State's air quality early warning system.

Research Questions

●        What are the seasonal, temporal, and spatial patterns of PM2.5 in Lagos State during 2021 to 2023?

●        Which of MLR, Random Forest, GBM, and LSTM provides the most accurate predictions of daily PM2.5 on held-out test data?

●        Which meteorological and anthropogenic variables are the strongest predictors of PM2.5 in Lagos State?

●        Do ensemble machine learning models (RF, GBM) significantly outperform the multiple linear regression baseline?

Significance of the Study

This study is significant across four dimensions. Operationally, the validated GBM model provides LASEPA with a deployable next-day PM2.5 forecasting tool that can be embedded in an automated early warning system, enabling health advisories to be issued to vulnerable populations before high pollution episodes. Methodologically, the comparative evaluation of four model classes using a rigorous train-test split protocol provides an evidence base for model selection decisions in Nigerian environmental prediction applications.

From a public health standpoint, quantifying the seasonal and meteorological drivers of PM2.5 peaks enables targeted pre-season health communication campaigns warning vulnerable populations about the harmattan season pollution surge. From a policy standpoint, the feature importance analysis identifying the dominant emission sources and meteorological modifiers of PM2.5 provides the evidence base for prioritising emission control measures. Students and researchers working on comparable applied statistics or machine learning projects can find additional structural guidance through ScholarNestHub's research coaching service, which supports learners refining their methodology, model evaluation approach, and results chapters.

Scope of the Study

The study uses daily PM2.5 concentrations averaged across the eight LASEPA monitoring stations and daily meteorological data from the Lagos State Meteorological Service for the period January 2021 to December 2023, comprising 1,095 daily observations. The primary outcome is daily mean PM2.5 concentration in micrograms per cubic metre. Other pollutants, PM10, NO2, SO2, CO, and O3, are used as exploratory variables but are not primary prediction targets.

The study has several limitations. Station-averaging across eight stations masks within-city spatial heterogeneity, though it provides a more representative state-level estimate than any single station. The three-year dataset, while adequate for model training, is shorter than would be ideal for assessing inter-annual variability trends, and training deep learning models on daily data with 876 training observations is computationally feasible but smaller than ideal for LSTM performance. Traffic density and industrial activity indices are proxy variables derived from administrative data rather than direct emission measurements, introducing measurement uncertainty, and the study does not account for transboundary pollution transport from other Nigerian states or from the Harmattan dust belt, which contributes significantly to dry-season PM2.5.

Operational Definition of Terms

PM2.5: Particulate matter with aerodynamic diameter less than 2.5 micrometres, measured in micrograms per cubic metre. The primary air quality indicator and prediction target in this study, and the pollutant addressed directly in the WHO global air quality guidelines.

Root Mean Squared Error (RMSE): The square root of the mean of squared differences between predicted and observed values. RMSE penalises large errors more than small ones and is in the same units as the outcome variable.

Mean Absolute Error (MAE): The mean of absolute differences between predicted and observed values. MAE is more robust to outliers than RMSE.

Random Forest (RF): An ensemble machine learning method that trains a large number of decision trees on bootstrap samples of the training data and averages their predictions. RF reduces overfitting through the combination of bagging and random feature selection at each tree split.

Gradient Boosting Machine (GBM): An ensemble machine learning method that builds decision trees sequentially, with each tree correcting the errors of the previous ensemble. GBM optimises a loss function using gradient descent, typically achieving higher accuracy than RF at the cost of greater computational complexity and more hyperparameter tuning.

LSTM Neural Network: A type of recurrent neural network designed to learn long-term dependencies in sequential data. LSTMs use gating mechanisms, an input gate, forget gate, and output gate, to selectively remember or forget information from previous time steps, making them well-suited for time series prediction tasks.

Feature Importance: In ensemble tree models, the contribution of each predictor variable to the model's overall predictive accuracy, typically computed as the total reduction in prediction error attributable to splits on that variable across all trees. Feature importance enables identification of the most influential predictors.

Harmattan: The dry, dusty north-easterly trade wind that blows from the Sahara Desert across West Africa between November and February, carrying large quantities of mineral dust that dramatically increases ambient PM2.5 concentrations in Lagos State during this season.

Conclusion

The gap between having air quality data and having air quality forecasts is, in practical terms, the gap between reacting to a pollution episode and warning people before it arrives. This study's findings point clearly toward Gradient Boosting as the strongest candidate for closing that gap in Lagos State, outperforming Random Forest, LSTM, and traditional regression on every accuracy measure tested, while also surfacing relative humidity and wind speed as the two most influential predictors worth monitoring closely. For a city where harmattan-season pollution levels can run more than twice as high as the rainy season, a working next-day forecast is not a minor technical upgrade, it is the difference between vulnerable residents having a warning or not. Researchers exploring related themes in environmental data science, applied machine learning, or public health can find further sample studies in ScholarNestHub's project topics library, spanning computer science, marketing, and public administration.

Frequently Asked Questions

1. Why is PM2.5 the main focus of air quality prediction studies?

PM2.5 refers to particulate matter smaller than 2.5 micrometres, small enough to penetrate deep into the lungs and bloodstream. It has no safe exposure threshold and is consistently linked to respiratory and cardiovascular disease, making it the pollutant of greatest public health concern and the most common prediction target in air quality research.

2. Which model predicted PM2.5 most accurately in this study?

The Gradient Boosting Machine (GBM) achieved the best performance on the held-out test dataset, with an RMSE of 8.74 micrograms per cubic metre and an R-squared of 0.877, outperforming Random Forest, LSTM, and multiple linear regression.

3. Why did machine learning models outperform simple linear regression?

Multiple linear regression cannot capture the complex, non-linear interactions between meteorological variables, emission sources, and atmospheric chemistry that drive PM2.5 concentrations. Ensemble methods like Random Forest and GBM, and sequence models like LSTM, are better suited to these non-linear relationships.

4. What are the strongest predictors of PM2.5 in Lagos State?

GBM feature importance analysis identified relative humidity, wind speed, month (as a harmattan season indicator), and temperature as the four most important predictors of daily PM2.5 concentration.

5. Why is PM2.5 so much higher during the harmattan season?

The harmattan is a dry, dusty trade wind that blows from the Sahara Desert across West Africa between November and February, carrying large quantities of mineral dust that substantially raises ambient PM2.5 concentrations during this period.

6. How does Lagos State's air quality compare to WHO guidelines?

Lagos State's mean PM2.5 concentration over the study period was 47.3 micrograms per cubic metre, well above the WHO annual guideline of 5 micrograms per cubic metre and the Nigerian NESREA 24-hour standard of 35 micrograms per cubic metre.

7. What data and methodology does a study like this typically use?

Studies in this area typically combine daily air quality monitoring data with meteorological records over a multi-year period, using a chronological train-test split to evaluate and compare statistical and machine learning models such as MLR, Random Forest, GBM, and LSTM using metrics like RMSE, MAE, and R-squared.

8. What is an early warning system for air quality, and why does Lagos need one?

An early warning system uses predictive models to forecast pollution levels in advance, allowing health authorities to issue advisories and emission control authorities to act before a pollution episode occurs. Lagos State currently reports historical air quality data but does not issue forecasts, leaving vulnerable populations without advance warning.

9. What are the limitations of this kind of environmental prediction study?

Common limitations include averaging data across monitoring stations, which can mask localised pollution hotspots; a training dataset that, while adequate, is smaller than ideal for deep learning methods like LSTM; and the use of proxy variables for traffic and industrial activity rather than direct emission measurements.

10. Where can I find a sample project on this topic for reference?

ScholarNestHub's project topics library includes related sample studies applying statistical and machine learning methods to real-world datasets, which can serve as structural and methodological references for students developing their own research.

Purchase to unlock the full material.