Telco = read.table("Telco_Cusomer_Churn.csv", header=TRUE, sep=",",
dec=".", stringsAsFactors = TRUE)
summary(Telco)
## customerID gender SeniorCitizen Partner Dependents
## 0002-ORFBO: 1 Female:3488 Min. :0.0000 No :3641 No :4933
## 0003-MKNFE: 1 Male :3555 1st Qu.:0.0000 Yes:3402 Yes:2110
## 0004-TLHLJ: 1 Median :0.0000
## 0011-IGKFF: 1 Mean :0.1621
## 0013-EXCHZ: 1 3rd Qu.:0.0000
## 0013-MHZWF: 1 Max. :1.0000
## (Other) :7037
## tenure PhoneService MultipleLines InternetService
## Min. : 0.00 No : 682 No :3390 DSL :2421
## 1st Qu.: 9.00 Yes:6361 No phone service: 682 Fiber optic:3096
## Median :29.00 Yes :2971 No :1526
## Mean :32.37
## 3rd Qu.:55.00
## Max. :72.00
##
## OnlineSecurity OnlineBackup
## No :3498 No :3088
## No internet service:1526 No internet service:1526
## Yes :2019 Yes :2429
##
##
##
##
## DeviceProtection TechSupport
## No :3095 No :3473
## No internet service:1526 No internet service:1526
## Yes :2422 Yes :2044
##
##
##
##
## StreamingTV StreamingMovies Contract
## No :2810 No :2785 Month-to-month:3875
## No internet service:1526 No internet service:1526 One year :1473
## Yes :2707 Yes :2732 Two year :1695
##
##
##
##
## PaperlessBilling PaymentMethod MonthlyCharges
## No :2872 Bank transfer (automatic):1544 Min. : 18.25
## Yes:4171 Credit card (automatic) :1522 1st Qu.: 35.50
## Electronic check :2365 Median : 70.35
## Mailed check :1612 Mean : 64.76
## 3rd Qu.: 89.85
## Max. :118.75
##
## TotalCharges Churn
## Min. : 18.8 No :5174
## 1st Qu.: 401.4 Yes:1869
## Median :1397.5
## Mean :2283.3
## 3rd Qu.:3794.7
## Max. :8684.8
## NA's :11
Este conjunto presenta información de 7037 clientes de una empresa telefonica se tienen variables cualitativas y cuantitativas. Además, se analiza que cliente se quedan y cuales se van de la empresa (churn).

library(ggplot2)
ggplot(Telco, aes(x=tenure))+
geom_histogram(fill="orange")
## `stat_bin()` using `bins = 30`. Pick better value `binwidth`.
ggplot(Telco, aes(x=MonthlyCharges))+
geom_histogram(fill="blue")+
labs(title="Histograma de los cargos mensuales", x="cargos mensuales (usd)",
y="conteo")
## `stat_bin()` using `bins = 30`. Pick better value `binwidth`.
ggplot(Telco, aes(x=TotalCharges))+
geom_histogram(fill="magenta")+
labs(title="Histograma cargos totales",
x="cargos totales (usd)", y="conteo")
## `stat_bin()` using `bins = 30`. Pick better value `binwidth`.
## Warning: Removed 11 rows containing non-finite outside the scale range
## (`stat_bin()`).
ggplot(Telco, aes(x=tenure))+
geom_boxplot(fill="red")+
labs(title="Diagrama de caja antiguedad", x="antiguedad (mes)")
library(corrplot)
## corrplot 0.95 loaded
nuevosDatos = data.frame(Telco$tenure, Telco$MonthlyCharges, Telco$TotalCharges)
r = cor(na.omit(nuevosDatos))
corrplot(r, method="number")
ggplot(Telco, aes(x=tenure, y=TotalCharges))+
geom_jitter()+
geom_smooth(method="lm", colour="cyan")
## `geom_smooth()` using formula = 'y ~ x'
## Warning: Removed 11 rows containing non-finite outside the scale range
## (`stat_smooth()`).
## Warning: Removed 11 rows containing missing values or values outside the scale range
## (`geom_point()`).
Se observa una relación directamente proporcional entre los cargos totales y la antiguedad, donde a mayor antigueda mayor son los cargos totales. Además, se presenta una correlación igual a \(r=0.83\)
ggplot(Telco, aes(x=Churn, fill=gender))+
geom_bar()
Con base en el gráfico, no se observa una asociación entre el género y la fuga de clientes. Por lo tanto, el género no influye en que el cliente se vaya de la empresa.