##COLLEGE:VIT CHENNAI
##EMAIL:yhemanth.teja2015@vit.ac.in

Reading and describing data

setwd("C:\\Users\\Internship")
library(readr)
MBA <- read_csv("company_master_data_upto_Mar_2015_Uttar_Pradesh.csv")
## Parsed with column specification:
## cols(
##   CORPORATE_IDENTIFICATION_NUMBER = col_character(),
##   DATE_OF_REGISTRATION = col_character(),
##   COMPANY_NAME = col_character(),
##   COMPANY_STATUS = col_character(),
##   COMPANY_CLASS = col_character(),
##   COMPANY_CATEGORY = col_character(),
##   AUTHORIZED_CAPITAL = col_number(),
##   PAIDUP_CAPITAL = col_number(),
##   REGISTERED_STATE = col_character(),
##   REGISTRAR_OF_COMPANIES = col_character(),
##   PRINCIPAL_BUSINESS_ACTIVITY = col_character(),
##   REGISTERED_OFFICE_ADDRESS = col_character(),
##   SUB_CATEGORY = col_character()
## )
dim(MBA)
## [1] 65165    13

Descriptive Statistics

Variable Analysis

One way contengency tables

mytable1 <- with(MBA, table(COMPANY_CLASS))
mytable1
## COMPANY_CLASS
## One Person Company            Private             Public 
##                229              57708               7228
table(MBA$COMPANY_STATUS)
## 
##                                           ACTIVE 
##                                            48079 
##                               ACTIVE IN PROGRESS 
##                                                5 
##                                      AMALGAMATED 
##                                              197 
##                                 CONVERTED TO LLP 
##                                               24 
##                   CONVERTED TO LLP AND DISSOLVED 
##                                               66 
##                                        DISSOLVED 
##                                                5 
##                                          DORMANT 
##                                             4327 
## Dormant under section 455 of Companies Act, 2013 
##                                                7 
##                                       LIQUIDATED 
##                                               16 
##                                       STRIKE OFF 
##                                            11107 
##                                UNDER LIQUIDATION 
##                                              214 
##                    UNDER PROCESS OF STRIKING OFF 
##                                             1118

Two way Contingency tables

mytable5 <- xtabs(~ PRINCIPAL_BUSINESS_ACTIVITY+COMPANY_STATUS, data=MBA)
mytable5
##                                                                                                  COMPANY_STATUS
## PRINCIPAL_BUSINESS_ACTIVITY                                                                       ACTIVE
##   Agriculture and Allied Activities                                                                 1303
##   Business Services                                                                                12617
##   Community, personal & Social Services                                                             3732
##   Construction                                                                                      6876
##   Electricity, Gas & Water companies                                                                 276
##   Finance                                                                                           1700
##   Insurance                                                                                           89
##   Manufacturing (Food stuffs)                                                                       2318
##   Manufacturing (Leather & products thereof)                                                         357
##   Manufacturing (Machinery & Equipments)                                                            1429
##   Manufacturing (Metals & Chemicals, and products thereof)                                          3527
##   Manufacturing (Others)                                                                             347
##   Manufacturing (Paper & Paper products, Publishing, printing and reproduction of recorded media)    772
##   Manufacturing (Textiles)                                                                           949
##   Manufacturing (Wood Products)                                                                      106
##   Mining & Quarrying                                                                                 263
##   Real Estate and Renting                                                                           6456
##   Trading                                                                                           3794
##   Transport, storage and Communications                                                              938
##                                                                                                  COMPANY_STATUS
## PRINCIPAL_BUSINESS_ACTIVITY                                                                       ACTIVE IN PROGRESS
##   Agriculture and Allied Activities                                                                                0
##   Business Services                                                                                                0
##   Community, personal & Social Services                                                                            0
##   Construction                                                                                                     1
##   Electricity, Gas & Water companies                                                                               0
##   Finance                                                                                                          1
##   Insurance                                                                                                        0
##   Manufacturing (Food stuffs)                                                                                      0
##   Manufacturing (Leather & products thereof)                                                                       0
##   Manufacturing (Machinery & Equipments)                                                                           0
##   Manufacturing (Metals & Chemicals, and products thereof)                                                         2
##   Manufacturing (Others)                                                                                           0
##   Manufacturing (Paper & Paper products, Publishing, printing and reproduction of recorded media)                  1
##   Manufacturing (Textiles)                                                                                         0
##   Manufacturing (Wood Products)                                                                                    0
##   Mining & Quarrying                                                                                               0
##   Real Estate and Renting                                                                                          0
##   Trading                                                                                                          0
##   Transport, storage and Communications                                                                            0
##                                                                                                  COMPANY_STATUS
## PRINCIPAL_BUSINESS_ACTIVITY                                                                       AMALGAMATED
##   Agriculture and Allied Activities                                                                         1
##   Business Services                                                                                         7
##   Community, personal & Social Services                                                                     3
##   Construction                                                                                             13
##   Electricity, Gas & Water companies                                                                        1
##   Finance                                                                                                  36
##   Insurance                                                                                                 0
##   Manufacturing (Food stuffs)                                                                              22
##   Manufacturing (Leather & products thereof)                                                                5
##   Manufacturing (Machinery & Equipments)                                                                    8
##   Manufacturing (Metals & Chemicals, and products thereof)                                                 24
##   Manufacturing (Others)                                                                                    0
##   Manufacturing (Paper & Paper products, Publishing, printing and reproduction of recorded media)           8
##   Manufacturing (Textiles)                                                                                 13
##   Manufacturing (Wood Products)                                                                             1
##   Mining & Quarrying                                                                                        0
##   Real Estate and Renting                                                                                   3
##   Trading                                                                                                  20
##   Transport, storage and Communications                                                                     0
##                                                                                                  COMPANY_STATUS
## PRINCIPAL_BUSINESS_ACTIVITY                                                                       CONVERTED TO LLP
##   Agriculture and Allied Activities                                                                              0
##   Business Services                                                                                              0
##   Community, personal & Social Services                                                                          0
##   Construction                                                                                                   4
##   Electricity, Gas & Water companies                                                                             0
##   Finance                                                                                                        2
##   Insurance                                                                                                      0
##   Manufacturing (Food stuffs)                                                                                    1
##   Manufacturing (Leather & products thereof)                                                                     1
##   Manufacturing (Machinery & Equipments)                                                                         0
##   Manufacturing (Metals & Chemicals, and products thereof)                                                       2
##   Manufacturing (Others)                                                                                         0
##   Manufacturing (Paper & Paper products, Publishing, printing and reproduction of recorded media)                1
##   Manufacturing (Textiles)                                                                                       0
##   Manufacturing (Wood Products)                                                                                  0
##   Mining & Quarrying                                                                                             0
##   Real Estate and Renting                                                                                       11
##   Trading                                                                                                        1
##   Transport, storage and Communications                                                                          1
##                                                                                                  COMPANY_STATUS
## PRINCIPAL_BUSINESS_ACTIVITY                                                                       CONVERTED TO LLP AND DISSOLVED
##   Agriculture and Allied Activities                                                                                            0
##   Business Services                                                                                                            4
##   Community, personal & Social Services                                                                                        4
##   Construction                                                                                                                20
##   Electricity, Gas & Water companies                                                                                           1
##   Finance                                                                                                                      3
##   Insurance                                                                                                                    0
##   Manufacturing (Food stuffs)                                                                                                  2
##   Manufacturing (Leather & products thereof)                                                                                   2
##   Manufacturing (Machinery & Equipments)                                                                                       1
##   Manufacturing (Metals & Chemicals, and products thereof)                                                                     3
##   Manufacturing (Others)                                                                                                       0
##   Manufacturing (Paper & Paper products, Publishing, printing and reproduction of recorded media)                              2
##   Manufacturing (Textiles)                                                                                                     0
##   Manufacturing (Wood Products)                                                                                                0
##   Mining & Quarrying                                                                                                           0
##   Real Estate and Renting                                                                                                     17
##   Trading                                                                                                                      7
##   Transport, storage and Communications                                                                                        0
##                                                                                                  COMPANY_STATUS
## PRINCIPAL_BUSINESS_ACTIVITY                                                                       DISSOLVED
##   Agriculture and Allied Activities                                                                       1
##   Business Services                                                                                       1
##   Community, personal & Social Services                                                                   0
##   Construction                                                                                            0
##   Electricity, Gas & Water companies                                                                      0
##   Finance                                                                                                 0
##   Insurance                                                                                               0
##   Manufacturing (Food stuffs)                                                                             0
##   Manufacturing (Leather & products thereof)                                                              0
##   Manufacturing (Machinery & Equipments)                                                                  0
##   Manufacturing (Metals & Chemicals, and products thereof)                                                2
##   Manufacturing (Others)                                                                                  0
##   Manufacturing (Paper & Paper products, Publishing, printing and reproduction of recorded media)         0
##   Manufacturing (Textiles)                                                                                0
##   Manufacturing (Wood Products)                                                                           0
##   Mining & Quarrying                                                                                      0
##   Real Estate and Renting                                                                                 0
##   Trading                                                                                                 0
##   Transport, storage and Communications                                                                   1
##                                                                                                  COMPANY_STATUS
## PRINCIPAL_BUSINESS_ACTIVITY                                                                       DORMANT
##   Agriculture and Allied Activities                                                                   244
##   Business Services                                                                                   197
##   Community, personal & Social Services                                                               103
##   Construction                                                                                        117
##   Electricity, Gas & Water companies                                                                    8
##   Finance                                                                                            2054
##   Insurance                                                                                             1
##   Manufacturing (Food stuffs)                                                                         230
##   Manufacturing (Leather & products thereof)                                                           49
##   Manufacturing (Machinery & Equipments)                                                              162
##   Manufacturing (Metals & Chemicals, and products thereof)                                            513
##   Manufacturing (Others)                                                                               15
##   Manufacturing (Paper & Paper products, Publishing, printing and reproduction of recorded media)      84
##   Manufacturing (Textiles)                                                                            105
##   Manufacturing (Wood Products)                                                                        21
##   Mining & Quarrying                                                                                   19
##   Real Estate and Renting                                                                              17
##   Trading                                                                                             259
##   Transport, storage and Communications                                                                34
##                                                                                                  COMPANY_STATUS
## PRINCIPAL_BUSINESS_ACTIVITY                                                                       Dormant under section 455 of Companies Act, 2013
##   Agriculture and Allied Activities                                                                                                              0
##   Business Services                                                                                                                              2
##   Community, personal & Social Services                                                                                                          0
##   Construction                                                                                                                                   0
##   Electricity, Gas & Water companies                                                                                                             0
##   Finance                                                                                                                                        0
##   Insurance                                                                                                                                      0
##   Manufacturing (Food stuffs)                                                                                                                    1
##   Manufacturing (Leather & products thereof)                                                                                                     0
##   Manufacturing (Machinery & Equipments)                                                                                                         1
##   Manufacturing (Metals & Chemicals, and products thereof)                                                                                       1
##   Manufacturing (Others)                                                                                                                         1
##   Manufacturing (Paper & Paper products, Publishing, printing and reproduction of recorded media)                                                0
##   Manufacturing (Textiles)                                                                                                                       0
##   Manufacturing (Wood Products)                                                                                                                  0
##   Mining & Quarrying                                                                                                                             0
##   Real Estate and Renting                                                                                                                        0
##   Trading                                                                                                                                        1
##   Transport, storage and Communications                                                                                                          0
##                                                                                                  COMPANY_STATUS
## PRINCIPAL_BUSINESS_ACTIVITY                                                                       LIQUIDATED
##   Agriculture and Allied Activities                                                                        0
##   Business Services                                                                                        0
##   Community, personal & Social Services                                                                    1
##   Construction                                                                                             0
##   Electricity, Gas & Water companies                                                                       0
##   Finance                                                                                                  2
##   Insurance                                                                                                0
##   Manufacturing (Food stuffs)                                                                              1
##   Manufacturing (Leather & products thereof)                                                               1
##   Manufacturing (Machinery & Equipments)                                                                   2
##   Manufacturing (Metals & Chemicals, and products thereof)                                                 0
##   Manufacturing (Others)                                                                                   0
##   Manufacturing (Paper & Paper products, Publishing, printing and reproduction of recorded media)          1
##   Manufacturing (Textiles)                                                                                 1
##   Manufacturing (Wood Products)                                                                            0
##   Mining & Quarrying                                                                                       0
##   Real Estate and Renting                                                                                  0
##   Trading                                                                                                  1
##   Transport, storage and Communications                                                                    0
##                                                                                                  COMPANY_STATUS
## PRINCIPAL_BUSINESS_ACTIVITY                                                                       STRIKE OFF
##   Agriculture and Allied Activities                                                                      549
##   Business Services                                                                                     1002
##   Community, personal & Social Services                                                                  414
##   Construction                                                                                           667
##   Electricity, Gas & Water companies                                                                      55
##   Finance                                                                                                942
##   Insurance                                                                                               11
##   Manufacturing (Food stuffs)                                                                            929
##   Manufacturing (Leather & products thereof)                                                             196
##   Manufacturing (Machinery & Equipments)                                                                 705
##   Manufacturing (Metals & Chemicals, and products thereof)                                              2056
##   Manufacturing (Others)                                                                                 103
##   Manufacturing (Paper & Paper products, Publishing, printing and reproduction of recorded media)        406
##   Manufacturing (Textiles)                                                                               478
##   Manufacturing (Wood Products)                                                                           95
##   Mining & Quarrying                                                                                     107
##   Real Estate and Renting                                                                                142
##   Trading                                                                                               1206
##   Transport, storage and Communications                                                                  151
##                                                                                                  COMPANY_STATUS
## PRINCIPAL_BUSINESS_ACTIVITY                                                                       UNDER LIQUIDATION
##   Agriculture and Allied Activities                                                                               8
##   Business Services                                                                                               7
##   Community, personal & Social Services                                                                           4
##   Construction                                                                                                    3
##   Electricity, Gas & Water companies                                                                              1
##   Finance                                                                                                        34
##   Insurance                                                                                                       0
##   Manufacturing (Food stuffs)                                                                                    14
##   Manufacturing (Leather & products thereof)                                                                      3
##   Manufacturing (Machinery & Equipments)                                                                          7
##   Manufacturing (Metals & Chemicals, and products thereof)                                                       60
##   Manufacturing (Others)                                                                                          0
##   Manufacturing (Paper & Paper products, Publishing, printing and reproduction of recorded media)                 7
##   Manufacturing (Textiles)                                                                                       12
##   Manufacturing (Wood Products)                                                                                   0
##   Mining & Quarrying                                                                                              1
##   Real Estate and Renting                                                                                         0
##   Trading                                                                                                        12
##   Transport, storage and Communications                                                                           1
##                                                                                                  COMPANY_STATUS
## PRINCIPAL_BUSINESS_ACTIVITY                                                                       UNDER PROCESS OF STRIKING OFF
##   Agriculture and Allied Activities                                                                                          24
##   Business Services                                                                                                         210
##   Community, personal & Social Services                                                                                      53
##   Construction                                                                                                               66
##   Electricity, Gas & Water companies                                                                                          3
##   Finance                                                                                                                   329
##   Insurance                                                                                                                   3
##   Manufacturing (Food stuffs)                                                                                                27
##   Manufacturing (Leather & products thereof)                                                                                  5
##   Manufacturing (Machinery & Equipments)                                                                                     28
##   Manufacturing (Metals & Chemicals, and products thereof)                                                                   85
##   Manufacturing (Others)                                                                                                      5
##   Manufacturing (Paper & Paper products, Publishing, printing and reproduction of recorded media)                            18
##   Manufacturing (Textiles)                                                                                                   21
##   Manufacturing (Wood Products)                                                                                               3
##   Mining & Quarrying                                                                                                          9
##   Real Estate and Renting                                                                                                    53
##   Trading                                                                                                                   132
##   Transport, storage and Communications                                                                                      26
mytable5 <- xtabs(~ COMPANY_STATUS+COMPANY_CLASS, data=MBA)
mytable5
##                                                   COMPANY_CLASS
## COMPANY_STATUS                                     One Person Company
##   ACTIVE                                                          229
##   ACTIVE IN PROGRESS                                                0
##   AMALGAMATED                                                       0
##   CONVERTED TO LLP                                                  0
##   CONVERTED TO LLP AND DISSOLVED                                    0
##   DISSOLVED                                                         0
##   DORMANT                                                           0
##   Dormant under section 455 of Companies Act, 2013                  0
##   LIQUIDATED                                                        0
##   STRIKE OFF                                                        0
##   UNDER LIQUIDATION                                                 0
##   UNDER PROCESS OF STRIKING OFF                                     0
##                                                   COMPANY_CLASS
## COMPANY_STATUS                                     Private Public
##   ACTIVE                                             44540   3310
##   ACTIVE IN PROGRESS                                     4      1
##   AMALGAMATED                                          106     91
##   CONVERTED TO LLP                                      21      3
##   CONVERTED TO LLP AND DISSOLVED                        61      5
##   DISSOLVED                                              3      2
##   DORMANT                                             2587   1740
##   Dormant under section 455 of Companies Act, 2013       6      1
##   LIQUIDATED                                            11      5
##   STRIKE OFF                                          9401   1706
##   UNDER LIQUIDATION                                     71    143
##   UNDER PROCESS OF STRIKING OFF                        897    221
mytable5 <- xtabs(~ PRINCIPAL_BUSINESS_ACTIVITY+COMPANY_STATUS, data=MBA)
mytable5
##                                                                                                  COMPANY_STATUS
## PRINCIPAL_BUSINESS_ACTIVITY                                                                       ACTIVE
##   Agriculture and Allied Activities                                                                 1303
##   Business Services                                                                                12617
##   Community, personal & Social Services                                                             3732
##   Construction                                                                                      6876
##   Electricity, Gas & Water companies                                                                 276
##   Finance                                                                                           1700
##   Insurance                                                                                           89
##   Manufacturing (Food stuffs)                                                                       2318
##   Manufacturing (Leather & products thereof)                                                         357
##   Manufacturing (Machinery & Equipments)                                                            1429
##   Manufacturing (Metals & Chemicals, and products thereof)                                          3527
##   Manufacturing (Others)                                                                             347
##   Manufacturing (Paper & Paper products, Publishing, printing and reproduction of recorded media)    772
##   Manufacturing (Textiles)                                                                           949
##   Manufacturing (Wood Products)                                                                      106
##   Mining & Quarrying                                                                                 263
##   Real Estate and Renting                                                                           6456
##   Trading                                                                                           3794
##   Transport, storage and Communications                                                              938
##                                                                                                  COMPANY_STATUS
## PRINCIPAL_BUSINESS_ACTIVITY                                                                       ACTIVE IN PROGRESS
##   Agriculture and Allied Activities                                                                                0
##   Business Services                                                                                                0
##   Community, personal & Social Services                                                                            0
##   Construction                                                                                                     1
##   Electricity, Gas & Water companies                                                                               0
##   Finance                                                                                                          1
##   Insurance                                                                                                        0
##   Manufacturing (Food stuffs)                                                                                      0
##   Manufacturing (Leather & products thereof)                                                                       0
##   Manufacturing (Machinery & Equipments)                                                                           0
##   Manufacturing (Metals & Chemicals, and products thereof)                                                         2
##   Manufacturing (Others)                                                                                           0
##   Manufacturing (Paper & Paper products, Publishing, printing and reproduction of recorded media)                  1
##   Manufacturing (Textiles)                                                                                         0
##   Manufacturing (Wood Products)                                                                                    0
##   Mining & Quarrying                                                                                               0
##   Real Estate and Renting                                                                                          0
##   Trading                                                                                                          0
##   Transport, storage and Communications                                                                            0
##                                                                                                  COMPANY_STATUS
## PRINCIPAL_BUSINESS_ACTIVITY                                                                       AMALGAMATED
##   Agriculture and Allied Activities                                                                         1
##   Business Services                                                                                         7
##   Community, personal & Social Services                                                                     3
##   Construction                                                                                             13
##   Electricity, Gas & Water companies                                                                        1
##   Finance                                                                                                  36
##   Insurance                                                                                                 0
##   Manufacturing (Food stuffs)                                                                              22
##   Manufacturing (Leather & products thereof)                                                                5
##   Manufacturing (Machinery & Equipments)                                                                    8
##   Manufacturing (Metals & Chemicals, and products thereof)                                                 24
##   Manufacturing (Others)                                                                                    0
##   Manufacturing (Paper & Paper products, Publishing, printing and reproduction of recorded media)           8
##   Manufacturing (Textiles)                                                                                 13
##   Manufacturing (Wood Products)                                                                             1
##   Mining & Quarrying                                                                                        0
##   Real Estate and Renting                                                                                   3
##   Trading                                                                                                  20
##   Transport, storage and Communications                                                                     0
##                                                                                                  COMPANY_STATUS
## PRINCIPAL_BUSINESS_ACTIVITY                                                                       CONVERTED TO LLP
##   Agriculture and Allied Activities                                                                              0
##   Business Services                                                                                              0
##   Community, personal & Social Services                                                                          0
##   Construction                                                                                                   4
##   Electricity, Gas & Water companies                                                                             0
##   Finance                                                                                                        2
##   Insurance                                                                                                      0
##   Manufacturing (Food stuffs)                                                                                    1
##   Manufacturing (Leather & products thereof)                                                                     1
##   Manufacturing (Machinery & Equipments)                                                                         0
##   Manufacturing (Metals & Chemicals, and products thereof)                                                       2
##   Manufacturing (Others)                                                                                         0
##   Manufacturing (Paper & Paper products, Publishing, printing and reproduction of recorded media)                1
##   Manufacturing (Textiles)                                                                                       0
##   Manufacturing (Wood Products)                                                                                  0
##   Mining & Quarrying                                                                                             0
##   Real Estate and Renting                                                                                       11
##   Trading                                                                                                        1
##   Transport, storage and Communications                                                                          1
##                                                                                                  COMPANY_STATUS
## PRINCIPAL_BUSINESS_ACTIVITY                                                                       CONVERTED TO LLP AND DISSOLVED
##   Agriculture and Allied Activities                                                                                            0
##   Business Services                                                                                                            4
##   Community, personal & Social Services                                                                                        4
##   Construction                                                                                                                20
##   Electricity, Gas & Water companies                                                                                           1
##   Finance                                                                                                                      3
##   Insurance                                                                                                                    0
##   Manufacturing (Food stuffs)                                                                                                  2
##   Manufacturing (Leather & products thereof)                                                                                   2
##   Manufacturing (Machinery & Equipments)                                                                                       1
##   Manufacturing (Metals & Chemicals, and products thereof)                                                                     3
##   Manufacturing (Others)                                                                                                       0
##   Manufacturing (Paper & Paper products, Publishing, printing and reproduction of recorded media)                              2
##   Manufacturing (Textiles)                                                                                                     0
##   Manufacturing (Wood Products)                                                                                                0
##   Mining & Quarrying                                                                                                           0
##   Real Estate and Renting                                                                                                     17
##   Trading                                                                                                                      7
##   Transport, storage and Communications                                                                                        0
##                                                                                                  COMPANY_STATUS
## PRINCIPAL_BUSINESS_ACTIVITY                                                                       DISSOLVED
##   Agriculture and Allied Activities                                                                       1
##   Business Services                                                                                       1
##   Community, personal & Social Services                                                                   0
##   Construction                                                                                            0
##   Electricity, Gas & Water companies                                                                      0
##   Finance                                                                                                 0
##   Insurance                                                                                               0
##   Manufacturing (Food stuffs)                                                                             0
##   Manufacturing (Leather & products thereof)                                                              0
##   Manufacturing (Machinery & Equipments)                                                                  0
##   Manufacturing (Metals & Chemicals, and products thereof)                                                2
##   Manufacturing (Others)                                                                                  0
##   Manufacturing (Paper & Paper products, Publishing, printing and reproduction of recorded media)         0
##   Manufacturing (Textiles)                                                                                0
##   Manufacturing (Wood Products)                                                                           0
##   Mining & Quarrying                                                                                      0
##   Real Estate and Renting                                                                                 0
##   Trading                                                                                                 0
##   Transport, storage and Communications                                                                   1
##                                                                                                  COMPANY_STATUS
## PRINCIPAL_BUSINESS_ACTIVITY                                                                       DORMANT
##   Agriculture and Allied Activities                                                                   244
##   Business Services                                                                                   197
##   Community, personal & Social Services                                                               103
##   Construction                                                                                        117
##   Electricity, Gas & Water companies                                                                    8
##   Finance                                                                                            2054
##   Insurance                                                                                             1
##   Manufacturing (Food stuffs)                                                                         230
##   Manufacturing (Leather & products thereof)                                                           49
##   Manufacturing (Machinery & Equipments)                                                              162
##   Manufacturing (Metals & Chemicals, and products thereof)                                            513
##   Manufacturing (Others)                                                                               15
##   Manufacturing (Paper & Paper products, Publishing, printing and reproduction of recorded media)      84
##   Manufacturing (Textiles)                                                                            105
##   Manufacturing (Wood Products)                                                                        21
##   Mining & Quarrying                                                                                   19
##   Real Estate and Renting                                                                              17
##   Trading                                                                                             259
##   Transport, storage and Communications                                                                34
##                                                                                                  COMPANY_STATUS
## PRINCIPAL_BUSINESS_ACTIVITY                                                                       Dormant under section 455 of Companies Act, 2013
##   Agriculture and Allied Activities                                                                                                              0
##   Business Services                                                                                                                              2
##   Community, personal & Social Services                                                                                                          0
##   Construction                                                                                                                                   0
##   Electricity, Gas & Water companies                                                                                                             0
##   Finance                                                                                                                                        0
##   Insurance                                                                                                                                      0
##   Manufacturing (Food stuffs)                                                                                                                    1
##   Manufacturing (Leather & products thereof)                                                                                                     0
##   Manufacturing (Machinery & Equipments)                                                                                                         1
##   Manufacturing (Metals & Chemicals, and products thereof)                                                                                       1
##   Manufacturing (Others)                                                                                                                         1
##   Manufacturing (Paper & Paper products, Publishing, printing and reproduction of recorded media)                                                0
##   Manufacturing (Textiles)                                                                                                                       0
##   Manufacturing (Wood Products)                                                                                                                  0
##   Mining & Quarrying                                                                                                                             0
##   Real Estate and Renting                                                                                                                        0
##   Trading                                                                                                                                        1
##   Transport, storage and Communications                                                                                                          0
##                                                                                                  COMPANY_STATUS
## PRINCIPAL_BUSINESS_ACTIVITY                                                                       LIQUIDATED
##   Agriculture and Allied Activities                                                                        0
##   Business Services                                                                                        0
##   Community, personal & Social Services                                                                    1
##   Construction                                                                                             0
##   Electricity, Gas & Water companies                                                                       0
##   Finance                                                                                                  2
##   Insurance                                                                                                0
##   Manufacturing (Food stuffs)                                                                              1
##   Manufacturing (Leather & products thereof)                                                               1
##   Manufacturing (Machinery & Equipments)                                                                   2
##   Manufacturing (Metals & Chemicals, and products thereof)                                                 0
##   Manufacturing (Others)                                                                                   0
##   Manufacturing (Paper & Paper products, Publishing, printing and reproduction of recorded media)          1
##   Manufacturing (Textiles)                                                                                 1
##   Manufacturing (Wood Products)                                                                            0
##   Mining & Quarrying                                                                                       0
##   Real Estate and Renting                                                                                  0
##   Trading                                                                                                  1
##   Transport, storage and Communications                                                                    0
##                                                                                                  COMPANY_STATUS
## PRINCIPAL_BUSINESS_ACTIVITY                                                                       STRIKE OFF
##   Agriculture and Allied Activities                                                                      549
##   Business Services                                                                                     1002
##   Community, personal & Social Services                                                                  414
##   Construction                                                                                           667
##   Electricity, Gas & Water companies                                                                      55
##   Finance                                                                                                942
##   Insurance                                                                                               11
##   Manufacturing (Food stuffs)                                                                            929
##   Manufacturing (Leather & products thereof)                                                             196
##   Manufacturing (Machinery & Equipments)                                                                 705
##   Manufacturing (Metals & Chemicals, and products thereof)                                              2056
##   Manufacturing (Others)                                                                                 103
##   Manufacturing (Paper & Paper products, Publishing, printing and reproduction of recorded media)        406
##   Manufacturing (Textiles)                                                                               478
##   Manufacturing (Wood Products)                                                                           95
##   Mining & Quarrying                                                                                     107
##   Real Estate and Renting                                                                                142
##   Trading                                                                                               1206
##   Transport, storage and Communications                                                                  151
##                                                                                                  COMPANY_STATUS
## PRINCIPAL_BUSINESS_ACTIVITY                                                                       UNDER LIQUIDATION
##   Agriculture and Allied Activities                                                                               8
##   Business Services                                                                                               7
##   Community, personal & Social Services                                                                           4
##   Construction                                                                                                    3
##   Electricity, Gas & Water companies                                                                              1
##   Finance                                                                                                        34
##   Insurance                                                                                                       0
##   Manufacturing (Food stuffs)                                                                                    14
##   Manufacturing (Leather & products thereof)                                                                      3
##   Manufacturing (Machinery & Equipments)                                                                          7
##   Manufacturing (Metals & Chemicals, and products thereof)                                                       60
##   Manufacturing (Others)                                                                                          0
##   Manufacturing (Paper & Paper products, Publishing, printing and reproduction of recorded media)                 7
##   Manufacturing (Textiles)                                                                                       12
##   Manufacturing (Wood Products)                                                                                   0
##   Mining & Quarrying                                                                                              1
##   Real Estate and Renting                                                                                         0
##   Trading                                                                                                        12
##   Transport, storage and Communications                                                                           1
##                                                                                                  COMPANY_STATUS
## PRINCIPAL_BUSINESS_ACTIVITY                                                                       UNDER PROCESS OF STRIKING OFF
##   Agriculture and Allied Activities                                                                                          24
##   Business Services                                                                                                         210
##   Community, personal & Social Services                                                                                      53
##   Construction                                                                                                               66
##   Electricity, Gas & Water companies                                                                                          3
##   Finance                                                                                                                   329
##   Insurance                                                                                                                   3
##   Manufacturing (Food stuffs)                                                                                                27
##   Manufacturing (Leather & products thereof)                                                                                  5
##   Manufacturing (Machinery & Equipments)                                                                                     28
##   Manufacturing (Metals & Chemicals, and products thereof)                                                                   85
##   Manufacturing (Others)                                                                                                      5
##   Manufacturing (Paper & Paper products, Publishing, printing and reproduction of recorded media)                            18
##   Manufacturing (Textiles)                                                                                                   21
##   Manufacturing (Wood Products)                                                                                               3
##   Mining & Quarrying                                                                                                          9
##   Real Estate and Renting                                                                                                    53
##   Trading                                                                                                                   132
##   Transport, storage and Communications                                                                                      26
mytable5 <- xtabs(~ COMPANY_CATEGORY+COMPANY_CLASS, data=MBA)
mytable5
##                               COMPANY_CLASS
## COMPANY_CATEGORY               One Person Company Private Public
##   Company Limited by Guarantee                  0      67     62
##   Company Limited by Shares                   229   57621   7154
##   Unlimited Company                             0      20     12

Data visualisation with Boxplots

par(mfrow=c(1,2))
with(MBA, boxplot(MBA$AUTHORIZED_CAPITAL/1000000000,main="Authorized Capital Average",ylab="Average in billion(Rs)/-"))

par(mfrow=c(1,2))
with(MBA, boxplot(MBA$PAIDUP_CAPITAL/1000000000,main="Paidup Capital Average",ylab="Average in billion(Rs)/-"))

boxplot(MBA$PAIDUP_CAPITAL,horizontal = TRUE,outline = FALSE, main="Boxplot of Paid-up Capital")

boxplot(MBA$AUTHORIZED_CAPITAL/10,horizontal = TRUE,outline = FALSE, main="Boxplot of Authorized Capital")

Authorized Capital:

The authorised capital of a company is the maximum amount of share capital that the company is authorised by its constitutional documents to issue (allocate) to shareholders.

Scatterplot showing the the distribution of authorized and paid-up capital

library(car)
scatterplot(MBA$AUTHORIZED_CAPITAL~MBA$PAIDUP_CAPITAL, ylim=c(100000,10000000000), xlim=c(100000,10000000000), xlab="Paid-up capital", ylab="Authorized capital")

Histogram

hist(log(MBA$AUTHORIZED_CAPITAL), n=30, xlab="Log distribution of authorized capital", main="Distribution of Authorized capital")

hist(log(MBA$PAIDUP_CAPITAL), n=30, xlab="Log distribution of paid-up capital", main="Distribution of Paid-up capital")

Chi-Squared Test

Assumption 1: Company status depends on Company Category

mytable<- xtabs(~COMPANY_STATUS+COMPANY_CATEGORY, data=MBA)
mytable
##                                                   COMPANY_CATEGORY
## COMPANY_STATUS                                     Company Limited by Guarantee
##   ACTIVE                                                                    104
##   ACTIVE IN PROGRESS                                                          0
##   AMALGAMATED                                                                 1
##   CONVERTED TO LLP                                                            0
##   CONVERTED TO LLP AND DISSOLVED                                              0
##   DISSOLVED                                                                   0
##   DORMANT                                                                    13
##   Dormant under section 455 of Companies Act, 2013                            0
##   LIQUIDATED                                                                  0
##   STRIKE OFF                                                                 10
##   UNDER LIQUIDATION                                                           0
##   UNDER PROCESS OF STRIKING OFF                                               1
##                                                   COMPANY_CATEGORY
## COMPANY_STATUS                                     Company Limited by Shares
##   ACTIVE                                                               47955
##   ACTIVE IN PROGRESS                                                       5
##   AMALGAMATED                                                            196
##   CONVERTED TO LLP                                                        24
##   CONVERTED TO LLP AND DISSOLVED                                          66
##   DISSOLVED                                                                5
##   DORMANT                                                               4310
##   Dormant under section 455 of Companies Act, 2013                         7
##   LIQUIDATED                                                              16
##   STRIKE OFF                                                           11092
##   UNDER LIQUIDATION                                                      213
##   UNDER PROCESS OF STRIKING OFF                                         1115
##                                                   COMPANY_CATEGORY
## COMPANY_STATUS                                     Unlimited Company
##   ACTIVE                                                          20
##   ACTIVE IN PROGRESS                                               0
##   AMALGAMATED                                                      0
##   CONVERTED TO LLP                                                 0
##   CONVERTED TO LLP AND DISSOLVED                                   0
##   DISSOLVED                                                        0
##   DORMANT                                                          4
##   Dormant under section 455 of Companies Act, 2013                 0
##   LIQUIDATED                                                       0
##   STRIKE OFF                                                       5
##   UNDER LIQUIDATION                                                1
##   UNDER PROCESS OF STRIKING OFF                                    2
chisq.test(mytable)
## Warning in chisq.test(mytable): Chi-squared approximation may be incorrect
## 
##  Pearson's Chi-squared test
## 
## data:  mytable
## X-squared = 25.82, df = 22, p-value = 0.2595

Since p-value <0.05, we say that company status and company category loan are not independent.

ASSUMPTION 2 - Company status depends on Company Category

mytable<- xtabs(~COMPANY_STATUS+COMPANY_CLASS, data=MBA)
mytable
##                                                   COMPANY_CLASS
## COMPANY_STATUS                                     One Person Company
##   ACTIVE                                                          229
##   ACTIVE IN PROGRESS                                                0
##   AMALGAMATED                                                       0
##   CONVERTED TO LLP                                                  0
##   CONVERTED TO LLP AND DISSOLVED                                    0
##   DISSOLVED                                                         0
##   DORMANT                                                           0
##   Dormant under section 455 of Companies Act, 2013                  0
##   LIQUIDATED                                                        0
##   STRIKE OFF                                                        0
##   UNDER LIQUIDATION                                                 0
##   UNDER PROCESS OF STRIKING OFF                                     0
##                                                   COMPANY_CLASS
## COMPANY_STATUS                                     Private Public
##   ACTIVE                                             44540   3310
##   ACTIVE IN PROGRESS                                     4      1
##   AMALGAMATED                                          106     91
##   CONVERTED TO LLP                                      21      3
##   CONVERTED TO LLP AND DISSOLVED                        61      5
##   DISSOLVED                                              3      2
##   DORMANT                                             2587   1740
##   Dormant under section 455 of Companies Act, 2013       6      1
##   LIQUIDATED                                            11      5
##   STRIKE OFF                                          9401   1706
##   UNDER LIQUIDATION                                     71    143
##   UNDER PROCESS OF STRIKING OFF                        897    221
chisq.test(mytable)
## Warning in chisq.test(mytable): Chi-squared approximation may be incorrect
## 
##  Pearson's Chi-squared test
## 
## data:  mytable
## X-squared = 5869.2, df = 22, p-value < 2.2e-16

