Telco Customer Churn

1.APPROACH

In this assignment, I selected a telecommunications customer churn dataset that contains information about customer demographics, services, account information, and billing behavior. The dataset provides a useful opportunity to explore customer behavior and identify factors that may influence whether a customer stays with or leaves a telecommunications company.

My plan for this assignment is to load the data into R, clean and prepare the dataset, and perform exploratory data analysis (EDA) to identify patterns and relationships between customer characteristics and churn.

Data Source :

https://www.kaggle.com/datasets/yeanzc/telco-customer-churn-ibm-dataset?resource=download

RESEARCH QUESTION

What factors are most strongly associated with customer churn in the telecommunications industry, and can customer churn be predicted using customer demographic, service, and account information?

2.CODE BASE

Under the Codebase section, I will import packages such as tidyverse to support data manipulation, analysis, and visualization. These tools will help me clean and explore the Telco dataset, identify meaningful patterns and relationships, and develop a better understanding of the factors associated with customer churn.

#IMPORT TIDYVERSE PACKAGE

library(tidyverse)
── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ dplyr     1.2.1     ✔ readr     2.2.0
✔ forcats   1.0.1     ✔ stringr   1.6.0
✔ ggplot2   4.0.3     ✔ tibble    3.3.1
✔ lubridate 1.9.5     ✔ tidyr     1.3.2
✔ purrr     1.2.2     
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag()    masks stats::lag()
ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors

#IMPORT DATASET

dat <- read.csv("Telco Data - Approach.csv")

names(dat)
 [1] "CustomerID"        "Count"             "Country"          
 [4] "State"             "City"              "Zip.Code"         
 [7] "Lat.Long"          "Latitude"          "Longitude"        
[10] "Gender"            "Senior.Citizen"    "Partner"          
[13] "Dependents"        "Tenure.Months"     "Phone.Service"    
[16] "Multiple.Lines"    "InternetService"   "Online.Security"  
[19] "Online.Backup"     "Device.Protection" "Tech.Support"     
[22] "Streaming.TV"      "Streaming.Movies"  "Contract"         
[25] "Paperless.Billing" "Payment.Method"    "Monthly.Charges"  
[28] "Total.Charges"     "Churn.Label"       "Churn.Value"      
[31] "Churn.Score"       "CLTV"              "Churn.Reason"     

#DATA MANIPULATION

dim(dat); head(dat)
[1] 7043   33
  CustomerID Count       Country      State        City Zip.Code
1 3668-QPYBK     1 United States California Los Angeles    90003
2 9237-HQITU     1 United States California Los Angeles    90005
3 9305-CDSKC     1 United States California Los Angeles    90006
4 7892-POOKP     1 United States California Los Angeles    90010
5 0280-XJGEX     1 United States California Los Angeles    90015
6 4190-MFLUW     1 United States California Los Angeles    90020
                Lat.Long Latitude Longitude Gender Senior.Citizen Partner
1 33.964131, -118.272783 33.96413 -118.2728   Male             No      No
2  34.059281, -118.30742 34.05928 -118.3074 Female             No      No
3 34.048013, -118.293953 34.04801 -118.2940 Female             No      No
4 34.062125, -118.315709 34.06213 -118.3157 Female             No     Yes
5 34.039224, -118.266293 34.03922 -118.2663   Male             No      No
6 34.066367, -118.309868 34.06637 -118.3099 Female             No     Yes
  Dependents Tenure.Months Phone.Service Multiple.Lines InternetService
1         No             2           Yes             No             DSL
2        Yes             2           Yes             No     Fiber optic
3        Yes             8           Yes            Yes     Fiber optic
4        Yes            28           Yes            Yes     Fiber optic
5        Yes            49           Yes            Yes     Fiber optic
6         No            10           Yes             No             DSL
  Online.Security Online.Backup Device.Protection Tech.Support Streaming.TV
1             Yes           Yes                No           No           No
2              No            No                No           No           No
3              No            No               Yes           No          Yes
4              No            No               Yes          Yes          Yes
5              No           Yes               Yes           No          Yes
6              No            No               Yes          Yes           No
  Streaming.Movies       Contract Paperless.Billing            Payment.Method
1               No Month-to-month               Yes              Mailed check
2               No Month-to-month               Yes          Electronic check
3              Yes Month-to-month               Yes          Electronic check
4              Yes Month-to-month               Yes          Electronic check
5              Yes Month-to-month               Yes Bank transfer (automatic)
6               No Month-to-month                No   Credit card (automatic)
  Monthly.Charges Total.Charges Churn.Label Churn.Value Churn.Score CLTV
1           53.85        108.15         Yes           1          86 3239
2           70.70        151.65         Yes           1          67 2701
3           99.65        820.50         Yes           1          86 5372
4          104.80       3046.05         Yes           1          84 5003
5          103.70       5036.30         Yes           1          89 5340
6           55.20        528.35         Yes           1          78 5925
                               Churn.Reason
1              Competitor made better offer
2                                     Moved
3                                     Moved
4                                     Moved
5             Competitor had better devices
6 Competitor offered higher download speeds
summary(dat); 
     CustomerID       Count        Country           State     
 Length   :7043   Min.   :1   Length   :7043   Length   :7043  
 N.unique :7043   1st Qu.:1   N.unique :   1   N.unique :   1  
 N.blank  :   0   Median :1   N.blank  :   0   N.blank  :   0  
 Min.nchar:  10   Mean   :1   Min.nchar:  13   Min.nchar:  10  
 Max.nchar:  10   3rd Qu.:1   Max.nchar:  13   Max.nchar:  10  
                  Max.   :1                                    
                                                               
        City         Zip.Code          Lat.Long       Latitude    
 Length   :7043   Min.   :90001   Length   :7043   Min.   :32.56  
 N.unique :1129   1st Qu.:92102   N.unique :1652   1st Qu.:34.03  
 N.blank  :   0   Median :93552   N.blank  :   0   Median :36.39  
 Min.nchar:   3   Mean   :93522   Min.nchar:  18   Mean   :36.28  
 Max.nchar:  22   3rd Qu.:95351   Max.nchar:  22   3rd Qu.:38.22  
                  Max.   :96161                    Max.   :41.96  
                                                                  
   Longitude            Gender       Senior.Citizen      Partner    
 Min.   :-124.3   Length   :7043   Length   :7043   Length   :7043  
 1st Qu.:-121.8   N.unique :   2   N.unique :   2   N.unique :   2  
 Median :-119.7   N.blank  :   0   N.blank  :   0   N.blank  :   0  
 Mean   :-119.8   Min.nchar:   4   Min.nchar:   2   Min.nchar:   2  
 3rd Qu.:-118.0   Max.nchar:   6   Max.nchar:   3   Max.nchar:   3  
 Max.   :-114.2                                                     
                                                                    
     Dependents   Tenure.Months     Phone.Service    Multiple.Lines
 Length   :7043   Min.   : 0.00   Length   :7043   Length   :7043  
 N.unique :   2   1st Qu.: 9.00   N.unique :   2   N.unique :   3  
 N.blank  :   0   Median :29.00   N.blank  :   0   N.blank  :   0  
 Min.nchar:   2   Mean   :32.37   Min.nchar:   2   Min.nchar:   2  
 Max.nchar:   3   3rd Qu.:55.00   Max.nchar:   3   Max.nchar:  16  
                  Max.   :72.00                                    
                                                                   
  InternetService  Online.Security   Online.Backup  Device.Protection
 Length   :7043   Length   :7043   Length   :7043   Length   :7043   
 N.unique :   3   N.unique :   3   N.unique :   3   N.unique :   3   
 N.blank  :   0   N.blank  :   0   N.blank  :   0   N.blank  :   0   
 Min.nchar:   2   Min.nchar:   2   Min.nchar:   2   Min.nchar:   2   
 Max.nchar:  11   Max.nchar:  19   Max.nchar:  19   Max.nchar:  19   
                                                                     
                                                                     
    Tech.Support     Streaming.TV   Streaming.Movies      Contract   
 Length   :7043   Length   :7043   Length   :7043    Length   :7043  
 N.unique :   3   N.unique :   3   N.unique :   3    N.unique :   3  
 N.blank  :   0   N.blank  :   0   N.blank  :   0    N.blank  :   0  
 Min.nchar:   2   Min.nchar:   2   Min.nchar:   2    Min.nchar:   8  
 Max.nchar:  19   Max.nchar:  19   Max.nchar:  19    Max.nchar:  14  
                                                                     
                                                                     
 Paperless.Billing   Payment.Method Monthly.Charges  Total.Charges   
 Length   :7043    Length   :7043   Min.   : 18.25   Min.   :  18.8  
 N.unique :   2    N.unique :   4   1st Qu.: 35.50   1st Qu.: 401.4  
 N.blank  :   0    N.blank  :   0   Median : 70.35   Median :1397.5  
 Min.nchar:   2    Min.nchar:  12   Mean   : 64.76   Mean   :2283.3  
 Max.nchar:   3    Max.nchar:  25   3rd Qu.: 89.85   3rd Qu.:3794.7  
                                    Max.   :118.75   Max.   :8684.8  
                                                     NAs    :11      
    Churn.Label    Churn.Value      Churn.Score         CLTV     
 Length   :7043   Min.   :0.0000   Min.   :  5.0   Min.   :2003  
 N.unique :   2   1st Qu.:0.0000   1st Qu.: 40.0   1st Qu.:3469  
 N.blank  :   0   Median :0.0000   Median : 61.0   Median :4527  
 Min.nchar:   2   Mean   :0.2654   Mean   : 58.7   Mean   :4400  
 Max.nchar:   3   3rd Qu.:1.0000   3rd Qu.: 75.0   3rd Qu.:5380  
                  Max.   :1.0000   Max.   :100.0   Max.   :6500  
                                                                 
    Churn.Reason 
 Length   :7043  
 N.unique :  21  
 N.blank  :5174  
 Min.nchar:   0  
 Max.nchar:  41  
                 
                 
sum(is.na(dat))
[1] 11

Comment: from the above you can see that the dataframe has 7043 rows and 33 columns

datis_churn <- factor(
  dat$Churn,
  levels = c("No", "Yes"),
  labels = c("Stayed", "Churned")
)

# Display the first six rows
print(head(dat))
  CustomerID Count       Country      State        City Zip.Code
1 3668-QPYBK     1 United States California Los Angeles    90003
2 9237-HQITU     1 United States California Los Angeles    90005
3 9305-CDSKC     1 United States California Los Angeles    90006
4 7892-POOKP     1 United States California Los Angeles    90010
5 0280-XJGEX     1 United States California Los Angeles    90015
6 4190-MFLUW     1 United States California Los Angeles    90020
                Lat.Long Latitude Longitude Gender Senior.Citizen Partner
1 33.964131, -118.272783 33.96413 -118.2728   Male             No      No
2  34.059281, -118.30742 34.05928 -118.3074 Female             No      No
3 34.048013, -118.293953 34.04801 -118.2940 Female             No      No
4 34.062125, -118.315709 34.06213 -118.3157 Female             No     Yes
5 34.039224, -118.266293 34.03922 -118.2663   Male             No      No
6 34.066367, -118.309868 34.06637 -118.3099 Female             No     Yes
  Dependents Tenure.Months Phone.Service Multiple.Lines InternetService
1         No             2           Yes             No             DSL
2        Yes             2           Yes             No     Fiber optic
3        Yes             8           Yes            Yes     Fiber optic
4        Yes            28           Yes            Yes     Fiber optic
5        Yes            49           Yes            Yes     Fiber optic
6         No            10           Yes             No             DSL
  Online.Security Online.Backup Device.Protection Tech.Support Streaming.TV
1             Yes           Yes                No           No           No
2              No            No                No           No           No
3              No            No               Yes           No          Yes
4              No            No               Yes          Yes          Yes
5              No           Yes               Yes           No          Yes
6              No            No               Yes          Yes           No
  Streaming.Movies       Contract Paperless.Billing            Payment.Method
1               No Month-to-month               Yes              Mailed check
2               No Month-to-month               Yes          Electronic check
3              Yes Month-to-month               Yes          Electronic check
4              Yes Month-to-month               Yes          Electronic check
5              Yes Month-to-month               Yes Bank transfer (automatic)
6               No Month-to-month                No   Credit card (automatic)
  Monthly.Charges Total.Charges Churn.Label Churn.Value Churn.Score CLTV
1           53.85        108.15         Yes           1          86 3239
2           70.70        151.65         Yes           1          67 2701
3           99.65        820.50         Yes           1          86 5372
4          104.80       3046.05         Yes           1          84 5003
5          103.70       5036.30         Yes           1          89 5340
6           55.20        528.35         Yes           1          78 5925
                               Churn.Reason
1              Competitor made better offer
2                                     Moved
3                                     Moved
4                                     Moved
5             Competitor had better devices
6 Competitor offered higher download speeds

Comment : Here is created a new column called ISCHURN and renamed the categories “NO” to stayed (meaning the customer did not leave the telco) and “YES” to Churned (meaning the customer left the telco due to various reason i will further analysis).

#DATA VISUALISATION

library(tidyverse)

head(dat)
  CustomerID Count       Country      State        City Zip.Code
1 3668-QPYBK     1 United States California Los Angeles    90003
2 9237-HQITU     1 United States California Los Angeles    90005
3 9305-CDSKC     1 United States California Los Angeles    90006
4 7892-POOKP     1 United States California Los Angeles    90010
5 0280-XJGEX     1 United States California Los Angeles    90015
6 4190-MFLUW     1 United States California Los Angeles    90020
                Lat.Long Latitude Longitude Gender Senior.Citizen Partner
1 33.964131, -118.272783 33.96413 -118.2728   Male             No      No
2  34.059281, -118.30742 34.05928 -118.3074 Female             No      No
3 34.048013, -118.293953 34.04801 -118.2940 Female             No      No
4 34.062125, -118.315709 34.06213 -118.3157 Female             No     Yes
5 34.039224, -118.266293 34.03922 -118.2663   Male             No      No
6 34.066367, -118.309868 34.06637 -118.3099 Female             No     Yes
  Dependents Tenure.Months Phone.Service Multiple.Lines InternetService
1         No             2           Yes             No             DSL
2        Yes             2           Yes             No     Fiber optic
3        Yes             8           Yes            Yes     Fiber optic
4        Yes            28           Yes            Yes     Fiber optic
5        Yes            49           Yes            Yes     Fiber optic
6         No            10           Yes             No             DSL
  Online.Security Online.Backup Device.Protection Tech.Support Streaming.TV
1             Yes           Yes                No           No           No
2              No            No                No           No           No
3              No            No               Yes           No          Yes
4              No            No               Yes          Yes          Yes
5              No           Yes               Yes           No          Yes
6              No            No               Yes          Yes           No
  Streaming.Movies       Contract Paperless.Billing            Payment.Method
1               No Month-to-month               Yes              Mailed check
2               No Month-to-month               Yes          Electronic check
3              Yes Month-to-month               Yes          Electronic check
4              Yes Month-to-month               Yes          Electronic check
5              Yes Month-to-month               Yes Bank transfer (automatic)
6               No Month-to-month                No   Credit card (automatic)
  Monthly.Charges Total.Charges Churn.Label Churn.Value Churn.Score CLTV
1           53.85        108.15         Yes           1          86 3239
2           70.70        151.65         Yes           1          67 2701
3           99.65        820.50         Yes           1          86 5372
4          104.80       3046.05         Yes           1          84 5003
5          103.70       5036.30         Yes           1          89 5340
6           55.20        528.35         Yes           1          78 5925
                               Churn.Reason
1              Competitor made better offer
2                                     Moved
3                                     Moved
4                                     Moved
5             Competitor had better devices
6 Competitor offered higher download speeds
names(dat)
 [1] "CustomerID"        "Count"             "Country"          
 [4] "State"             "City"              "Zip.Code"         
 [7] "Lat.Long"          "Latitude"          "Longitude"        
[10] "Gender"            "Senior.Citizen"    "Partner"          
[13] "Dependents"        "Tenure.Months"     "Phone.Service"    
[16] "Multiple.Lines"    "InternetService"   "Online.Security"  
[19] "Online.Backup"     "Device.Protection" "Tech.Support"     
[22] "Streaming.TV"      "Streaming.Movies"  "Contract"         
[25] "Paperless.Billing" "Payment.Method"    "Monthly.Charges"  
[28] "Total.Charges"     "Churn.Label"       "Churn.Value"      
[31] "Churn.Score"       "CLTV"              "Churn.Reason"     
##GENDER VS TOTAL CHARGES

head(dat)
  CustomerID Count       Country      State        City Zip.Code
1 3668-QPYBK     1 United States California Los Angeles    90003
2 9237-HQITU     1 United States California Los Angeles    90005
3 9305-CDSKC     1 United States California Los Angeles    90006
4 7892-POOKP     1 United States California Los Angeles    90010
5 0280-XJGEX     1 United States California Los Angeles    90015
6 4190-MFLUW     1 United States California Los Angeles    90020
                Lat.Long Latitude Longitude Gender Senior.Citizen Partner
1 33.964131, -118.272783 33.96413 -118.2728   Male             No      No
2  34.059281, -118.30742 34.05928 -118.3074 Female             No      No
3 34.048013, -118.293953 34.04801 -118.2940 Female             No      No
4 34.062125, -118.315709 34.06213 -118.3157 Female             No     Yes
5 34.039224, -118.266293 34.03922 -118.2663   Male             No      No
6 34.066367, -118.309868 34.06637 -118.3099 Female             No     Yes
  Dependents Tenure.Months Phone.Service Multiple.Lines InternetService
1         No             2           Yes             No             DSL
2        Yes             2           Yes             No     Fiber optic
3        Yes             8           Yes            Yes     Fiber optic
4        Yes            28           Yes            Yes     Fiber optic
5        Yes            49           Yes            Yes     Fiber optic
6         No            10           Yes             No             DSL
  Online.Security Online.Backup Device.Protection Tech.Support Streaming.TV
1             Yes           Yes                No           No           No
2              No            No                No           No           No
3              No            No               Yes           No          Yes
4              No            No               Yes          Yes          Yes
5              No           Yes               Yes           No          Yes
6              No            No               Yes          Yes           No
  Streaming.Movies       Contract Paperless.Billing            Payment.Method
1               No Month-to-month               Yes              Mailed check
2               No Month-to-month               Yes          Electronic check
3              Yes Month-to-month               Yes          Electronic check
4              Yes Month-to-month               Yes          Electronic check
5              Yes Month-to-month               Yes Bank transfer (automatic)
6               No Month-to-month                No   Credit card (automatic)
  Monthly.Charges Total.Charges Churn.Label Churn.Value Churn.Score CLTV
1           53.85        108.15         Yes           1          86 3239
2           70.70        151.65         Yes           1          67 2701
3           99.65        820.50         Yes           1          86 5372
4          104.80       3046.05         Yes           1          84 5003
5          103.70       5036.30         Yes           1          89 5340
6           55.20        528.35         Yes           1          78 5925
                               Churn.Reason
1              Competitor made better offer
2                                     Moved
3                                     Moved
4                                     Moved
5             Competitor had better devices
6 Competitor offered higher download speeds
ggplot(dat, aes(x = Gender, y = Total.Charges)) +
  stat_summary(fun = sum, geom = "bar", fill = "blue") +
  labs(
    title = "Total Charges by Gender",
    x = "Gender",
    y = "Total Charges"
  ) +
  theme_minimal()
Warning: Removed 11 rows containing non-finite outside the scale range
(`stat_summary()`).

## Comment ; The analysis shows that male customers accounted for 50.47% of the total charges, while female customers accounted for 49.53%. This indicates a nearly equal contribution to total charges between male and female customers, with male customers contributing slightly more

## PAYMENT METHOD VS TOTAL CHARGES

head(dat)
  CustomerID Count       Country      State        City Zip.Code
1 3668-QPYBK     1 United States California Los Angeles    90003
2 9237-HQITU     1 United States California Los Angeles    90005
3 9305-CDSKC     1 United States California Los Angeles    90006
4 7892-POOKP     1 United States California Los Angeles    90010
5 0280-XJGEX     1 United States California Los Angeles    90015
6 4190-MFLUW     1 United States California Los Angeles    90020
                Lat.Long Latitude Longitude Gender Senior.Citizen Partner
1 33.964131, -118.272783 33.96413 -118.2728   Male             No      No
2  34.059281, -118.30742 34.05928 -118.3074 Female             No      No
3 34.048013, -118.293953 34.04801 -118.2940 Female             No      No
4 34.062125, -118.315709 34.06213 -118.3157 Female             No     Yes
5 34.039224, -118.266293 34.03922 -118.2663   Male             No      No
6 34.066367, -118.309868 34.06637 -118.3099 Female             No     Yes
  Dependents Tenure.Months Phone.Service Multiple.Lines InternetService
1         No             2           Yes             No             DSL
2        Yes             2           Yes             No     Fiber optic
3        Yes             8           Yes            Yes     Fiber optic
4        Yes            28           Yes            Yes     Fiber optic
5        Yes            49           Yes            Yes     Fiber optic
6         No            10           Yes             No             DSL
  Online.Security Online.Backup Device.Protection Tech.Support Streaming.TV
1             Yes           Yes                No           No           No
2              No            No                No           No           No
3              No            No               Yes           No          Yes
4              No            No               Yes          Yes          Yes
5              No           Yes               Yes           No          Yes
6              No            No               Yes          Yes           No
  Streaming.Movies       Contract Paperless.Billing            Payment.Method
1               No Month-to-month               Yes              Mailed check
2               No Month-to-month               Yes          Electronic check
3              Yes Month-to-month               Yes          Electronic check
4              Yes Month-to-month               Yes          Electronic check
5              Yes Month-to-month               Yes Bank transfer (automatic)
6               No Month-to-month                No   Credit card (automatic)
  Monthly.Charges Total.Charges Churn.Label Churn.Value Churn.Score CLTV
1           53.85        108.15         Yes           1          86 3239
2           70.70        151.65         Yes           1          67 2701
3           99.65        820.50         Yes           1          86 5372
4          104.80       3046.05         Yes           1          84 5003
5          103.70       5036.30         Yes           1          89 5340
6           55.20        528.35         Yes           1          78 5925
                               Churn.Reason
1              Competitor made better offer
2                                     Moved
3                                     Moved
4                                     Moved
5             Competitor had better devices
6 Competitor offered higher download speeds
ggplot(dat, aes(x = Payment.Method, y = Total.Charges)) +
  stat_summary(fun = sum, geom = "bar", fill = "red") +
  labs(
    title = "Payment.Method by Gender",
    x = "Payment Method",
    y = "Total Charges"
  ) +
  theme_minimal()
Warning: Removed 11 rows containing non-finite outside the scale range
(`stat_summary()`).

##Comment : Electronic check customers contributed the highest share of total charges (30.80%), followed by automatic bank transfers (29.57%), credit cards (29.10%), and mailed checks (10.53%)

## CHURN LABEL VS GENDER 


head(dat)
  CustomerID Count       Country      State        City Zip.Code
