Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bank Customer Churn Analysis

Tools: SQL · Python (Pandas, Matplotlib, Seaborn, SciPy) · Power BI · SQLite


Business Problem

A European bank is losing customers at a 20.4% annual rate — roughly 1 in 5 customers leaves every year. The goal of this analysis is to identify which customer segments churn most, why they churn, and what the bank can do about it — turning raw data into a targeted retention strategy.


Dataset

  • Source: Kaggle — Bank Customer Churn Dataset
  • Size: 10,000 customers × 14 features
  • Key columns: Geography, Gender, Age, Tenure, Balance, NumOfProducts, IsActiveMember, Exited (churn label)
  • No missing values — data quality verified before analysis

Key Findings

Finding Churn Rate Business Impact
Overall churn rate 20.4% 2,037 of 10,000 customers churned
Age group 50-59 56.0% Highest-risk segment — 35.6pp above average
Germany vs France/Spain 32.4% vs ~16% 2× higher churn — regional strategy needed
Products 3 or 4 83–100% Near-certain churn — product overload signal
Inactive members 26.9% 88% higher churn vs active members
Female customers 25.1% 8.6pp above male churn rate
Churned customer avg balance ₹91,108 Higher-balance customers are churning — revenue risk

Business Recommendations

  1. Launch a 50-59 age group retention programme — this segment has a 56% churn rate and is Germany's #1 risk (70% churn). Priority outreach with loyalty benefits could recover significant revenue.
  2. Investigate Germany operations — churn is 2× higher than France/Spain regardless of age; likely a product, pricing, or service quality issue that needs regional investigation.
  3. Flag customers with 3-4 products for review — 83-100% of these customers churn. This is a product design or cross-selling practice problem, not a customer quality issue.
  4. Re-engagement campaign for inactive members — 4,849 inactive members churn at 26.9%; even a 5pp reduction would retain ~240 customers annually.

SQL Highlights (queries.sql)

  • Overall, geography, gender, age-band, product, tenure-bucket churn rates
  • CASE WHEN bucketing for age and tenure segmentation
  • CTE to identify top 10 highest-risk geography × age band segments
  • WINDOW FUNCTION (RANK) to find highest-churn age group per geography
  • Average profile comparison: churned vs retained customers

Statistical Validation

Chi-square tests confirm all major categorical drivers (Geography, Gender, NumOfProducts, IsActiveMember) are statistically significant (p < 0.001) predictors of churn. Age difference (churned avg 44.8 vs retained 37.4) is confirmed significant by independent t-test (p < 0.001).


Power BI Dashboard

Four KPI cards + five charts across one page:

  • KPI cards: Total Customers, Churn Rate %, Churned Count, Avg Balance (Churned)
  • Bar chart: Churn rate by Geography
  • Heatmap matrix: Churn rate by Geography × Age Group
  • Bar chart: Churn rate by Number of Products
  • Donut chart: Active vs Inactive member churn split

Folder Structure

bank-churn-analysis/
├── data/
│   ├── raw/               Churn_Modelling.csv (original)
│   └── processed/         bank_churn.db (SQLite)
├── sql/
│   └── queries.sql        10 SQL queries with window functions & CTEs
├── notebooks/
│   └── eda.py             Full EDA with statistical testing
├── dashboard/             Power BI .pbix file + screenshots
├── reports/
│   ├── fig1_overview.png
│   ├── fig2_deepdive.png
│   └── fig3_statistics.png
└── README.md

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages