A SAS-based statistical analysis project identifying the key drivers of customer churn for a telecom provider, covering data cleaning, missing value treatment, outlier detection, descriptive statistics, and hypothesis testing.
Author: Md Tariqul Islam (Tariq) Β· Metro College, SAS Analytics Project
- Overview
- Dataset
- Analytical Framework
- Methodology
- Key Findings
- Repository Structure
- Reproducing the Analysis
- Tech Stack
Rising churn rates reported across the telecom industry motivated this analysis: with a data sample that already shows a relatively high churn rate, the goal is to move retention efforts from reactive win-back to proactive, targeted usage-enhancing marketing β and to do that, the business needs a clear, statistically grounded picture of what actually drives churn.
This project works through the full descriptive-analytics pipeline in SAS: import β sample β clean β treat missing values & outliers β transform β explore (univariate & bivariate) β test hypotheses.
π Full write-up of the business problem and analytical framework:
docs/project_brief.md
- Source file:
Telco Churn Data.csv(not included in this repo β see Reproducing the Analysis) - Sampling: a simple random sample of 5,000 observations was drawn
from the full dataset (
PROC SURVEYSELECT, seed987654321) for detailed analysis; earlier exploratory outputs also reflect the full ~51,047-record base population. - Target variable:
Churn(Yes / No) - Candidate predictors:
MonthlyRevenue,MonthlyMinutes,DroppedCalls,RetentionCalls,IncomeGroup,CreditRating,Occupation,MaritalStatus,Handsets,ServiceArea
Y (Churn: Yes/No) = f(Xs)
| Relationship type | Statistical method |
|---|---|
| Categorical Y ~ Categorical X | Chi-square test of association |
| Categorical Y ~ Continuous X | Pearson correlation (numeric-coded Y) |
| Continuous Y ~ Continuous X | Correlation / linear regression |
More detail in docs/project_brief.md.
- Import & profile β load the CSV, describe table structure (
PROC SQL DESCRIBE,PROC CONTENTS) - Sample β draw a 5,000-record SRS sample (
PROC SURVEYSELECT) - Variable selection β build an analytic table with the target and candidate predictors
- Missing value detection β profile missingness separately for categorical and continuous variables
- Missing value treatment
- Categorical: recode (
UnknownβNot Recorded, blankServiceAreaβ labeled code) - Continuous: mean imputation (
PROC STDIZE, and manually viaCOALESCE())
- Categorical: recode (
- Outlier detection β IQR method with a 3ΓIQR fence to flag/exclude extreme values
- Data transformation β bin continuous variables into Low/Medium/High categories (
PROC FORMAT) - Univariate analysis β frequency distributions, histograms, boxplots,
PROC UNIVARIATE - Bivariate analysis β cross-tabulations with chi-square, grouped bar charts
- Hypothesis testing β Pearson correlation between churn and key continuous predictors
Missing-value handling behavior per procedure is documented in
docs/missing_value_handling.md.
Churn rate. Of 51,047 customers, 28.82% churned (14,711 customers) versus 71.18% retained β confirming the elevated churn rate flagged in the problem statement.
MonthlyRevenue. Highly right-skewed (skewness β 4.18): mean $58.83 but median only $48.46, with a maximum of $1,223.30 and a small number of extreme high-revenue outliers pulling the distribution's tail.
MonthlyMinutes. Also right-skewed (skewness β 2.19): mean 525.65 minutes vs. median 366 minutes, max 7,359 minutes.
MaritalStatus Γ Occupation. A chi-square test shows a statistically significant association (ΟΒ² = 9255.30, df = 14, p < .0001), though the effect size is modest (CramΓ©r's V β 0.30) β most customers across all marital-status groups fall into the "Other" occupation category.
Churn vs. revenue/usage (Pearson correlation). Both MonthlyRevenue
(r = β0.012, p = 0.0068) and MonthlyMinutes (r = β0.050, p < .0001) are
statistically significantly correlated with churn, but the correlations
are very weak in magnitude β meaning revenue and usage alone are poor
standalone predictors of churn and a multivariate model (e.g. logistic
regression on occupation, marital status, credit rating, etc. together)
would be needed to meaningfully predict churn risk.
Credit rating distribution. Customers skew toward higher credit quality: ~54% fall in the "1-Highest" or "2-High" bands, with only ~6% in the two lowest bands.
Full statistical output (frequency tables, chi-square/correlation
statistics, plots) is in output/.
telco-churn-sas-analysis/
βββ README.md <- you are here
βββ LICENSE
βββ sas/
β βββ churn_analysis.sas <- full annotated SAS script
βββ docs/
β βββ project_brief.md <- business problem & framework
β βββ missing_value_handling.md <- SAS missing-value reference notes
β βββ presentation/
β βββ SAS_Churn_Project_Presentation.pptx
βββ output/ <- SAS ODS PDF output (results)
βββ 01_churn_frequency_distribution.pdf
βββ 02_outlier_detection_categorical_vars.pdf
βββ 03_univariate_monthly_revenue.pdf
βββ 04_univariate_monthly_minutes.pdf
βββ 05_bivariate_maritalstatus_vs_occupation.pdf
βββ 06_hypothesis_testing_pearson_correlation.pdf
- Obtain the source dataset (
Telco Churn Data.csv) and place it locally. - Open
sas/churn_analysis.sasin SAS (Base SAS / SAS Studio / SAS OnDemand for Academics all work). - Update the
LIBNAMEstatement and allODS PDF FILE=paths at the top of relevant sections to point to your own working directory instead ofC:\METRO_COLLEGE\SAS\SAS_AD_PROJECT\. - Run the script top to bottom β each analytical section writes its own
PDF via
ODS PDF, mirroring the files inoutput/.
π‘ Tip: replace the hard-coded paths with a single macro variable (e.g.
%LET PROJDIR = /your/path;) and reference&PROJDIR.throughout for a fully portable version of the script.
- SAS (Base SAS, SAS/STAT, SAS/GRAPH, ODS PDF) β
PROC IMPORT,PROC SQL,PROC SURVEYSELECT,PROC FREQ,PROC MEANS,PROC UNIVARIATE,PROC CORR,PROC SGPLOT,PROC GCHART,PROC STDIZE,PROC FORMAT, SAS macro language (%MACRO,%LET,%DO)
This repository documents a coursework analytics project. Statistical results reflect the sampled dataset used for the assignment and are for educational purposes.
