Skip to content

Latest commit

 

History

70 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Health Insurance Claims

Health Insurance Claims Analysis with Python and Jupyter Notebook, analyzing demographic and behavioural risk factors (Age, BMI, Smoking status) impacting medical insurance charges.

Notebook Link


Table of Contents


Overview

  • The dataset was chosen to assess heath insurance underwriting.
  • Python in Jupyter Notebook was used for the analysis.
  • The objective was to determine segmentation, risk scoring, data insights and scenario testing

Dataset

  • The dataset is Medical Cost Personal Datasets from Kaggle
  • Size of the dataset is 1338 rows and 7 columns
  • The analysis with this dataset is duplicated in Power PI and Tableau Desktop

Dataset: insurance.csv


Technologies Used

  • Languages & Libraries: Python, Pandas, NumPy, Matplotlib, Seaborn, sklearn
  • Tools: Jupyter Notebook, VS Code, Git, GitHub

Python Pandas NumPy Matplotlib Seaborn scikit-learn

Jupyter Notebook VS Code Git GitHub

MIT License


Installation

Step-by-step instructions to set up the project locally:

# Clone the repository
git clone git clone https://github.com/Kurodataio/Health-Insurance-Claims.git

# Navigate to the project folder
cd Health-Insurance-Claims

# Launch Jupyter Notebook
jupyter notebook

Usage

Instructions for using the project:

  1. Open the main notebook (health-insurance-claims.ipynb)
  2. Run ALL cells or each cell sequentially to reproduce the analysis
  3. Visualizations and results will be generated automatically

Analysis & Visualizations

  • Age vs. Claims Cost (Smoker Highlighted)

    • 3 clear bands with linear relationship between age and claims cost
    • Bottom blue non-smokers band has lowest age to claims cost
    • Middle non-smokers and smokers
    • Top orange smokers band has the gighest agr to claims cost
    • The is a clear positive linear relationship between age and claims cost
    • Smoking increases the cost of caims
  • BMI vs. Claims Cost

    • For non-smokers BMI is minor impact on costs. Most claims costs for non smokers are below $15k
    • For smokers, there is significant BMI impact beyond BMI of 30
    • BMI minimal impact on claims costs for non-smokers however for BMI over 30 there is an sudden and increasing impact on costs Age_&_BMI_vs_Claims_Cost
  • Claims Cost by Smoker Status

    • The average claims cost between smokers and non-smokers claims cost is significant
    • Non-smokers have a median cost of $7,500
    • Smokers have a mediam cost of $34,500
    • There is no overlap between the smoking and non-smoking groups
    • The 75th percentile for non-snokers is lower than the 25th percentile for smokers
    • For non smokers the claims cost are between $4,000 and $11,500
    • For smokers the claims cost are between $21,000 to $41,000
    • Smokers have a wider range (variance) of claims costs
    • Non smokers have many outlying claims around $23,000 up to $37,000
    • This plot shows high outliers for non-smokers are within the typical claims cost for smokers Claims_Cost_by_Smoker_Status
  • Feature_Importance

Feature_Importance

  • Claims Cost by Dependents

    • The average (median) claims cost for all groups is $8,000 and $11,000
    • 0 to 2 dependents: The median is around $8,500–$9,500
    • 3 to 4 dependents: The mdian peaks at $11,000 for 4 dependents
    • 5 dependents: The median is under $9,000
    • The group with 0 dependents has outliers with the highest cost of $60,000+
    • The group with 5 dependents has outliers with the lowest cost at under $20,000
    • The number of dependents does not dictate high claims cost. In fact it seems the opposite. Claims_Cost_by_Dependents
  • Claims Cost by Gender

    • Both genders have an average claim cost of $9,300.
    • Gender has no significance to median claim costs
    • Both genders have a long tail of outliers. Beyond $30K for Women and beyond $40k for men Claims_Cost_by_Gender
  • Claims Cost by Region

    • Southwest, Southeast, Northwest have a median claims cost around $9k to $9.3k
    • Northeast has a higher median claims cost around $10k.
    • Region is a not a significant determinant of claims cost.
    • The Southeast has the highest range of claims costs. It also has the highest outlier costs
    • The outliers can be associated with risk factors such as smoking and high BMI Claims_Cost_by_Region
  • Average BMI by Region

    • Highest BMI Region: southeast (Mean: 33.36)
  • Percentage of Smokers by Region

    • Highest Smoker Region: southeast (25.0%)
  • The plot of Average BMI and smokers confirms why the Southeast has the higher claims costs Avg BMI & Percentage of Smokers by Region

  • Claims Cost Distribution by Smoking Status

    • The non-smokers show right-skewed distribution
    • The highest frequency (density) of individuals show claims cost between $2,000 and $10,000.
    • The data shows that most of the minor claims are by non-smokers
    • The data shows two peaks for smokers. It is bimodal.
    • The first peak cluster is between $15,000–$25,000.
    • The second peak cluster is between $35,000–$50,000. Claims_Cost_Distribution_by_Smoking_Status
  • Correlation_Heatmap

    • The positive correlation between smoker and claims cost is 0.79
    • The positive correlation between age and claims cost is 0.30 and 0.20 for bmi and claims cost.
    • The heatmap does not show the interaction effect between BMI and smoking which is associated with higgher costs.
    • The heatmap clearly shows the following:
      • Smoker status (Highest correlation)
      • Age (High correlation)
      • BMI (Moderate correlation) Correlation_Heatmap
  • Distribution of Claims Cost

    • The distribution of claims is skewed to the right (positive) skewed
    • Most of the insurance claims are low to medium in costs
    • The distribution is bimodal, primary and secondary peaks
    • The two peaks suggest sub populations of claims cost
    • Mode Claims Cost is $1639.56
    • Median Claims Cost is $9382.03
    • Mean Claims Cost is $13270.42 Distribution_of_Claims_Cost
  • Loss_Ratio_Distribution

    • The Loss Ratio (LR) represents the ratio of losses (claims paid) to premiums earned
    • Loss Ratio (LR) = Total Losses (L) / Total Premium (P)
    • A loss ratio of 1.0 (or 100%) means the company is paying out exactly what it collects in premiums.
    • Most of the small and medium claims are profitable.
    • The high claims costs are not profitable
    • Adjusting the slope coefficient to cover higher costs penalizes the lower claims with higher premiums Loss_Ratio_Distribution
  • Loss Ratio Distribution: Current vs Proposed Pricing

    • The risk based pricing is a flattened curve and spreads the risk across the x-axis way past 60.0 and 80.0
    • This plot shows the proposed model heavily underprices a large segment of the portfolio.
    • The proposed risk based pricing needs corrective changes Loss Ratio Distribution: Current vs Proposed Pricing

Conclusion

  • Smoking is the biggest risk feature for high claims cost. This single driver puts an individual into a higher cost bracket regardless of age or BMI.
  • Obesity (BMI $\ge$ 30) acts as a compounding multiplier when associated with smoking.
  • Smoking and BMI combined are associated with the highest claims cost
  • The Southeast region has the highest levels of smoking and obesity (high BMI) rates. Remediation could be targeted at this region as a priority.
  • The southeast region has the highest claims cost, which is associated with the highest number of smokers and obese people.
  • Further data and analysis is required to validated the surge in claims cost associated with smoking and BMI.
    • What are the actual illnesses associated with high BMI and smoking?
    • Are medical protocols and procedures initiated based on BMI and smoking signals or the actual presence of disease?

Acknowledgements & Credits


License

This project is licensed under the MIT License


About

Health Insurance Underwriting with Health Insurance Dataset

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages