Mid Term Project

Group 1 - Clive , Dawn , Hewan , Kausika ,Sanjana

3/5/2019

Background

Relation Between Age and Subscription

## 
##  Welch Two Sample t-test
## 
## data:  bank$age by bank$Subscription
## t = -4.7795, df = 5258.5, p-value = 1.805e-06
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -1.4129336 -0.5909889
## sample estimates:
##  mean in group no mean in group yes 
##          39.91119          40.91315

Dependency between Job and Subscription

            -  Admin: (29.1%)
            -  Blue collar : (13.8%)
            -  Technician : (15.7%)  

who have not subscribed much to the term deposit.

## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## | Chi-square contribution |
## |           N / Row Total |
## |           N / Col Total |
## |         N / Table Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  41188 
## 
##  
##               | bank$Subscription 
##      bank$job |        no |       yes | Row Total | 
## --------------|-----------|-----------|-----------|
##        admin. |      9070 |      1352 |     10422 | 
##               |     3.423 |    26.961 |           | 
##               |     0.870 |     0.130 |     0.253 | 
##               |     0.248 |     0.291 |           | 
##               |     0.220 |     0.033 |           | 
## --------------|-----------|-----------|-----------|
##   blue-collar |      8616 |       638 |      9254 | 
##               |    19.926 |   156.951 |           | 
##               |     0.931 |     0.069 |     0.225 | 
##               |     0.236 |     0.138 |           | 
##               |     0.209 |     0.015 |           | 
## --------------|-----------|-----------|-----------|
##  entrepreneur |      1332 |       124 |      1456 | 
##               |     1.240 |     9.767 |           | 
##               |     0.915 |     0.085 |     0.035 | 
##               |     0.036 |     0.027 |           | 
##               |     0.032 |     0.003 |           | 
## --------------|-----------|-----------|-----------|
##     housemaid |       954 |       106 |      1060 | 
##               |     0.191 |     1.507 |           | 
##               |     0.900 |     0.100 |     0.026 | 
##               |     0.026 |     0.023 |           | 
##               |     0.023 |     0.003 |           | 
## --------------|-----------|-----------|-----------|
##    management |      2596 |       328 |      2924 | 
##               |     0.001 |     0.006 |           | 
##               |     0.888 |     0.112 |     0.071 | 
##               |     0.071 |     0.071 |           | 
##               |     0.063 |     0.008 |           | 
## --------------|-----------|-----------|-----------|
##       retired |      1286 |       434 |      1720 | 
##               |    37.814 |   297.849 |           | 
##               |     0.748 |     0.252 |     0.042 | 
##               |     0.035 |     0.094 |           | 
##               |     0.031 |     0.011 |           | 
## --------------|-----------|-----------|-----------|
## self-employed |      1272 |       149 |      1421 | 
##               |     0.097 |     0.767 |           | 
##               |     0.895 |     0.105 |     0.035 | 
##               |     0.035 |     0.032 |           | 
##               |     0.031 |     0.004 |           | 
## --------------|-----------|-----------|-----------|
##      services |      3646 |       323 |      3969 | 
##               |     4.375 |    34.458 |           | 
##               |     0.919 |     0.081 |     0.096 | 
##               |     0.100 |     0.070 |           | 
##               |     0.089 |     0.008 |           | 
## --------------|-----------|-----------|-----------|
##       student |       600 |       275 |       875 | 
##               |    40.090 |   315.775 |           | 
##               |     0.686 |     0.314 |     0.021 | 
##               |     0.016 |     0.059 |           | 
##               |     0.015 |     0.007 |           | 
## --------------|-----------|-----------|-----------|
##    technician |      6013 |       730 |      6743 | 
##               |     0.147 |     1.156 |           | 
##               |     0.892 |     0.108 |     0.164 | 
##               |     0.165 |     0.157 |           | 
##               |     0.146 |     0.018 |           | 
## --------------|-----------|-----------|-----------|
##    unemployed |       870 |       144 |      1014 | 
##               |     0.985 |     7.758 |           | 
##               |     0.858 |     0.142 |     0.025 | 
##               |     0.024 |     0.031 |           | 
##               |     0.021 |     0.003 |           | 
## --------------|-----------|-----------|-----------|
##       unknown |       293 |        37 |       330 | 
##               |     0.000 |     0.001 |           | 
##               |     0.888 |     0.112 |     0.008 | 
##               |     0.008 |     0.008 |           | 
##               |     0.007 |     0.001 |           | 
## --------------|-----------|-----------|-----------|
##  Column Total |     36548 |      4640 |     41188 | 
##               |     0.887 |     0.113 |           | 
## --------------|-----------|-----------|-----------|
## 
##  
## Statistics for All Table Factors
## 
## 
## Pearson's Chi-squared test 
## ------------------------------------------------------------
## Chi^2 =  961.2424     d.f. =  11     p =  4.189763e-199 
## 
## 
## 

Factors - Contact Type, Contact Month and Contact Day

   - Graph plotting Contact Type, Month and Day for customers who subscribed to the Term Deposit

##               P-value       Significance      
## Contact Type  9.481264e-190 significant       
## Contact Month 0             highly significant
## Contact Day   2.958482e-05  significant

Relation Between Duration and Subscription

## 
##  Welch Two Sample t-test
## 
## data:  bank$duration by bank$Subscription
## t = -55.5, df = 4957.5, p-value < 2.2e-16
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -344.0859 -320.6068
## sample estimates:
##  mean in group no mean in group yes 
##          220.8448          553.1912

Tests between interdependents - the results of which relates to subscription.

## 
##  Pearson's product-moment correlation
## 
## data:  bank$campaign and bank$duration
## t = -14.588, df = 41186, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.08130044 -0.06208471
## sample estimates:
##         cor 
## -0.07169923

Factors - Consumer Price Index, Consumer Confidence Index

## 
##  Welch Two Sample t-test
## 
## data:  bank$cons.price.idx by bank$Subscription
## t = 24.082, df = 5472.5, p-value < 2.2e-16
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  0.2290714 0.2696708
## sample estimates:
##  mean in group no mean in group yes 
##          93.60376          93.35439

## 
##  Pearson's product-moment correlation
## 
## data:  bank_1$cons.price.idx and bank_1$Subscription
## t = -27.903, df = 41186, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.1456771 -0.1267204
## sample estimates:
##        cor 
## -0.1362112
## 
##  Welch Two Sample t-test
## 
## data:  bank$cons.conf.idx by bank$Subscription
## t = -8.6365, df = 5258.3, p-value < 2.2e-16
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -0.9856585 -0.6209660
## sample estimates:
##  mean in group no mean in group yes 
##         -40.59310         -39.78978

## 
##  Pearson's product-moment correlation
## 
## data:  bank_1$cons.conf.idx and bank_1$Subscription
## t = 11.154, df = 41186, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.04524442 0.06450127
## sample estimates:
##        cor 
## 0.05487795

Dependency Between Previous campaign outcome and Current campaign subscription.

## 
##  
##    Cell Contents
## |-------------------------|
## |                       N |
## | Chi-square contribution |
## |           N / Row Total |
## |           N / Col Total |
## |         N / Table Total |
## |-------------------------|
## 
##  
## Total Observations in Table:  41188 
## 
##  
##               | bank$Subscription 
## bank$poutcome |        no |       yes | Row Total | 
## --------------|-----------|-----------|-----------|
##       failure |      3647 |       605 |      4252 | 
##               |     4.207 |    33.141 |           | 
##               |     0.858 |     0.142 |     0.103 | 
##               |     0.100 |     0.130 |           | 
##               |     0.089 |     0.015 |           | 
## --------------|-----------|-----------|-----------|
##   nonexistent |     32422 |      3141 |     35563 | 
##               |    23.728 |   186.899 |           | 
##               |     0.912 |     0.088 |     0.863 | 
##               |     0.887 |     0.677 |           | 
##               |     0.787 |     0.076 |           | 
## --------------|-----------|-----------|-----------|
##       success |       479 |       894 |      1373 | 
##               |   448.651 |  3533.897 |           | 
##               |     0.349 |     0.651 |     0.033 | 
##               |     0.013 |     0.193 |           | 
##               |     0.012 |     0.022 |           | 
## --------------|-----------|-----------|-----------|
##  Column Total |     36548 |      4640 |     41188 | 
##               |     0.887 |     0.113 |           | 
## --------------|-----------|-----------|-----------|
## 
##  
## Statistics for All Table Factors
## 
## 
## Pearson's Chi-squared test 
## ------------------------------------------------------------
## Chi^2 =  4230.524     d.f. =  2     p =  0 
## 
## 
## 

Factors - Housing Loan, Personal Loan, Marital Status, Level of Education, Credit Default

##                    P-value        Significance     
## Housing loan       "0.05829448"   "Not Significant"
## Personal loan      "0.5786753"    "Not Significant"
## Marital Status     "2.068015e-26" "Significant"    
## Level of Education "3.305189e-38" "Significant"    
## Default            "5.161958e-89" "Significant"

Conclusion