Transforming historical motor insurance policy data into interpretable pricing insights through actuarial modelling, statistical analysis and predictive analytics.
- Project Overview
- Value Proposition
- Executive Summary
- Business Problem
- Business Questions
- Business Objectives
- Dataset
- Methodology
- Workflow Diagram
- Feature Engineering
- Statistical Model
- Model Validation Strategy
- Key Results
- Business Impact
- Visualisations
- Model Assumptions
- Model Limitations
- Skills Demonstrated
- Technologies Used
- Repository Structure
- How to Run the Project
- Future Enhancements
- Conclusion
- Author
- License
| Item | Description |
|---|---|
| Project | Motor Insurance Pricing Analytics |
| Domain | General Insurance |
| Business Area | Insurance Pricing & Risk Analytics |
| Project Type | End-to-End Actuarial Pricing Model |
| Analytical Method | Poisson Generalized Linear Model (GLM) |
| Programming Language | Python |
| Status | Completed |
| Author | Anthony Utulu |
This project demonstrates how actuarial modelling and predictive analytics can be used to estimate motor insurance claim frequency, identify key pricing risk factors and support data-driven underwriting and premium pricing decisions.
Rather than treating pricing as a purely statistical exercise, the project combines business understanding, actuarial methodology and practical model validation to produce an interpretable pricing framework suitable for insurance applications.
Accurate estimation of motor insurance claim frequency is fundamental to premium pricing, underwriting and portfolio risk management. Insurers require pricing models that are statistically robust, commercially interpretable and capable of supporting fair, evidence-based pricing decisions.
This project develops an end-to-end actuarial pricing model using a Poisson Generalized Linear Model (GLM) to predict motor insurance claim frequency from historical policyholder data. The analysis begins with data quality assessment and exploratory data analysis before progressing through feature engineering, statistical modelling, model validation and business interpretation. Engineered rating factors—including grouped driver age, grouped vehicle age and population density categories—were introduced to improve predictive performance beyond a baseline model.
The enhanced GLM demonstrated improved model fit, closely matched observed claim frequencies on unseen data and produced minimal prediction bias. The project illustrates how actuarial modelling techniques can transform raw insurance data into actionable pricing insights that support underwriting, portfolio management and strategic decision-making.
Motor insurers operate in an environment where inaccurate pricing directly affects profitability, competitiveness and regulatory compliance. Charging premiums that are too low increases exposure to underwriting losses, while overly conservative pricing may reduce market competitiveness and customer retention.
A robust pricing model should quantify the relationship between policyholder characteristics and expected claim frequency, enabling insurers to estimate future claims more accurately and price policies according to their underlying risk profile.
The challenge addressed in this project is therefore:
How can historical motor insurance policy data be transformed into a reliable and interpretable statistical model capable of predicting claim frequency and supporting actuarial pricing decisions?
The analysis seeks to answer the following business questions:
- Which policyholder characteristics have the greatest influence on motor insurance claim frequency?
- Which variables should be incorporated into a risk-based pricing framework?
- Can feature engineering improve the predictive performance of a traditional Poisson GLM?
- How accurately can claim frequency be predicted for unseen insurance policies?
- Does the enhanced pricing model demonstrate sufficient calibration to support actuarial pricing decisions?
- Which customer segments represent relatively higher or lower insurance risk?
- How can statistical modelling improve underwriting and premium setting?
The project was designed to achieve the following objectives:
- Assess the quality and suitability of the insurance portfolio data.
- Explore the relationships between policy characteristics and claim frequency.
- Identify significant actuarial rating factors.
- Develop a baseline Poisson Generalized Linear Model.
- Improve predictive performance through feature engineering.
- Compare baseline and enhanced pricing models.
- Evaluate model performance using appropriate statistical metrics.
- Validate predictions using unseen testing data.
- Translate analytical findings into practical business recommendations for pricing and underwriting.
The analysis uses the French Motor Third-Party Liability (MTPL) insurance dataset, a widely recognised benchmark for actuarial modelling and insurance pricing research.
The dataset contains historical motor insurance policy information and claim frequencies recorded at the policy level. Each observation represents an individual insurance policy together with policyholder, vehicle and geographic characteristics relevant to claim frequency modelling.
| File | Description |
|---|---|
freMTPL2freq.csv |
Policy-level exposure and claim frequency data |
freMTPL2sev.csv |
Claim severity information (not used in this frequency modelling project) |
The frequency dataset contains information relating to:
- Motor insurance policies
- Policy exposure
- Number of claims
- Driver characteristics
- Vehicle characteristics
- Geographic information
- Insurance rating factors
The analysis focuses exclusively on claim frequency modelling, which estimates the expected number of claims occurring during the exposure period.
| Variable | Description |
|---|---|
| ClaimNb | Number of reported claims |
| Exposure | Policy exposure period |
| VehPower | Vehicle engine power category |
| VehAge | Vehicle age |
| DrivAge | Driver age |
| BonusMalus | Bonus-Malus risk score |
| VehBrand | Vehicle manufacturer category |
| VehGas | Fuel type |
| Density | Population density |
| Region | Geographic region |
| Area | Area classification |
Before modelling, the dataset was subjected to a structured data quality assessment.
The assessment included:
- Missing value inspection
- Duplicate record assessment
- Variable type validation
- Distribution analysis
- Outlier identification
- Consistency checks
- Exposure validation
The exploratory analysis confirmed that the dataset was suitable for actuarial frequency modelling after categorical encoding and feature engineering.
The project follows a structured actuarial modelling workflow designed to ensure transparency, interpretability and statistical validity.
The analytical process consists of the following stages:
- Import raw policy data
- Inspect dataset structure
- Validate data quality
- Review variable definitions
Visual and statistical exploration was performed to understand relationships between policy characteristics and claim frequency.
This included:
- Summary statistics
- Distribution analysis
- Rating factor comparisons
- Regional comparisons
- Correlation analysis
- Exposure analysis
To improve model performance and interpretability, several additional pricing variables were engineered.
These include:
- Driver Age Groups
- Vehicle Age Groups
- Population Density Categories
- Encoded Rating Factors
- Exposure Offset
The engineered variables capture non-linear risk relationships more effectively than the original continuous variables.
Two pricing models were developed:
A standard Poisson Generalized Linear Model (GLM) using the original policy variables.
An improved GLM incorporating engineered actuarial rating factors and grouped risk variables.
The two models were compared using multiple statistical performance measures.
The enhanced model was evaluated using unseen testing data.
Validation included:
- Train/Test Split
- Prediction Accuracy
- Mean Absolute Error (MAE)
- Root Mean Squared Error (RMSE)
- Mean Poisson Deviance
- Residual Diagnostics
- Calibration Assessment
The project followed a structured actuarial pricing workflow, progressing from business understanding and data auditing through feature engineering, Poisson GLM modelling, validation and business interpretation to support evidence-based pricing decisions.
One of the key contributions of this project is the development of additional actuarial rating factors designed to improve predictive performance while maintaining model interpretability.
The following engineered variables were created:
| Engineered Feature | Business Purpose |
|---|---|
| Driver Age Groups | Capture non-linear driver risk profiles |
| Vehicle Age Groups | Improve modelling of vehicle ageing effects |
| Density Groups | Better represent urban and rural risk exposure |
| One-Hot Encoded Variables | Enable inclusion of categorical predictors in the GLM |
| Exposure Offset | Adjust predictions for differing policy durations |
Feature engineering resulted in measurable improvements in overall model performance.
Motor insurance claim frequency represents count data. Consequently, a Poisson Generalized Linear Model (GLM) with a log-link function was selected.
The expected claim frequency is modelled as:
Expected Claim Frequency
log(μ) = Xβ + log(Exposure Offset) where:
- μ = expected claim frequency
- X = explanatory variables
- β = estimated model coefficients
- Exposure = policy duration included as an offset
The exposure offset ensures that policies with different coverage periods are compared on an equivalent basis, making the model appropriate for insurance pricing applications.
To evaluate predictive performance, the dataset was divided into training and testing subsets.
The enhanced model was assessed using unseen observations to determine its ability to generalise beyond the training data.
Model performance was evaluated using:
- Mean Absolute Error (MAE)
- Root Mean Squared Error (RMSE)
- Mean Poisson Deviance
- Residual Analysis
- Calibration between observed and predicted claim frequencies
This validation approach provides confidence that the pricing model performs effectively on new insurance policies rather than simply memorising historical data.
The enhanced Poisson Generalized Linear Model demonstrated improved predictive performance over the baseline model following the introduction of engineered actuarial rating factors.
The enhanced Poisson Generalized Linear Model was compared with the baseline model using standard GLM goodness-of-fit statistics. Following feature engineering, the enhanced model demonstrated consistent improvements across all major model diagnostics, indicating a better overall fit while maintaining interpretability.
The engineered actuarial rating factors—including driver age groups, vehicle age groups and density categories—improved model fit by reducing model information criteria and residual deviance while increasing the log-likelihood. These improvements support the suitability of the enhanced model for actuarial pricing and underwriting applications.
The enhanced model was evaluated on an unseen testing dataset to assess its ability to generalise beyond the training data.
| Metric | Result |
|---|---|
| Average Actual Claim Frequency | 0.0534 |
| Average Predicted Claim Frequency | 0.0531 |
| Mean Absolute Error (MAE) | 0.0989 |
| Root Mean Squared Error (RMSE) | 0.2374 |
| Mean Poisson Deviance | 0.3215 |
| Mean Residual | 0.0003 |
The predicted average claim frequency (0.0531) closely matches the observed average claim frequency (0.0534), indicating excellent overall calibration.
The analysis identified several variables that materially influence motor insurance claim frequency.
The Bonus-Malus score was one of the strongest predictors of future claim frequency. Drivers with higher Bonus-Malus values consistently exhibited higher expected claim frequencies, confirming its importance as a pricing variable.
Driver age was found to have a non-linear relationship with claim frequency. Grouping drivers into meaningful age categories improved model performance and highlighted distinct risk profiles across different age bands.
Vehicle age and vehicle brand both contributed significantly to claim frequency. The enhanced model captured these effects more effectively through engineered categorical variables.
Regional location and population density influenced expected claim frequency, suggesting that environmental and geographic factors contribute to differences in insurance risk.
One of the most important findings of the project is that carefully engineered actuarial rating factors produced measurable improvements in model performance compared with using only the original variables.
This reinforces the importance of combining actuarial expertise with statistical modelling rather than relying solely on automated machine learning techniques.
The enhanced pricing model provides practical value across several areas of insurance operations.
- Supports more accurate estimation of expected claim frequency.
- Enables risk-based premium setting.
- Improves pricing consistency across customer segments.
The model provides underwriters with an evidence-based assessment of policyholder risk, allowing higher-risk policies to be identified more effectively during quotation and renewal.
Improved claim frequency estimation enables insurers to better understand the overall risk profile of their portfolio and supports more informed portfolio optimisation decisions.
The model assists insurers in:
- identifying emerging risk concentrations;
- monitoring regional exposure;
- evaluating demographic risk trends; and
- supporting capital planning.
Unlike many complex machine learning algorithms, the Poisson GLM remains highly interpretable.
Its transparent coefficient estimates make it particularly suitable for regulated insurance pricing environments where pricing decisions must be explainable.
The enhanced Poisson GLM produces predictions that closely follow the observed claim frequency, indicating good calibration across the test dataset.
The residual distribution is centred around zero, suggesting that prediction errors are approximately unbiased and that the model captures the underlying claim frequency structure effectively.
The notebook also contains a comprehensive collection of exploratory visualisations including:
- Claim frequency distributions
- Driver age analysis
- Vehicle age analysis
- Bonus-Malus analysis
- Regional comparisons
- Vehicle brand comparisons
- Population density analysis
- Exposure analysis
These visualisations support understanding of the portfolio before statistical modelling and provide business context for the engineered pricing variables.
The Poisson Generalized Linear Model (GLM) is based on several statistical assumptions that should be considered when interpreting the results.
- Claim frequency follows a Poisson distribution.
- Individual insurance policies are assumed to be independent observations.
- The logarithm of the expected claim frequency has a linear relationship with the explanatory variables.
- Policy exposure is correctly represented through the exposure offset.
- Historical claim behaviour is assumed to be representative of future experience.
- Explanatory variables are measured accurately and consistently across the portfolio.
These assumptions are appropriate for many actuarial pricing applications but should always be reviewed before deploying the model in production.
Although the enhanced GLM demonstrated strong predictive performance, several limitations remain.
- The project models claim frequency only and does not estimate claim severity.
- Interaction effects between rating factors were not included.
- Temporal effects such as inflation, seasonality and policy year were unavailable.
- External variables such as weather, traffic conditions and socio-economic factors were not included.
- The model assumes relationships observed in the historical data remain stable over time.
These limitations provide opportunities for future model development rather than reducing the practical value of the current pricing framework.
- Insurance Pricing Analytics
- Claim Frequency Modelling
- Generalized Linear Models (GLMs)
- Exposure Modelling
- Risk Factor Analysis
- Statistical Model Validation
- Rating Factor Development
- Insurance Portfolio Analysis
- Predictive Risk Modelling
- Business Interpretation of Analytical Results
- Exploratory Data Analysis (EDA)
- Data Cleaning
- Feature Engineering
- Statistical Analysis
- Predictive Analytics
- Data Visualisation
- Model Evaluation
- Business Intelligence
- Analytical Storytelling
- Python
- Pandas
- NumPy
- Statsmodels
- Scikit-learn
- Matplotlib
- Jupyter Notebook
- Git
- GitHub
| Category | Technology |
|---|---|
| Programming Language | Python |
| Data Analysis | Pandas, NumPy |
| Statistical Modelling | Statsmodels |
| Machine Learning | Scikit-learn |
| Visualisation | Matplotlib |
| Development Environment | Jupyter Notebook |
| Version Control | Git & GitHub |
Motor-Insurance-Pricing-Analytics/
├── assets/
│ ├── motor_insurance_banner_v2.png
│ ├── workflow_diagram.png
│ └── model_comparison.png
├── data/
│ ├── freMTPL2freq.csv
│ └── freMTPL2sev.csv
│
├── notebooks/
│ └── motor_insurance_pricing_analysis.ipynb
│
├── outputs/
│ └── business_summary.csv
│
├── reports/
│ ├── business_assumptions.md
│ ├── data_audit_report.md
│ ├── data_dictionary.md
│ ├── project_brief.md
│ └── project_log.md
│
├── visualizations/
│ ├── actual_vs_predicted_claim_frequency.png
│ └── residual_distribution.png
│
├── README.md
├── LICENSE
└── requirements.txt
git clone https://github.com/Utulu1/Motor-Insurance-Pricing-Analytics.gitcd Motor-Insurance-Pricing-Analyticspip install -r requirements.txtjupyter notebooknotebooks/motor_insurance_pricing_analysis.ipynb
Run the notebook sequentially to reproduce the complete actuarial pricing analysis.
Potential extensions to this project include:
- Gamma GLM for claim severity modelling
- Tweedie GLM for pure premium modelling
- Cross-validation for model robustness
- Gradient Boosting and XGBoost benchmarking
- SHAP value analysis for model explainability
- Automated pricing dashboards using Power BI
- Interactive deployment using Streamlit
- Integration of external risk variables such as weather and socio-economic indicators
These enhancements build naturally upon the current framework and represent logical next steps for expanding the pricing model.
This project demonstrates an end-to-end actuarial pricing workflow for predicting motor insurance claim frequency using a Poisson Generalized Linear Model.
Beginning with data quality assessment and exploratory analysis, the project progresses through feature engineering, statistical modelling, validation and business interpretation to deliver a transparent and well-calibrated pricing model.
The enhanced GLM achieved measurable improvements over the baseline model and produced accurate predictions on unseen data, highlighting the value of combining actuarial expertise with modern analytical techniques.
Beyond the statistical results, the project demonstrates the ability to translate complex analytical findings into practical business insights that support pricing, underwriting and risk management decisions. It reflects the analytical, technical and communication skills expected of professionals working in actuarial science and business analytics.
Actuarial & Business Analytics Professional
Transforming Data into Better Decisions
📧 Email: utulu.an@gmail.com
💼 LinkedIn: https://www.linkedin.com/in/utulu-an
💻 GitHub: https://github.com/Utulu1
If you found this project useful or would like to discuss actuarial modelling, insurance analytics or business analytics, feel free to connect with me on LinkedIn.
This project is licensed under the MIT License.
See the LICENSE file for further information.