Since p-value <0.05, we say that company status and company class loan are not independent.

ASSUMPTION 3

COMPANY CATEGORY depends on COMPANY CLASS

mytable<- xtabs(~COMPANY_CLASS+COMPANY_CATEGORY, data=MBA)
mytable
##                     COMPANY_CATEGORY
## COMPANY_CLASS        Company Limited by Guarantee
##   One Person Company                            0
##   Private                                      67
##   Public                                       62
##                     COMPANY_CATEGORY
## COMPANY_CLASS        Company Limited by Shares Unlimited Company
##   One Person Company                       229                 0
##   Private                                57621                20
##   Public                                  7154                12
chisq.test(mytable)
## Warning in chisq.test(mytable): Chi-squared approximation may be incorrect
## 
##  Pearson's Chi-squared test
## 
## data:  mytable
## X-squared = 202.12, df = 4, p-value < 2.2e-16

Since p-value <0.05, we say that company category and company class are not independent.

T-tests

Hypothesis 1: There is no significant difference between the means of income of the applicant and loan amount.

t.test(MBA$PAIDUP_CAPITAL,MBA$AUTHORIZED_CAPITAL)
## 
##  Welch Two Sample t-test
## 
## data:  MBA$PAIDUP_CAPITAL and MBA$AUTHORIZED_CAPITAL
## t = -1.2728, df = 111180, p-value = 0.2031
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -40213366   8548249
## sample estimates:
## mean of x mean of y 
##  18468122  34300681

Since p-value is GREATER than 0.05. Therefore there is NO significant difference between the paidup capital and authorized capital.