Skip to content

byteephantom/telecom-churn-intelligence

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📡 Telecom Churn Intelligence

Revenue-at-Risk Modeling & Retention Campaign Effectiveness


📌 Overview

This project predicts which telecom customers are likely to churn, quantifies the revenue at risk for each customer, and statistically validates whether a targeted retention campaign reduces churn — delivering a complete, business-ready intelligence system.


🎯 Key Results

Metric Value
Dataset Size 7,032 customers
Overall Churn Rate 26.58%
Best Model (Random Forest) ROC-AUC 0.83
Total Revenue at Risk ₹3,56,731
Campaign Churn Reduction 27.15%
Campaign ROI 1123%

📁 Project Structure

telecom-churn-intelligence/
│
├── app/
│   └── main.py                     # Streamlit dashboard
│
├── data/
│   ├── raw/                        # Original Kaggle dataset
│   └── processed/                  # Cleaned & engineered datasets
│
├── models/                         # Trained machine learning models
│
├── notebooks/
│   ├── 01_eda.ipynb
│   ├── 02_feature_engineering.ipynb
│   ├── 03_statistical_analysis.ipynb
│   ├── 04_modeling.ipynb
│   ├── 05_clv_revenue_risk.ipynb
│   └── 06_ab_testing.ipynb
│
├── requirements.txt                # Project dependencies
├── README.md                       # Project documentation
└── .gitignore                      # Git ignore rules

📊 Project Phases

Phase 1 — EDA

  • Analyzed churn distribution (26.58% churn rate)
  • Identified key patterns: contract type, payment method, internet service
  • Found Month-to-Month customers churn at 42.7%

Phase 2 — Feature Engineering

  • Created 3 new features: TenureGroup, EngagementScore, ChargePerMonth
  • Binary + One-hot encoding
  • StandardScaler on numeric features
  • Final dataset: 7,032 rows × 28 columns

Phase 3 — Statistical Analysis

  • Chi-Square Tests: Contract, Payment Method, Internet Service vs Churn (all p < 0.0001)
  • T-Test: MonthlyCharges significantly different between churners and non-churners
  • Mann-Whitney U: Tenure distribution significantly different
  • ANOVA: MonthlyCharges differ across TenureGroups
  • VIF Analysis: Multicollinearity check for Logistic Regression

Phase 4 — ML Modeling

  • SMOTE applied on training set only (4130 vs 4130)
  • Logistic Regression: ROC-AUC 0.79
  • Random Forest: ROC-AUC 0.83 ✅ (Best Model)
  • Top features: Tenure, TotalCharges, MonthlyCharges, Electronic Check, Contract

Phase 5 — CLV & Revenue at Risk

  • Calculated Customer Lifetime Value for each customer
  • Revenue at Risk = Churn Probability × CLV
  • Identified 297 High Risk customers with ₹1,66,347 revenue at risk

Phase 6 — A/B Testing

  • Split 297 high-risk customers into Treatment (148) and Control (149)
  • Treatment group offered 20% discount
  • Z-Test: p < 0.0001, Z = -5.03 ✅
  • Chi-Square: p < 0.0001 ✅
  • 95% CI: [17.02%, 37.28%] churn reduction
  • Revenue Saved: ₹23,863 | Campaign Cost: ₹1,951 | ROI: 1123%

🛠️ Tech Stack

Area Tools
Data Processing Pandas, NumPy
Statistical Analysis SciPy, Statsmodels, Pingouin
Machine Learning Scikit-learn, Imbalanced-learn
Visualization Matplotlib, Seaborn
Dashboard Streamlit

🚀 How to Run

1. Clone the repo

git clone https://github.com/YOUR_USERNAME/telecom-churn-intelligence.git
cd telecom-churn-intelligence

2. Install dependencies

pip install -r requirements.txt

3. Download Dataset

Download from Kaggle — Telco Customer Churn and place in data/raw/

4. Run the Notebooks in Order

01_eda.ipynb
      ↓
02_feature_engineering.ipynb
      ↓
03_statistical_analysis.ipynb
      ↓
04_modeling.ipynb
      ↓
05_clv_revenue_risk.ipynb
      ↓
06_ab_testing.ipynb

5. Launch Dashboard

cd app
streamlit run main.py

📈 Dashboard Features

  • Overview — Project summary and key metrics
  • EDA Insights — Interactive churn analysis by features
  • Churn Predictor — Real-time churn probability + revenue at risk
  • A/B Test Results — Campaign effectiveness visualization

📁 Dataset

About

Telecom Customer Churn Prediction with Revenue-at-Risk Modeling & A/B Testing | Python | Scikit-learn | SciPy | Streamlit

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors