This readme.md contains information on Codeup Data Science, Noether cohort, Project 1 : Classification (January 2023).
_Title : Analysing Customer Churn At Telco _Author : Magdalena Rahn
_Project Description :
-
Telco, a phone and internet service provider to general consumers, has been experiencing a high rate of customer loss, or, churn. This project seeks to determine factors contributing to the high rate of churn, and provide suggestions to overcome this customer loss.
-
The future of Telco rests on its ability to maintain and grow its customer base. Such a high rate of churn as is presently being experienced not only decreases company revenue, it also decreases employee, customer and public image confidence.
_Project Goals :
-
To examine the Telco Churn database and, using visualisations (charts) and statistical tests in the Python programming language.
-
To determine which factor or factors lead to customer churn.
_Initial Questions :
-
Does customer age have an influence on churn rate ?
-
Do customers with tech support churn more or less than customers without tech support ?
-
Do customers without internet, with DSL or with fiber optic internet churn more or less than customers with a different internet service ?
-
Do customers with paperless billing churn more or less than customers without paperless billing ?
_Initial Hypotheses :
- Customer age (Senior Citizens vs non-Senior Citizens) has an influence on churn rate (COUNTPLOT 1).
Based on the chi-squared test, there does appear to be a relationship between senior citizen customers and churn rate.
- Customer purchase of tech_support has an influence on churn rate (COUNTPLOT 3).
Based on the chi-squared test, there does appear to be a relationship between customer purchase of tech support and churn rate.
- The internet_service_type (ie, DSL, Fiber optic, no internet service) has an influence on churn rate (COUNTPLOT 4).
No statistical test was run on this hypothesis.
- Having paperless billing has an influence on churn rate (COUNTPLOT 2).
Based on the chi-squared test, there does appear to be a relationship between customer use of paperless billing and churn rate.
_Data Dictionary :
-
Tenure : Customer time with Telco company in months.
-
DF : Dataframe, here referring to the Telco dataset.
-
Target variable : The aspect of the data against which all other aspects will be evaluated. Here, it's 'churn'.
-
Churn : Customer churn, or, a yes (1) / no (0) representation of whether the customer has left the company.
-
TN, FP, FN, TP : True negative, false positive, false negative, true positive. Use to describe the data in confusion matrices.
_The Process / Project Plan :
-
Obtain and explore initial, tidied Telco data to examine numbers in the four hypotheses categories. Do this using simple Python coding.
-
Analyse the tidied data based on customer age, customer purchase of security add-ons, customer choice of internet service type, and customer purchase of phone service compared with and to customer purchase of internet service. (These are, also, the four hypotheses to be examined in essaying to determine customer churn rates.)
-
Model the data using comparative visualisations in Python (Seaborn and MatPlotLib).
-
Apply statistical modelling in Python to select data to determine mathematical probability as compared with visual indications.
-
Provide suggestions and next steps.
_Exploration Summary :
-
After graphing the four hypotheses and using statistical testing on three of the hypotheses, it appears that there is an initial relationship between customer churn and the test variables, notably that churn is influence by being a senior citizen, or, separately, by the purchase of tech support, or, separately, by use of paperless billing.
-
General takeaways are that the variables so far analysed (paperless billing, tech support, being a senior citizen) do have an influence on increased customer churn rates that lead rates.
-
Going forward, modelling will be done on these four variables, compared with the baseline of no-churn. The modelling seeks to
_For further exploration : If customer purchase of all security add-ons (online_security, online_backup, device_protection, tech_support) has an influence in churn rate.
_For further modelling : Use scatter plots instead of bar plots to graph more than two variables at a time.
_Steps To Reproduce :
-
Assure the presence of a Python environment on your computer.
-
Import : - Python libraries pandas, numpy, matplotlib, seaborn and scipy, - The Telco database from https://www.kaggle.com/datasets/yeanzc/telco-customer-churn-ibm-dataset and save the file locally, - Pre-existing or self-created data 'acquire' and 'prepare' modules,
-
Tidy the data.
-
Explore using charts, statistical evaluation and modelling.
-
Evaluate, analyse and form conclusions and recommendations.
-
Create a .csv file of the final evaluated data and predictions, consisting of customer ID, probability of not churning and prediction of remaining a customer.