1 3668-QPYBK     1 United States California Los Angeles    90003
2 9237-HQITU     1 United States California Los Angeles    90005
3 9305-CDSKC     1 United States California Los Angeles    90006
4 7892-POOKP     1 United States California Los Angeles    90010
5 0280-XJGEX     1 United States California Los Angeles    90015
6 4190-MFLUW     1 United States California Los Angeles    90020
                Lat.Long Latitude Longitude Gender Senior.Citizen Partner
1 33.964131, -118.272783 33.96413 -118.2728   Male             No      No
2  34.059281, -118.30742 34.05928 -118.3074 Female             No      No
3 34.048013, -118.293953 34.04801 -118.2940 Female             No      No
4 34.062125, -118.315709 34.06213 -118.3157 Female             No     Yes
5 34.039224, -118.266293 34.03922 -118.2663   Male             No      No
6 34.066367, -118.309868 34.06637 -118.3099 Female             No     Yes
  Dependents Tenure.Months Phone.Service Multiple.Lines InternetService
1         No             2           Yes             No             DSL
2        Yes             2           Yes             No     Fiber optic
3        Yes             8           Yes            Yes     Fiber optic
4        Yes            28           Yes            Yes     Fiber optic
5        Yes            49           Yes            Yes     Fiber optic
6         No            10           Yes             No             DSL
  Online.Security Online.Backup Device.Protection Tech.Support Streaming.TV
1             Yes           Yes                No           No           No
2              No            No                No           No           No
3              No            No               Yes           No          Yes
4              No            No               Yes          Yes          Yes
5              No           Yes               Yes           No          Yes
6              No            No               Yes          Yes           No
  Streaming.Movies       Contract Paperless.Billing            Payment.Method
1               No Month-to-month               Yes              Mailed check
2               No Month-to-month               Yes          Electronic check
3              Yes Month-to-month               Yes          Electronic check
4              Yes Month-to-month               Yes          Electronic check
5              Yes Month-to-month               Yes Bank transfer (automatic)
6               No Month-to-month                No   Credit card (automatic)
  Monthly.Charges Total.Charges Churn.Label Churn.Value Churn.Score CLTV
1           53.85        108.15         Yes           1          86 3239
2           70.70        151.65         Yes           1          67 2701
3           99.65        820.50         Yes           1          86 5372
4          104.80       3046.05         Yes           1          84 5003
5          103.70       5036.30         Yes           1          89 5340
6           55.20        528.35         Yes           1          78 5925
                               Churn.Reason
1              Competitor made better offer
2                                     Moved
3                                     Moved
4                                     Moved
5             Competitor had better devices
6 Competitor offered higher download speeds
ggplot(dat, aes(x = Churn.Label, y = Total.Charges)) +
  stat_summary(fun = sum, geom = "bar", fill = "Green") +
  labs(
    title = "Churn label by total charges",
    x = "Churn.Label",
    y = "Total Charges"
  ) +
  theme_minimal()
Warning: Removed 11 rows containing non-finite outside the scale range
(`stat_summary()`).

## Comment : The analysis shows that 73.46% of customers remained with the telecommunications company, while 26.54% of customers churned. This indicates that approximately one in four customers left the company, highlighting a significant level of customer churn that warrants further investigation

#THOUGHTS

The analysis shows that male customers contributed 50.47% of total charges, compared with 49.53% for female customers, indicating a nearly equal contribution.

For payment methods, electronic check customers contributed the highest share at 30.80%, followed by automatic bank transfers at 29.57% and credit cards at 29.10%. Mailed checks contributed 10.53%.

The churn analysis shows that 73.46% of customers stayed, while 26.54% churned. This means approximately 1 in 4 customers left, highlighting the importance of further investigating the factors associated with churn.

#AI USE

ChatGPT was used as a supporting tool to assist with data analysis, R coding, and visualization development. All AI-generated code and analytical suggestions were reviewed, tested, and monitored by me to ensure that the final analysis was accurate and aligned with the project objectives.