Reading and describing data

knitr::opts_chunk$set(echo = TRUE)
library(readr)
MBA <- read_csv("C:/Users/Internship/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()
## )
library(psych)

dim(MBA)
## [1] 65165    13
summary(MBA)
##  CORPORATE_IDENTIFICATION_NUMBER DATE_OF_REGISTRATION COMPANY_NAME      
##  Length:65165                    Length:65165         Length:65165      
##  Class :character                Class :character     Class :character  
##  Mode  :character                Mode  :character     Mode  :character  
##                                                                         
##                                                                         
##                                                                         
##                                                                         
##  COMPANY_STATUS     COMPANY_CLASS      COMPANY_CATEGORY  
##  Length:65165       Length:65165       Length:65165      
##  Class :character   Class :character   Class :character  
##  Mode  :character   Mode  :character   Mode  :character  
##                                                          
##                                                          
##                                                          
##                                                          
##  AUTHORIZED_CAPITAL PAIDUP_CAPITAL      REGISTERED_STATE  
##  Min.   :5.00e+02   Min.   :3.000e+00   Length:65165      
##  1st Qu.:1.00e+05   1st Qu.:1.000e+05   Class :character  
##  Median :5.00e+05   Median :1.000e+05   Mode  :character  
##  Mean   :3.43e+07   Mean   :1.847e+07                     
##  3rd Qu.:1.50e+06   3rd Qu.:5.000e+05                     
##  Max.   :6.00e+11   Max.   :3.975e+11                     
##  NA's   :85         NA's   :3733                          
##  REGISTRAR_OF_COMPANIES PRINCIPAL_BUSINESS_ACTIVITY
##  Length:65165           Length:65165               
##  Class :character       Class :character           
##  Mode  :character       Mode  :character           
##                                                    
##                                                    
##                                                    
##                                                    
##  REGISTERED_OFFICE_ADDRESS SUB_CATEGORY      
##  Length:65165              Length:65165      
##  Class :character          Class :character  
##  Mode  :character          Mode  :character  
##                                              
##                                              
##                                              
## 
describe(MBA$AUTHORIZED_CAPITAL)
##    vars     n     mean         sd median  trimmed    mad min   max range
## X1    1 65080 34300681 2654993776  5e+05 968002.9 593040 500 6e+11 6e+11
##     skew kurtosis       se
## X1 188.4 40764.74 10407340
describe(MBA$PAIDUP_CAPITAL)
##    vars     n     mean         sd median  trimmed   mad min          max
## X1    1 61432 18468122 1688743992  1e+05 386382.8 81543 2.7 397508184000
##           range   skew kurtosis      se
## X1 397508183997 215.32 50075.83 6813441

Descriptive Statistics

Q2: Create a descriptive statistics (min, max, median etc) of each variable

describe(MBA)
## Warning in describe(MBA): NAs introduced by coercion

## Warning in describe(MBA): NAs introduced by coercion

## Warning in describe(MBA): NAs introduced by coercion

## Warning in describe(MBA): NAs introduced by coercion

## Warning in describe(MBA): NAs introduced by coercion

## Warning in describe(MBA): NAs introduced by coercion

## Warning in describe(MBA): NAs introduced by coercion

## Warning in describe(MBA): NAs introduced by coercion

## Warning in describe(MBA): NAs introduced by coercion

## Warning in describe(MBA): NAs introduced by coercion

## Warning in describe(MBA): NAs introduced by coercion
## Warning in FUN(newX[, i], ...): no non-missing arguments to min; returning
## Inf

## Warning in FUN(newX[, i], ...): no non-missing arguments to min; returning
## Inf

## Warning in FUN(newX[, i], ...): no non-missing arguments to min; returning
## Inf

## Warning in FUN(newX[, i], ...): no non-missing arguments to min; returning
## Inf

## Warning in FUN(newX[, i], ...): no non-missing arguments to min; returning
## Inf

## Warning in FUN(newX[, i], ...): no non-missing arguments to min; returning
## Inf

## Warning in FUN(newX[, i], ...): no non-missing arguments to min; returning
## Inf

## Warning in FUN(newX[, i], ...): no non-missing arguments to min; returning
## Inf

## Warning in FUN(newX[, i], ...): no non-missing arguments to min; returning
## Inf

## Warning in FUN(newX[, i], ...): no non-missing arguments to min; returning
## Inf
## Warning in FUN(newX[, i], ...): no non-missing arguments to max; returning
## -Inf

## Warning in FUN(newX[, i], ...): no non-missing arguments to max; returning
## -Inf

## Warning in FUN(newX[, i], ...): no non-missing arguments to max; returning
## -Inf

## Warning in FUN(newX[, i], ...): no non-missing arguments to max; returning
## -Inf

## Warning in FUN(newX[, i], ...): no non-missing arguments to max; returning
## -Inf

## Warning in FUN(newX[, i], ...): no non-missing arguments to max; returning
## -Inf

## Warning in FUN(newX[, i], ...): no non-missing arguments to max; returning
## -Inf

## Warning in FUN(newX[, i], ...): no non-missing arguments to max; returning
## -Inf

## Warning in FUN(newX[, i], ...): no non-missing arguments to max; returning
## -Inf

## Warning in FUN(newX[, i], ...): no non-missing arguments to max; returning
## -Inf
##                                  vars     n     mean         sd median
## CORPORATE_IDENTIFICATION_NUMBER*    1 65165      NaN         NA     NA
## DATE_OF_REGISTRATION*               2 65165      NaN         NA     NA
## COMPANY_NAME*                       3 65165      NaN         NA     NA
## COMPANY_STATUS*                     4 65165      NaN         NA     NA
## COMPANY_CLASS*                      5 65165      NaN         NA     NA
## COMPANY_CATEGORY*                   6 65165      NaN         NA     NA
## AUTHORIZED_CAPITAL                  7 65080 34300681 2654993776 500000
## PAIDUP_CAPITAL                      8 61432 18468122 1688743992 100000
## REGISTERED_STATE*                   9 65165      NaN         NA     NA
## REGISTRAR_OF_COMPANIES*            10 65165      NaN         NA     NA
## PRINCIPAL_BUSINESS_ACTIVITY*       11 63851      NaN         NA     NA
## REGISTERED_OFFICE_ADDRESS*         12 65165      NaN         NA     NA
## SUB_CATEGORY*                      13 65165      101         NA    101
##                                   trimmed    mad   min          max
## CORPORATE_IDENTIFICATION_NUMBER*      NaN     NA   Inf         -Inf
## DATE_OF_REGISTRATION*                 NaN     NA   Inf         -Inf
## COMPANY_NAME*                         NaN     NA   Inf         -Inf
## COMPANY_STATUS*                       NaN     NA   Inf         -Inf
## COMPANY_CLASS*                        NaN     NA   Inf         -Inf
## COMPANY_CATEGORY*                     NaN     NA   Inf         -Inf
## AUTHORIZED_CAPITAL               968002.9 593040 500.0 600000000000
## PAIDUP_CAPITAL                   386382.8  81543   2.7 397508184000
## REGISTERED_STATE*                     NaN     NA   Inf         -Inf
## REGISTRAR_OF_COMPANIES*               NaN     NA   Inf         -Inf
## PRINCIPAL_BUSINESS_ACTIVITY*          NaN     NA   Inf         -Inf
## REGISTERED_OFFICE_ADDRESS*            NaN     NA   Inf         -Inf
## SUB_CATEGORY*                       101.0      0 101.0          101
##                                         range   skew kurtosis       se
## CORPORATE_IDENTIFICATION_NUMBER*         -Inf     NA       NA       NA
## DATE_OF_REGISTRATION*                    -Inf     NA       NA       NA
## COMPANY_NAME*                            -Inf     NA       NA       NA
## COMPANY_STATUS*                          -Inf     NA       NA       NA
## COMPANY_CLASS*                           -Inf     NA       NA       NA
## COMPANY_CATEGORY*                        -Inf     NA       NA       NA
## AUTHORIZED_CAPITAL               599999999500 188.40 40764.74 10407340
## PAIDUP_CAPITAL                   397508183997 215.32 50075.83  6813441
## REGISTERED_STATE*                        -Inf     NA       NA       NA
## REGISTRAR_OF_COMPANIES*                  -Inf     NA       NA       NA
## PRINCIPAL_BUSINESS_ACTIVITY*             -Inf     NA       NA       NA
## REGISTERED_OFFICE_ADDRESS*               -Inf     NA       NA       NA
## SUB_CATEGORY*                               0     NA       NA       NA

Variable Analysis

One way contengency tables Q3: Create one-way contingency tables for the categorical variables

mytable1 <- with(MBA, table(COMPANY_CLASS))
mytable1
## COMPANY_CLASS
## One Person Company            Private             Public 
##                229              57708               7228
mytable2 <- with(MBA, table(COMPANY_STATUS))
mytable2
## 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
mytable3<- with(MBA, table(COMPANY_CLASS))
mytable3
## COMPANY_CLASS
## One Person Company            Private             Public 
##                229              57708               7228
mytable4 <- with(MBA, table(SUB_CATEGORY))
mytable4
## SUB_CATEGORY
##                                                                        # 8 
##                                                                          1 
##                                                                        101 
##                                                                          1 
##                                                    1127 Ministerial Colony 
##                                                                          1 
##                                                                  1st FLOOR 
##                                                                          1 
##                                                240/11 MURTAJA HUSSAIN ROAD 
##                                                                          1 
##                                                240/11 MURTAZA HUSSAIN ROAD 
##                                                                          1 
##                                                                  2ND FLOOR 
##                                                                          1 
##                                                          57/2 Sanjay Place 
##                                                                          1 
##                                ALIGANJ LUCKNOW Uttar Pradesh INDIA 226024" 
##                                                                          1 
##                                                                       B-15 
##                                                                          2 
##                                                         B-15 FAIZABAD ROAD 
##                                                                          1 
##                                              BURJA ROAD NEAR LALITA ASHRAM 
##                                                                          1 
##                                                                        C-7 
##                                                                          4 
##                                                                CIVIL LINES 
##                                                                          1 
##                                           Company licensed under Section25 
##                                                                         97 
##                                                                      F-482 
##                                                                          1 
##                                          Guarantee and association Company 
##                                                                         14 
##                                                     HOLYFLAME ACADEMY ROAD 
##                                                                          1 
##                                              Indian Non-Government Company 
##                                                                      64549 
##         JAR PAHAD C.P. MISSION COMPOUND JHANSI Uttar Pradesh INDIA 284001" 
##                                                                          1 
##                                                                 K. No. 209 
##                                                                          2 
##              LAXMI NAGAR KRISHNA NAGAR MATHURA Uttar Pradesh INDIA 281001" 
##                                                                          1 
##                 LDA Colony Kanpur Road Lucknow Uttar Pradesh INDIA 226005" 
##                                                                          1 
##                                                                  MAHANAGAR 
##                                                                          1 
##                                                                     Others 
##                                                                        281 
##                                                                    Plot #7 
##                                                                          1 
##                                                   State Government Company 
##                                                                        122 
## STREET NO. 4 ANAND VIHAR LOWER BAZAR MODINAGAR Uttar Pradesh INDIA 201204" 
##                                                                          1 
##                                              Subsidiary of Foreign Company 
##                                                                         53 
##                                                   Union Government Company 
##                                                                         21

Two way contengency tables

Q4: Create two-way contingency tables for the categorical variables

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(~ SUB_CATEGORY+COMPANY_CLASS, data=MBA)
mytable5
##                                                                             COMPANY_CLASS
## SUB_CATEGORY                                                                 One Person Company
##   # 8                                                                                         0
##   101                                                                                         0
##   1127 Ministerial Colony                                                                     0
##   1st FLOOR                                                                                   0
##   240/11 MURTAJA HUSSAIN ROAD                                                                 0
##   240/11 MURTAZA HUSSAIN ROAD                                                                 0
##   2ND FLOOR                                                                                   0
##   57/2 Sanjay Place                                                                           0
##   ALIGANJ LUCKNOW Uttar Pradesh INDIA 226024"                                                 0
##   B-15                                                                                        0
##   B-15 FAIZABAD ROAD                                                                          0
##   BURJA ROAD NEAR LALITA ASHRAM                                                               0
##   C-7                                                                                         0
##   CIVIL LINES                                                                                 0
##   Company licensed under Section25                                                            0
##   F-482                                                                                       0
##   Guarantee and association Company                                                           0
##   HOLYFLAME ACADEMY ROAD                                                                      0
##   Indian Non-Government Company                                                             229
##   JAR PAHAD C.P. MISSION COMPOUND JHANSI Uttar Pradesh INDIA 284001"                          0
##   K. No. 209                                                                                  0
##   LAXMI NAGAR KRISHNA NAGAR MATHURA Uttar Pradesh INDIA 281001"                               0
##   LDA Colony Kanpur Road Lucknow Uttar Pradesh INDIA 226005"                                  0
##   MAHANAGAR                                                                                   0
##   Others                                                                                      0
##   Plot #7                                                                                     0
##   State Government Company                                                                    0
##   STREET NO. 4 ANAND VIHAR LOWER BAZAR MODINAGAR Uttar Pradesh INDIA 201204"                  0
##   Subsidiary of Foreign Company                                                               0
##   Union Government Company                                                                    0
##                                                                             COMPANY_CLASS
## SUB_CATEGORY                                                                 Private
##   # 8                                                                              1
##   101                                                                              1
##   1127 Ministerial Colony                                                          1
##   1st FLOOR                                                                        1
##   240/11 MURTAJA HUSSAIN ROAD                                                      1
##   240/11 MURTAZA HUSSAIN ROAD                                                      1
##   2ND FLOOR                                                                        1
##   57/2 Sanjay Place                                                                1
##   ALIGANJ LUCKNOW Uttar Pradesh INDIA 226024"                                      1
##   B-15                                                                             2
##   B-15 FAIZABAD ROAD                                                               1
##   BURJA ROAD NEAR LALITA ASHRAM                                                    1
##   C-7                                                                              4
##   CIVIL LINES                                                                      1
##   Company licensed under Section25                                                34
##   F-482                                                                            1
##   Guarantee and association Company                                                9
##   HOLYFLAME ACADEMY ROAD                                                           1
##   Indian Non-Government Company                                                57306
##   JAR PAHAD C.P. MISSION COMPOUND JHANSI Uttar Pradesh INDIA 284001"               0
##   K. No. 209                                                                       2
##   LAXMI NAGAR KRISHNA NAGAR MATHURA Uttar Pradesh INDIA 281001"                    1
##   LDA Colony Kanpur Road Lucknow Uttar Pradesh INDIA 226005"                       1
##   MAHANAGAR                                                                        1
##   Others                                                                         269
##   Plot #7                                                                          1
##   State Government Company                                                         9
##   STREET NO. 4 ANAND VIHAR LOWER BAZAR MODINAGAR Uttar Pradesh INDIA 201204"       1
##   Subsidiary of Foreign Company                                                   50
##   Union Government Company                                                         4
##                                                                             COMPANY_CLASS
## SUB_CATEGORY                                                                 Public
##   # 8                                                                             0
##   101                                                                             0
##   1127 Ministerial Colony                                                         0
##   1st FLOOR                                                                       0
##   240/11 MURTAJA HUSSAIN ROAD                                                     0
##   240/11 MURTAZA HUSSAIN ROAD                                                     0
##   2ND FLOOR                                                                       0
##   57/2 Sanjay Place                                                               0
##   ALIGANJ LUCKNOW Uttar Pradesh INDIA 226024"                                     0
##   B-15                                                                            0
##   B-15 FAIZABAD ROAD                                                              0
##   BURJA ROAD NEAR LALITA ASHRAM                                                   0
##   C-7                                                                             0
##   CIVIL LINES                                                                     0
##   Company licensed under Section25                                               63
##   F-482                                                                           0
##   Guarantee and association Company                                               5
##   HOLYFLAME ACADEMY ROAD                                                          0
##   Indian Non-Government Company                                                7014
##   JAR PAHAD C.P. MISSION COMPOUND JHANSI Uttar Pradesh INDIA 284001"              1
##   K. No. 209                                                                      0
##   LAXMI NAGAR KRISHNA NAGAR MATHURA Uttar Pradesh INDIA 281001"                   0
##   LDA Colony Kanpur Road Lucknow Uttar Pradesh INDIA 226005"                      0
##   MAHANAGAR                                                                       0
##   Others                                                                         12
##   Plot #7                                                                         0
##   State Government Company                                                      113
##   STREET NO. 4 ANAND VIHAR LOWER BAZAR MODINAGAR Uttar Pradesh INDIA 201204"      0
##   Subsidiary of Foreign Company                                                   3
##   Union Government Company                                                       17
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
mytable5 <- xtabs(~ REGISTRAR_OF_COMPANIES+COMPANY_CLASS, data=MBA)
mytable5
##                       COMPANY_CLASS
## REGISTRAR_OF_COMPANIES One Person Company Private Public
##             RoC-Kanpur                229   57708   7228

Data visualisation

Box Plots

Q5: Draw box plot of the variables

par(mfrow=c(1,1))
par(mfrow=c(1,2))
with(MBA, boxplot(MBA$AUTHORIZED_CAPITAL,main="Authorized Capital Average",ylab="Average"))
par(mfrow=c(1,3))

par(mfrow=c(1,1))
par(mfrow=c(1,2))
with(MBA, boxplot(MBA$PAIDUP_CAPITAL,main="Paidup Capital Average",ylab="Average"))
par(mfrow=c(1,3))

boxplot(MBA$PAIDUP_CAPITAL,horizontal = TRUE,outline = FALSE)

boxplot(MBA$AUTHORIZED_CAPITAL,horizontal = TRUE,outline = FALSE)

boxplot(MBA$PAIDUP_CAPITAL,xlab="applicant income",main="Frequency distribution of paid up",horizontal = TRUE)

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)/-"))

Some Definitions:

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.

Paidup Capital: Paid-up capital is the amount of money a company has received from shareholders in exchange for shares of stock. Paid-up capital is created when a company sells its shares on the primary market, directly to investors.

The Difference(Authorized Capital - Paidup Capital)

So the task at hand is to find out the percentage of the paidup capital in the authorized capital. That is ., How much percentage of the authorized capital is the paidup capital ? We now create a new coloumn for it. ##TESTS

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 AND 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 loan 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 meanns of applicant income and loan amount.