batters <- read.csv("C:/Data science/IPL2025Batters.csv")
bowlers <- read.csv("C:/Data science/IPL2025Bowlers.csv")
 final_data <- merge(batters, bowlers, by = "Player.Name")
 final_data
##                 Player.Name Team.x Runs Matches Inn No  HS AVG.x  BF   SR.x
## 1             Aiden Markram    LSG  445      13  13  0  66 34.23 299 148.82
## 2                Akash Deep    LSG    6       6   2  1  6*  6.00   2 300.00
## 3             Akash Madhwal     RR    4       4   1  1  4*     -   9  44.44
## 4             Andre Russell    KKR  167      13  10  1 57* 18.56 102 163.72
## 5             Anshul Kamboj    CSK   14       8   5  3  5*  7.00  12 116.66
## 6            Arshdeep Singh   PBKS    2      17   2  1  1*  2.00   6  33.33
## 7                Avesh Khan    LSG   21      13   4  3 19* 21.00  12 175.00
## 8                Axar Patel     DC  263      12  11  1  43 26.30 167 157.48
## 9              Ayush Badoni    LSG  329      14  11  1  74 32.90 222 148.19
## 10       Azmatullah Omarzai   PBKS   57       9   5  1 21* 14.25  41 139.02
## 11        Bhuvneshwar Kumar    RCB   14      14   6  3   8  4.67  25  56.00
## 12             Corbin Bosch     MI   47       2   2  0  27 23.50  32 146.87
## 13            Deepak Chahar     MI   37      14   4  3 28* 37.00  25 148.00
## 14            Digvesh Singh    LSG    1      13   2  1   1  1.00   3  33.33
## 15      Dushmantha Chameera     DC   10       6   3  3  8*     -  14  71.42
## 16           Gerald Coetzee     GT   17       4   2  0  12  8.50  11 154.54
## 17            Glenn Maxwell   PBKS   48       7   6  0  30  8.00  49  97.95
## 18            Hardik Pandya     MI  224      15  12  3 48* 24.89 137 163.50
## 19            Harpreet Brar   PBKS   11       8   2  1  7* 11.00  13  84.61
## 20            Harshal Patel    SRH   21      13   4  2 12* 10.50  26  80.76
## 21             Harshit Rana    KKR   57      13   7  3  34 14.25  53 107.54
## 22             Jofra Archer     RR   63      12   7  1  30 10.50  50 126.00
## 23            Kagiso Rabada     GT    9       4   2  1  7*  9.00   8 112.50
## 24           Kamindu Mendis    SRH   92       5   5  2 32* 30.67  69 133.33
## 25              Karn Sharma     MI    1       6   1  1  1*     -   1 100.00
## 26            Khaleel Ahmed    CSK    1      14   2  2  1*     -   2  50.00
## 27            Krunal Pandya    RCB  109      15   7  1 73* 18.17  86 126.74
## 28            Kuldeep Yadav     DC   18      14   5  2   7  6.00  16 112.50
## 29    Kumar Kartikeya Singh     RR    3       4   2  0   2  1.50   5  60.00
## 30            Kwena Maphaka     RR    8       2   1  1  8*     -   2 400.00
## 31         Liam Livingstone    RCB  112      10   8  1  54 16.00  84 133.33
## 32          Lockie Ferguson   PBKS    4       4   1  1  4*     -   1 400.00
## 33       Maheesh Theekshana     RR   10      11   4  2   5  5.00  27  37.03
## 34             Marco Jansen   PBKS   75      14   8  4 34* 18.75  63 119.04
## 35           Marcus Stoinis   PBKS  160      13  11  5 44* 26.67  86 186.04
## 36         Mitchell Santner     MI   40      13   8  6 18* 20.00  33 121.21
## 37           Mitchell Starc     DC    6      11   6  4  2*  3.00  10  60.00
## 38                Moeen Ali    KKR    5       6   2  0   5  2.50  14  35.71
## 39           Mohammad Shami    SRH   10       9   4  3  6* 10.00  10 100.00
## 40           Mohammed Siraj     GT    3      15   1  1  3*     -   4  75.00
## 41         Mohd Arshad Khan     GT   23       9   5  3  20 11.50  19 121.05
## 42             Mohit Sharma     DC    1       8   2  1  1*  1.00   3  33.33
## 43       Nitish Kumar Reddy    SRH  182      13  11  3  32 22.75 153 118.95
## 44               Noor Ahmad    CSK    7      14   6  2  2*  1.75  17  41.17
## 45              Pat Cummins    SRH   97      14   9  5 22* 24.25  58 167.24
## 46             Prince Yadav    LSG    5       6   2  2  4*     -  10  50.00
## 47              Rashid Khan     GT   40      15   8  3  12  8.00  28 142.85
## 48             Ravi Bishnoi    LSG   13      11   3  1  13  6.50  16  81.25
## 49      Ravichandran Ashwin    CSK   33       9   4  0  13  8.25  30 110.00
## 50          Ravindra Jadeja    CSK  301      14  14  5 77* 33.44 222 135.58
## 51              Riyan Parag     RR  393      14  14  2  95 32.75 236 166.52
## 52         Romario Shepherd    RCB   70       8   3  1 53* 35.00  24 291.66
## 53              Sai Kishore     GT    5      15   3  0   3  1.67  10  50.00
## 54               Sam Curran    CSK  114       5   5  0  88 22.80  84 135.71
## 55           Sandeep Sharma     RR    6      10   1  1  6*     -   5 120.00
## 56            Shahbaz Ahmed    LSG    9       3   1  0   9  9.00   8 112.50
## 57            Shahrukh Khan     GT  179      15  11  5  57 29.83 100 179.00
## 58           Shardul Thakur    LSG   18      10   5  2   6  6.00  12 150.00
## 59          Simarjeet Singh    SRH    3       4   3  1  3*  1.50   7  42.85
## 60          Spencer Johnson    KKR    2       4   2  2  1*     -   4  50.00
## 61             Sunil Narine    KKR  246      12  12  1  44 22.36 144 170.83
## 62              Trent Boult     MI    2      16   2  1  1*  2.00   3  66.66
## 63         Tushar Deshpande     RR    7      10   4  3   3  7.00   8  87.50
## 64 V Satyanarayana Penmetsa     MI    1       2   1  1  1*     -   1 100.00
## 65      Varun Chakaravarthy    KKR    1      13   1  1  1*     -   1 100.00
## 66             Vipraj Nigam     DC  142      14   8  1  39 20.29  79 179.74
## 67        Wanindu Hasaranga     RR    9      11   5  0   4  1.80  15  60.00
## 68        Washington Sundar     GT  133       6   5  0  49 26.60  80 166.25
## 69               Will Jacks     MI  233      13  11  1  53 23.30 172 135.46
## 70          Xavier Bartlett   PBKS   11       4   1  0  11 11.00  15  73.33
## 71               Yash Dayal    RCB    4      15   3  1   3  2.00   8  50.00
##    X100s X50s X4s X6s Team.y WKT MAT INN  OVR RUNS   BBI  AVG.y   ECO  SR.y X4W
## 1      0    5  38  22    LSG   4  13   5 11.0  102  30/2  25.50  9.27 16.50   0
## 2      0    0   0   1    LSG   3   6   6 19.0  229  55/2  76.33 12.05 38.00   0
## 3      0    0   0   0     RR   4   4   4 15.0  166  29/3  41.50 11.06 22.50   0
## 4      0    1  16  14    KKR   8  13   9 18.1  217  21/2  27.12 11.94 13.62   0
## 5      0    0   2   0    CSK   8   8   8 21.3  172  13/3  21.50  8.00 16.12   0
## 6      0    0   0   0   PBKS  21  17  16 58.2  518  16/3  24.66  8.88 16.66   0
## 7      0    0   3   1    LSG  13  13  13 47.2  487  37/3  37.46 10.28 21.84   0
## 8      0    0  23  15     DC   5  12  11 34.0  288  19/2  57.60  8.47 40.80   0
## 9      0    2  27  14    LSG   2  14   2  1.4   13 2-Apr   6.50  7.80  5.00   0
## 10     0    0   6   3   PBKS   8   9   8 27.0  279  33/2  34.87 10.33 20.25   0
## 11     0    0   1   0    RCB  17  14  14 52.0  483  33/3  28.41  9.28 18.35   0
## 12     0    0   3   3     MI   1   2   2  7.0   55  26/1  55.00  7.85 42.00   0
## 13     0    0   3   2     MI  11  14  14 41.0  376 2-Dec  34.18  9.17 22.36   0
## 14     0    0   0   0    LSG  14  13  13 52.0  429  30/2  30.64  8.25 22.28   0
## 15     0    0   0   0     DC   4   6   5 15.0  171  24/1  42.75 11.40 22.50   0
## 16     0    0   2   1     GT   2   4   4 12.0  131 1-Oct  65.50 10.91 36.00   0
## 17     0    0   5   1   PBKS   4   7   6 13.0  110 1-May  27.50  8.46 19.50   0
## 18     0    0  18  12     MI  14  15  14 35.0  342  36/5  24.42  9.77 15.00   0
## 19     0    0   0   1   PBKS  10   8   7 22.0  190  22/3  19.00  8.63 13.20   0
## 20     0    0   0   0    SRH  16  13  13 43.5  430  28/4  26.87  9.80 16.43   2
## 21     0    0   5   3    KKR  15  13  13 44.0  448  25/3  29.86 10.18 17.60   0
## 22     0    0   3   4     RR  11  12  12 45.3  431  25/3  39.18  9.47 24.81   0
## 23     0    0   0   1     GT   2   4   4 14.0  162  41/1  81.00 11.57 42.00   0
## 24     0    0   7   2    SRH   2   5   4  7.0   60 1-Apr  30.00  8.57 21.00   0
## 25     0    0   0   0     MI   7   6   5 15.0  128  23/3  18.28  8.53 12.85   0
## 26     0    0   0   0    CSK  15  14  14 46.4  447  29/3  29.80  9.57 18.66   0
## 27     0    1   9   4    RCB  17  15  15 46.0  379  45/4  22.29  8.23 16.23   1
## 28     0    0   2   0     DC  15  14  13 51.0  361  22/3  24.06  7.07 20.40   0
## 29     0    0   0   0     RR   2   4   4  8.0   78  21/1  39.00  9.75 24.00   0
## 30     0    0   2   0     RR   1   2   2  5.0   54  32/1  54.00 10.80 30.00   0
## 31     0    1   4   9    RCB   2  10   5  9.0   76  28/2  38.00  8.44 27.00   0
## 32     0    0   1   0   PBKS   5   4   4 11.2  104  37/2  20.80  9.17 13.60   0
## 33     0    0   0   0     RR  11  11  11 42.0  410  26/2  37.27  9.76 22.90   0
## 34     0    0   3   4   PBKS  16  14  14 47.1  434  17/3  27.12  9.20 17.68   0
## 35     0    0   8  15   PBKS   1  13   9 14.1  175  14/1 175.00 12.35 85.00   0
## 36     0    0   2   3     MI  10  13  13 39.3  313 3-Nov  31.30  7.92 23.70   0
## 37     0    0   0   0     DC  14  11  10 36.0  366  35/5  26.14 10.16 15.42   0
## 38     0    0   0   0    KKR   6   6   5 16.0  136  23/2  22.66  8.50 16.00   0
## 39     0    0   1   0    SRH   6   9   9 30.0  337  28/2  56.16 11.23 30.00   0
## 40     0    0   0   0     GT  16  15  15 57.0  527  17/4  32.93  9.24 21.37   1
## 41     0    0   0   3     GT   6   9   9 21.0  217 1-Jul  36.16 10.33 21.00   0
## 42     0    0   0   0     DC   2   8   8 25.0  257 1-Oct 128.50 10.28 75.00   0
## 43     0    0  16   4    SRH   2  13   3  5.0   47  13/1  23.50  9.40 15.00   0
## 44     0    0   0   0    CSK  24  14  14 50.0  408  18/4  17.00  8.16 12.50   2
## 45     0    0   6   7    SRH  16  14  14 49.4  450  19/3  28.12  9.06 18.62   0
## 46     0    0   0   0    LSG   3   6   6 22.5  225  29/1  75.00  9.85 45.66   0
## 47     0    0   2   3     GT   9  15  15 55.0  514  25/2  57.11  9.34 36.66   0
## 48     0    0   0   2    LSG   9  11  11 37.0  401  18/2  44.55 10.83 24.66   0
## 49     0    0   3   1    CSK   7   9   9 31.0  283  41/2  40.42  9.12 26.57   0
## 50     0    2  25  10    CSK  10  14  14 37.5  324  17/2  32.40  8.56 22.70   0
## 51     0    1  27  27     RR   3  14   9 20.0  170 1-Dec  56.66  8.50 40.00   0
## 52     0    1   5   7    RCB   6   8   7 14.0  151  14/2  25.16 10.78 14.00   0
## 53     0    0   0   0     GT  19  15  15 42.3  393  30/3  20.68  9.24 13.42   0
## 54     0    1  11   4    CSK   1   5   5 12.0  133  34/1 133.00 11.08 72.00   0
## 55     0    0   0   0     RR   9  10  10 36.3  361  21/2  40.11  9.89 24.33   0
## 56     0    0   1   0    LSG   1   3   3  8.3  102  41/1 102.00 12.00 51.00   0
## 57     0    1  11  13     GT   1  15   1  1.0   13  13/1  13.00 13.00  6.00   0
## 58     0    0   3   0    LSG  13  10  10 34.0  375  34/4  28.84 11.02 15.69   1
## 59     0    0   0   0    SRH   2   4   4 10.0  141  46/2  70.50 14.10 30.00   0
## 60     0    0   0   0    KKR   1   4   4 11.2  133  42/1 133.00 11.73 68.00   0
## 61     0    0  25  19    KKR  12  12  12 45.0  351  13/3  29.25  7.80 22.50   0
## 62     0    0   0   0     MI  22  16  16 57.4  517  26/4  23.50  8.96 15.72   1
## 63     0    0   0   0     RR   9  10  10 32.0  340  44/3  37.77 10.62 21.33   0
## 64     0    0   0   0     MI   1   2   2  4.0   53  40/1  53.00 13.25 24.00   0
## 65     0    0   0   0    KKR  17  13  13 50.0  383  22/3  22.52  7.66 17.64   0
## 66     0    0  15   8     DC  11  14  13 39.0  356  18/2  32.36  9.12 21.27   0
## 67     0    0   0   0     RR  11  11  11 41.0  371  35/4  33.72  9.04 22.36   1
## 68     0    0  10   7     GT   2   6   5 10.5  111  28/1  55.50 10.24 32.50   0
## 69     0    1  22  11     MI   6  13   8 14.0  120  14/2  20.00  8.57 14.00   0
## 70     0    0   1   0   PBKS   2   4   4 10.0   96  26/1  48.00  9.60 30.00   0
## 71     0    0   0   0    RCB  13  15  15 49.0  470  18/2  36.15  9.59 22.61   0
##    X5W
## 1    0
## 2    0
## 3    0
## 4    0
## 5    0
## 6    0
## 7    0
## 8    0
## 9    0
## 10   0
## 11   0
## 12   0
## 13   0
## 14   0
## 15   0
## 16   0
## 17   0
## 18   1
## 19   0
## 20   0
## 21   0
## 22   0
## 23   0
## 24   0
## 25   0
## 26   0
## 27   0
## 28   0
## 29   0
## 30   0
## 31   0
## 32   0
## 33   0
## 34   0
## 35   0
## 36   0
## 37   1
## 38   0
## 39   0
## 40   0
## 41   0
## 42   0
## 43   0
## 44   0
## 45   0
## 46   0
## 47   0
## 48   0
## 49   0
## 50   0
## 51   0
## 52   0
## 53   0
## 54   0
## 55   0
## 56   0
## 57   0
## 58   0
## 59   0
## 60   0
## 61   0
## 62   0
## 63   0
## 64   0
## 65   0
## 66   0
## 67   0
## 68   0
## 69   0
## 70   0
## 71   0
 head(final_data)
##      Player.Name Team.x Runs Matches Inn No  HS AVG.x  BF   SR.x X100s X50s X4s
## 1  Aiden Markram    LSG  445      13  13  0  66 34.23 299 148.82     0    5  38
## 2     Akash Deep    LSG    6       6   2  1  6*  6.00   2 300.00     0    0   0
## 3  Akash Madhwal     RR    4       4   1  1  4*     -   9  44.44     0    0   0
## 4  Andre Russell    KKR  167      13  10  1 57* 18.56 102 163.72     0    1  16
## 5  Anshul Kamboj    CSK   14       8   5  3  5*  7.00  12 116.66     0    0   2
## 6 Arshdeep Singh   PBKS    2      17   2  1  1*  2.00   6  33.33     0    0   0
##   X6s Team.y WKT MAT INN  OVR RUNS  BBI AVG.y   ECO  SR.y X4W X5W
## 1  22    LSG   4  13   5 11.0  102 30/2 25.50  9.27 16.50   0   0
## 2   1    LSG   3   6   6 19.0  229 55/2 76.33 12.05 38.00   0   0
## 3   0     RR   4   4   4 15.0  166 29/3 41.50 11.06 22.50   0   0
## 4  14    KKR   8  13   9 18.1  217 21/2 27.12 11.94 13.62   0   0
## 5   0    CSK   8   8   8 21.3  172 13/3 21.50  8.00 16.12   0   0
## 6   0   PBKS  21  17  16 58.2  518 16/3 24.66  8.88 16.66   0   0
 str(final_data)
## 'data.frame':    71 obs. of  26 variables:
##  $ Player.Name: chr  "Aiden Markram" "Akash Deep" "Akash Madhwal" "Andre Russell" ...
##  $ Team.x     : chr  "LSG" "LSG" "RR" "KKR" ...
##  $ Runs       : int  445 6 4 167 14 2 21 263 329 57 ...
##  $ Matches    : int  13 6 4 13 8 17 13 12 14 9 ...
##  $ Inn        : int  13 2 1 10 5 2 4 11 11 5 ...
##  $ No         : int  0 1 1 1 3 1 3 1 1 1 ...
##  $ HS         : chr  "66" "6*" "4*" "57*" ...
##  $ AVG.x      : chr  "34.23" "6.00" "-" "18.56" ...
##  $ BF         : int  299 2 9 102 12 6 12 167 222 41 ...
##  $ SR.x       : num  148.8 300 44.4 163.7 116.7 ...
##  $ X100s      : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ X50s       : int  5 0 0 1 0 0 0 0 2 0 ...
##  $ X4s        : int  38 0 0 16 2 0 3 23 27 6 ...
##  $ X6s        : int  22 1 0 14 0 0 1 15 14 3 ...
##  $ Team.y     : chr  "LSG" "LSG" "RR" "KKR" ...
##  $ WKT        : int  4 3 4 8 8 21 13 5 2 8 ...
##  $ MAT        : int  13 6 4 13 8 17 13 12 14 9 ...
##  $ INN        : int  5 6 4 9 8 16 13 11 2 8 ...
##  $ OVR        : num  11 19 15 18.1 21.3 58.2 47.2 34 1.4 27 ...
##  $ RUNS       : int  102 229 166 217 172 518 487 288 13 279 ...
##  $ BBI        : chr  "30/2" "55/2" "29/3" "21/2" ...
##  $ AVG.y      : num  25.5 76.3 41.5 27.1 21.5 ...
##  $ ECO        : num  9.27 12.05 11.06 11.94 8 ...
##  $ SR.y       : num  16.5 38 22.5 13.6 16.1 ...
##  $ X4W        : int  0 0 0 0 0 0 0 0 0 0 ...
##  $ X5W        : int  0 0 0 0 0 0 0 0 0 0 ...
 names(final_data)
##  [1] "Player.Name" "Team.x"      "Runs"        "Matches"     "Inn"        
##  [6] "No"          "HS"          "AVG.x"       "BF"          "SR.x"       
## [11] "X100s"       "X50s"        "X4s"         "X6s"         "Team.y"     
## [16] "WKT"         "MAT"         "INN"         "OVR"         "RUNS"       
## [21] "BBI"         "AVG.y"       "ECO"         "SR.y"        "X4W"        
## [26] "X5W"
 View(final_data)
 #Check duplicates after merge:
any(duplicated(final_data$Player.Name))
## [1] FALSE
 #Missing values check
colSums(is.na(final_data))
## Player.Name      Team.x        Runs     Matches         Inn          No 
##           0           0           0           0           0           0 
##          HS       AVG.x          BF        SR.x       X100s        X50s 
##           0           0           0           0           0           0 
##         X4s         X6s      Team.y         WKT         MAT         INN 
##           0           0           0           0           0           0 
##         OVR        RUNS         BBI       AVG.y         ECO        SR.y 
##           0           0           0           0           0           0 
##         X4W         X5W 
##           0           0
 #1. Which player has played the highest number of matches?
batters[which.max(batters$Matches), c("Player.Name","Matches")]
##    Player.Name Matches
## 6 Shreyas Iyer      17
#Interpretation:
#Shreyas Iyer has played the most matches, which shows he was regularly part of the team.
#This means he is a consistent and important player.
 #2. Best batsman and bowler performance
final_data$Batting_Performance <- final_data$Runs * final_data$SR.x
#Interpretation:
#Batting performance varies a lot, showing some players scored very high runs with good strike rates
 final_data
##                 Player.Name Team.x Runs Matches Inn No  HS AVG.x  BF   SR.x
## 1             Aiden Markram    LSG  445      13  13  0  66 34.23 299 148.82
## 2                Akash Deep    LSG    6       6   2  1  6*  6.00   2 300.00
## 3             Akash Madhwal     RR    4       4   1  1  4*     -   9  44.44
## 4             Andre Russell    KKR  167      13  10  1 57* 18.56 102 163.72
## 5             Anshul Kamboj    CSK   14       8   5  3  5*  7.00  12 116.66
## 6            Arshdeep Singh   PBKS    2      17   2  1  1*  2.00   6  33.33
## 7                Avesh Khan    LSG   21      13   4  3 19* 21.00  12 175.00
## 8                Axar Patel     DC  263      12  11  1  43 26.30 167 157.48
## 9              Ayush Badoni    LSG  329      14  11  1  74 32.90 222 148.19
## 10       Azmatullah Omarzai   PBKS   57       9   5  1 21* 14.25  41 139.02
## 11        Bhuvneshwar Kumar    RCB   14      14   6  3   8  4.67  25  56.00
## 12             Corbin Bosch     MI   47       2   2  0  27 23.50  32 146.87
## 13            Deepak Chahar     MI   37      14   4  3 28* 37.00  25 148.00
## 14            Digvesh Singh    LSG    1      13   2  1   1  1.00   3  33.33
## 15      Dushmantha Chameera     DC   10       6   3  3  8*     -  14  71.42
## 16           Gerald Coetzee     GT   17       4   2  0  12  8.50  11 154.54
## 17            Glenn Maxwell   PBKS   48       7   6  0  30  8.00  49  97.95
## 18            Hardik Pandya     MI  224      15  12  3 48* 24.89 137 163.50
## 19            Harpreet Brar   PBKS   11       8   2  1  7* 11.00  13  84.61
## 20            Harshal Patel    SRH   21      13   4  2 12* 10.50  26  80.76
## 21             Harshit Rana    KKR   57      13   7  3  34 14.25  53 107.54
## 22             Jofra Archer     RR   63      12   7  1  30 10.50  50 126.00
## 23            Kagiso Rabada     GT    9       4   2  1  7*  9.00   8 112.50
## 24           Kamindu Mendis    SRH   92       5   5  2 32* 30.67  69 133.33
## 25              Karn Sharma     MI    1       6   1  1  1*     -   1 100.00
## 26            Khaleel Ahmed    CSK    1      14   2  2  1*     -   2  50.00
## 27            Krunal Pandya    RCB  109      15   7  1 73* 18.17  86 126.74
## 28            Kuldeep Yadav     DC   18      14   5  2   7  6.00  16 112.50
## 29    Kumar Kartikeya Singh     RR    3       4   2  0   2  1.50   5  60.00
## 30            Kwena Maphaka     RR    8       2   1  1  8*     -   2 400.00
## 31         Liam Livingstone    RCB  112      10   8  1  54 16.00  84 133.33
## 32          Lockie Ferguson   PBKS    4       4   1  1  4*     -   1 400.00
## 33       Maheesh Theekshana     RR   10      11   4  2   5  5.00  27  37.03
## 34             Marco Jansen   PBKS   75      14   8  4 34* 18.75  63 119.04
## 35           Marcus Stoinis   PBKS  160      13  11  5 44* 26.67  86 186.04
## 36         Mitchell Santner     MI   40      13   8  6 18* 20.00  33 121.21
## 37           Mitchell Starc     DC    6      11   6  4  2*  3.00  10  60.00
## 38                Moeen Ali    KKR    5       6   2  0   5  2.50  14  35.71
## 39           Mohammad Shami    SRH   10       9   4  3  6* 10.00  10 100.00
## 40           Mohammed Siraj     GT    3      15   1  1  3*     -   4  75.00
## 41         Mohd Arshad Khan     GT   23       9   5  3  20 11.50  19 121.05
## 42             Mohit Sharma     DC    1       8   2  1  1*  1.00   3  33.33
## 43       Nitish Kumar Reddy    SRH  182      13  11  3  32 22.75 153 118.95
## 44               Noor Ahmad    CSK    7      14   6  2  2*  1.75  17  41.17
## 45              Pat Cummins    SRH   97      14   9  5 22* 24.25  58 167.24
## 46             Prince Yadav    LSG    5       6   2  2  4*     -  10  50.00
## 47              Rashid Khan     GT   40      15   8  3  12  8.00  28 142.85
## 48             Ravi Bishnoi    LSG   13      11   3  1  13  6.50  16  81.25
## 49      Ravichandran Ashwin    CSK   33       9   4  0  13  8.25  30 110.00
## 50          Ravindra Jadeja    CSK  301      14  14  5 77* 33.44 222 135.58
## 51              Riyan Parag     RR  393      14  14  2  95 32.75 236 166.52
## 52         Romario Shepherd    RCB   70       8   3  1 53* 35.00  24 291.66
## 53              Sai Kishore     GT    5      15   3  0   3  1.67  10  50.00
## 54               Sam Curran    CSK  114       5   5  0  88 22.80  84 135.71
## 55           Sandeep Sharma     RR    6      10   1  1  6*     -   5 120.00
## 56            Shahbaz Ahmed    LSG    9       3   1  0   9  9.00   8 112.50
## 57            Shahrukh Khan     GT  179      15  11  5  57 29.83 100 179.00
## 58           Shardul Thakur    LSG   18      10   5  2   6  6.00  12 150.00
## 59          Simarjeet Singh    SRH    3       4   3  1  3*  1.50   7  42.85
## 60          Spencer Johnson    KKR    2       4   2  2  1*     -   4  50.00
## 61             Sunil Narine    KKR  246      12  12  1  44 22.36 144 170.83
## 62              Trent Boult     MI    2      16   2  1  1*  2.00   3  66.66
## 63         Tushar Deshpande     RR    7      10   4  3   3  7.00   8  87.50
## 64 V Satyanarayana Penmetsa     MI    1       2   1  1  1*     -   1 100.00
## 65      Varun Chakaravarthy    KKR    1      13   1  1  1*     -   1 100.00
## 66             Vipraj Nigam     DC  142      14   8  1  39 20.29  79 179.74
## 67        Wanindu Hasaranga     RR    9      11   5  0   4  1.80  15  60.00
## 68        Washington Sundar     GT  133       6   5  0  49 26.60  80 166.25
## 69               Will Jacks     MI  233      13  11  1  53 23.30 172 135.46
## 70          Xavier Bartlett   PBKS   11       4   1  0  11 11.00  15  73.33
## 71               Yash Dayal    RCB    4      15   3  1   3  2.00   8  50.00
##    X100s X50s X4s X6s Team.y WKT MAT INN  OVR RUNS   BBI  AVG.y   ECO  SR.y X4W
## 1      0    5  38  22    LSG   4  13   5 11.0  102  30/2  25.50  9.27 16.50   0
## 2      0    0   0   1    LSG   3   6   6 19.0  229  55/2  76.33 12.05 38.00   0
## 3      0    0   0   0     RR   4   4   4 15.0  166  29/3  41.50 11.06 22.50   0
## 4      0    1  16  14    KKR   8  13   9 18.1  217  21/2  27.12 11.94 13.62   0
## 5      0    0   2   0    CSK   8   8   8 21.3  172  13/3  21.50  8.00 16.12   0
## 6      0    0   0   0   PBKS  21  17  16 58.2  518  16/3  24.66  8.88 16.66   0
## 7      0    0   3   1    LSG  13  13  13 47.2  487  37/3  37.46 10.28 21.84   0
## 8      0    0  23  15     DC   5  12  11 34.0  288  19/2  57.60  8.47 40.80   0
## 9      0    2  27  14    LSG   2  14   2  1.4   13 2-Apr   6.50  7.80  5.00   0
## 10     0    0   6   3   PBKS   8   9   8 27.0  279  33/2  34.87 10.33 20.25   0
## 11     0    0   1   0    RCB  17  14  14 52.0  483  33/3  28.41  9.28 18.35   0
## 12     0    0   3   3     MI   1   2   2  7.0   55  26/1  55.00  7.85 42.00   0
## 13     0    0   3   2     MI  11  14  14 41.0  376 2-Dec  34.18  9.17 22.36   0
## 14     0    0   0   0    LSG  14  13  13 52.0  429  30/2  30.64  8.25 22.28   0
## 15     0    0   0   0     DC   4   6   5 15.0  171  24/1  42.75 11.40 22.50   0
## 16     0    0   2   1     GT   2   4   4 12.0  131 1-Oct  65.50 10.91 36.00   0
## 17     0    0   5   1   PBKS   4   7   6 13.0  110 1-May  27.50  8.46 19.50   0
## 18     0    0  18  12     MI  14  15  14 35.0  342  36/5  24.42  9.77 15.00   0
## 19     0    0   0   1   PBKS  10   8   7 22.0  190  22/3  19.00  8.63 13.20   0
## 20     0    0   0   0    SRH  16  13  13 43.5  430  28/4  26.87  9.80 16.43   2
## 21     0    0   5   3    KKR  15  13  13 44.0  448  25/3  29.86 10.18 17.60   0
## 22     0    0   3   4     RR  11  12  12 45.3  431  25/3  39.18  9.47 24.81   0
## 23     0    0   0   1     GT   2   4   4 14.0  162  41/1  81.00 11.57 42.00   0
## 24     0    0   7   2    SRH   2   5   4  7.0   60 1-Apr  30.00  8.57 21.00   0
## 25     0    0   0   0     MI   7   6   5 15.0  128  23/3  18.28  8.53 12.85   0
## 26     0    0   0   0    CSK  15  14  14 46.4  447  29/3  29.80  9.57 18.66   0
## 27     0    1   9   4    RCB  17  15  15 46.0  379  45/4  22.29  8.23 16.23   1
## 28     0    0   2   0     DC  15  14  13 51.0  361  22/3  24.06  7.07 20.40   0
## 29     0    0   0   0     RR   2   4   4  8.0   78  21/1  39.00  9.75 24.00   0
## 30     0    0   2   0     RR   1   2   2  5.0   54  32/1  54.00 10.80 30.00   0
## 31     0    1   4   9    RCB   2  10   5  9.0   76  28/2  38.00  8.44 27.00   0
## 32     0    0   1   0   PBKS   5   4   4 11.2  104  37/2  20.80  9.17 13.60   0
## 33     0    0   0   0     RR  11  11  11 42.0  410  26/2  37.27  9.76 22.90   0
## 34     0    0   3   4   PBKS  16  14  14 47.1  434  17/3  27.12  9.20 17.68   0
## 35     0    0   8  15   PBKS   1  13   9 14.1  175  14/1 175.00 12.35 85.00   0
## 36     0    0   2   3     MI  10  13  13 39.3  313 3-Nov  31.30  7.92 23.70   0
## 37     0    0   0   0     DC  14  11  10 36.0  366  35/5  26.14 10.16 15.42   0
## 38     0    0   0   0    KKR   6   6   5 16.0  136  23/2  22.66  8.50 16.00   0
## 39     0    0   1   0    SRH   6   9   9 30.0  337  28/2  56.16 11.23 30.00   0
## 40     0    0   0   0     GT  16  15  15 57.0  527  17/4  32.93  9.24 21.37   1
## 41     0    0   0   3     GT   6   9   9 21.0  217 1-Jul  36.16 10.33 21.00   0
## 42     0    0   0   0     DC   2   8   8 25.0  257 1-Oct 128.50 10.28 75.00   0
## 43     0    0  16   4    SRH   2  13   3  5.0   47  13/1  23.50  9.40 15.00   0
## 44     0    0   0   0    CSK  24  14  14 50.0  408  18/4  17.00  8.16 12.50   2
## 45     0    0   6   7    SRH  16  14  14 49.4  450  19/3  28.12  9.06 18.62   0
## 46     0    0   0   0    LSG   3   6   6 22.5  225  29/1  75.00  9.85 45.66   0
## 47     0    0   2   3     GT   9  15  15 55.0  514  25/2  57.11  9.34 36.66   0
## 48     0    0   0   2    LSG   9  11  11 37.0  401  18/2  44.55 10.83 24.66   0
## 49     0    0   3   1    CSK   7   9   9 31.0  283  41/2  40.42  9.12 26.57   0
## 50     0    2  25  10    CSK  10  14  14 37.5  324  17/2  32.40  8.56 22.70   0
## 51     0    1  27  27     RR   3  14   9 20.0  170 1-Dec  56.66  8.50 40.00   0
## 52     0    1   5   7    RCB   6   8   7 14.0  151  14/2  25.16 10.78 14.00   0
## 53     0    0   0   0     GT  19  15  15 42.3  393  30/3  20.68  9.24 13.42   0
## 54     0    1  11   4    CSK   1   5   5 12.0  133  34/1 133.00 11.08 72.00   0
## 55     0    0   0   0     RR   9  10  10 36.3  361  21/2  40.11  9.89 24.33   0
## 56     0    0   1   0    LSG   1   3   3  8.3  102  41/1 102.00 12.00 51.00   0
## 57     0    1  11  13     GT   1  15   1  1.0   13  13/1  13.00 13.00  6.00   0
## 58     0    0   3   0    LSG  13  10  10 34.0  375  34/4  28.84 11.02 15.69   1
## 59     0    0   0   0    SRH   2   4   4 10.0  141  46/2  70.50 14.10 30.00   0
## 60     0    0   0   0    KKR   1   4   4 11.2  133  42/1 133.00 11.73 68.00   0
## 61     0    0  25  19    KKR  12  12  12 45.0  351  13/3  29.25  7.80 22.50   0
## 62     0    0   0   0     MI  22  16  16 57.4  517  26/4  23.50  8.96 15.72   1
## 63     0    0   0   0     RR   9  10  10 32.0  340  44/3  37.77 10.62 21.33   0
## 64     0    0   0   0     MI   1   2   2  4.0   53  40/1  53.00 13.25 24.00   0
## 65     0    0   0   0    KKR  17  13  13 50.0  383  22/3  22.52  7.66 17.64   0
## 66     0    0  15   8     DC  11  14  13 39.0  356  18/2  32.36  9.12 21.27   0
## 67     0    0   0   0     RR  11  11  11 41.0  371  35/4  33.72  9.04 22.36   1
## 68     0    0  10   7     GT   2   6   5 10.5  111  28/1  55.50 10.24 32.50   0
## 69     0    1  22  11     MI   6  13   8 14.0  120  14/2  20.00  8.57 14.00   0
## 70     0    0   1   0   PBKS   2   4   4 10.0   96  26/1  48.00  9.60 30.00   0
## 71     0    0   0   0    RCB  13  15  15 49.0  470  18/2  36.15  9.59 22.61   0
##    X5W Batting_Performance
## 1    0            66224.90
## 2    0             1800.00
## 3    0              177.76
## 4    0            27341.24
## 5    0             1633.24
## 6    0               66.66
## 7    0             3675.00
## 8    0            41417.24
## 9    0            48754.51
## 10   0             7924.14
## 11   0              784.00
## 12   0             6902.89
## 13   0             5476.00
## 14   0               33.33
## 15   0              714.20
## 16   0             2627.18
## 17   0             4701.60
## 18   1            36624.00
## 19   0              930.71
## 20   0             1695.96
## 21   0             6129.78
## 22   0             7938.00
## 23   0             1012.50
## 24   0            12266.36
## 25   0              100.00
## 26   0               50.00
## 27   0            13814.66
## 28   0             2025.00
## 29   0              180.00
## 30   0             3200.00
## 31   0            14932.96
## 32   0             1600.00
## 33   0              370.30
## 34   0             8928.00
## 35   0            29766.40
## 36   0             4848.40
## 37   1              360.00
## 38   0              178.55
## 39   0             1000.00
## 40   0              225.00
## 41   0             2784.15
## 42   0               33.33
## 43   0            21648.90
## 44   0              288.19
## 45   0            16222.28
## 46   0              250.00
## 47   0             5714.00
## 48   0             1056.25
## 49   0             3630.00
## 50   0            40809.58
## 51   0            65442.36
## 52   0            20416.20
## 53   0              250.00
## 54   0            15470.94
## 55   0              720.00
## 56   0             1012.50
## 57   0            32041.00
## 58   0             2700.00
## 59   0              128.55
## 60   0              100.00
## 61   0            42024.18
## 62   0              133.32
## 63   0              612.50
## 64   0              100.00
## 65   0              100.00
## 66   0            25523.08
## 67   0              540.00
## 68   0            22111.25
## 69   0            31562.18
## 70   0              806.63
## 71   0              200.00
 final_data$Bowling_Performance <- final_data$WKT / final_data$ECO
#Interpretation:
#Bowling performance shows that only a few players have strong impact, while most have moderate or low effectiveness.
 final_data
##                 Player.Name Team.x Runs Matches Inn No  HS AVG.x  BF   SR.x
## 1             Aiden Markram    LSG  445      13  13  0  66 34.23 299 148.82
## 2                Akash Deep    LSG    6       6   2  1  6*  6.00   2 300.00
## 3             Akash Madhwal     RR    4       4   1  1  4*     -   9  44.44
## 4             Andre Russell    KKR  167      13  10  1 57* 18.56 102 163.72
## 5             Anshul Kamboj    CSK   14       8   5  3  5*  7.00  12 116.66
## 6            Arshdeep Singh   PBKS    2      17   2  1  1*  2.00   6  33.33
## 7                Avesh Khan    LSG   21      13   4  3 19* 21.00  12 175.00
## 8                Axar Patel     DC  263      12  11  1  43 26.30 167 157.48
## 9              Ayush Badoni    LSG  329      14  11  1  74 32.90 222 148.19
## 10       Azmatullah Omarzai   PBKS   57       9   5  1 21* 14.25  41 139.02
## 11        Bhuvneshwar Kumar    RCB   14      14   6  3   8  4.67  25  56.00
## 12             Corbin Bosch     MI   47       2   2  0  27 23.50  32 146.87
## 13            Deepak Chahar     MI   37      14   4  3 28* 37.00  25 148.00
## 14            Digvesh Singh    LSG    1      13   2  1   1  1.00   3  33.33
## 15      Dushmantha Chameera     DC   10       6   3  3  8*     -  14  71.42
## 16           Gerald Coetzee     GT   17       4   2  0  12  8.50  11 154.54
## 17            Glenn Maxwell   PBKS   48       7   6  0  30  8.00  49  97.95
## 18            Hardik Pandya     MI  224      15  12  3 48* 24.89 137 163.50
## 19            Harpreet Brar   PBKS   11       8   2  1  7* 11.00  13  84.61
## 20            Harshal Patel    SRH   21      13   4  2 12* 10.50  26  80.76
## 21             Harshit Rana    KKR   57      13   7  3  34 14.25  53 107.54
## 22             Jofra Archer     RR   63      12   7  1  30 10.50  50 126.00
## 23            Kagiso Rabada     GT    9       4   2  1  7*  9.00   8 112.50
## 24           Kamindu Mendis    SRH   92       5   5  2 32* 30.67  69 133.33
## 25              Karn Sharma     MI    1       6   1  1  1*     -   1 100.00
## 26            Khaleel Ahmed    CSK    1      14   2  2  1*     -   2  50.00
## 27            Krunal Pandya    RCB  109      15   7  1 73* 18.17  86 126.74
## 28            Kuldeep Yadav     DC   18      14   5  2   7  6.00  16 112.50
## 29    Kumar Kartikeya Singh     RR    3       4   2  0   2  1.50   5  60.00
## 30            Kwena Maphaka     RR    8       2   1  1  8*     -   2 400.00
## 31         Liam Livingstone    RCB  112      10   8  1  54 16.00  84 133.33
## 32          Lockie Ferguson   PBKS    4       4   1  1  4*     -   1 400.00
## 33       Maheesh Theekshana     RR   10      11   4  2   5  5.00  27  37.03
## 34             Marco Jansen   PBKS   75      14   8  4 34* 18.75  63 119.04
## 35           Marcus Stoinis   PBKS  160      13  11  5 44* 26.67  86 186.04
## 36         Mitchell Santner     MI   40      13   8  6 18* 20.00  33 121.21
## 37           Mitchell Starc     DC    6      11   6  4  2*  3.00  10  60.00
## 38                Moeen Ali    KKR    5       6   2  0   5  2.50  14  35.71
## 39           Mohammad Shami    SRH   10       9   4  3  6* 10.00  10 100.00
## 40           Mohammed Siraj     GT    3      15   1  1  3*     -   4  75.00
## 41         Mohd Arshad Khan     GT   23       9   5  3  20 11.50  19 121.05
## 42             Mohit Sharma     DC    1       8   2  1  1*  1.00   3  33.33
## 43       Nitish Kumar Reddy    SRH  182      13  11  3  32 22.75 153 118.95
## 44               Noor Ahmad    CSK    7      14   6  2  2*  1.75  17  41.17
## 45              Pat Cummins    SRH   97      14   9  5 22* 24.25  58 167.24
## 46             Prince Yadav    LSG    5       6   2  2  4*     -  10  50.00
## 47              Rashid Khan     GT   40      15   8  3  12  8.00  28 142.85
## 48             Ravi Bishnoi    LSG   13      11   3  1  13  6.50  16  81.25
## 49      Ravichandran Ashwin    CSK   33       9   4  0  13  8.25  30 110.00
## 50          Ravindra Jadeja    CSK  301      14  14  5 77* 33.44 222 135.58
## 51              Riyan Parag     RR  393      14  14  2  95 32.75 236 166.52
## 52         Romario Shepherd    RCB   70       8   3  1 53* 35.00  24 291.66
## 53              Sai Kishore     GT    5      15   3  0   3  1.67  10  50.00
## 54               Sam Curran    CSK  114       5   5  0  88 22.80  84 135.71
## 55           Sandeep Sharma     RR    6      10   1  1  6*     -   5 120.00
## 56            Shahbaz Ahmed    LSG    9       3   1  0   9  9.00   8 112.50
## 57            Shahrukh Khan     GT  179      15  11  5  57 29.83 100 179.00
## 58           Shardul Thakur    LSG   18      10   5  2   6  6.00  12 150.00
## 59          Simarjeet Singh    SRH    3       4   3  1  3*  1.50   7  42.85
## 60          Spencer Johnson    KKR    2       4   2  2  1*     -   4  50.00
## 61             Sunil Narine    KKR  246      12  12  1  44 22.36 144 170.83
## 62              Trent Boult     MI    2      16   2  1  1*  2.00   3  66.66
## 63         Tushar Deshpande     RR    7      10   4  3   3  7.00   8  87.50
## 64 V Satyanarayana Penmetsa     MI    1       2   1  1  1*     -   1 100.00
## 65      Varun Chakaravarthy    KKR    1      13   1  1  1*     -   1 100.00
## 66             Vipraj Nigam     DC  142      14   8  1  39 20.29  79 179.74
## 67        Wanindu Hasaranga     RR    9      11   5  0   4  1.80  15  60.00
## 68        Washington Sundar     GT  133       6   5  0  49 26.60  80 166.25
## 69               Will Jacks     MI  233      13  11  1  53 23.30 172 135.46
## 70          Xavier Bartlett   PBKS   11       4   1  0  11 11.00  15  73.33
## 71               Yash Dayal    RCB    4      15   3  1   3  2.00   8  50.00
##    X100s X50s X4s X6s Team.y WKT MAT INN  OVR RUNS   BBI  AVG.y   ECO  SR.y X4W
## 1      0    5  38  22    LSG   4  13   5 11.0  102  30/2  25.50  9.27 16.50   0
## 2      0    0   0   1    LSG   3   6   6 19.0  229  55/2  76.33 12.05 38.00   0
## 3      0    0   0   0     RR   4   4   4 15.0  166  29/3  41.50 11.06 22.50   0
## 4      0    1  16  14    KKR   8  13   9 18.1  217  21/2  27.12 11.94 13.62   0
## 5      0    0   2   0    CSK   8   8   8 21.3  172  13/3  21.50  8.00 16.12   0
## 6      0    0   0   0   PBKS  21  17  16 58.2  518  16/3  24.66  8.88 16.66   0
## 7      0    0   3   1    LSG  13  13  13 47.2  487  37/3  37.46 10.28 21.84   0
## 8      0    0  23  15     DC   5  12  11 34.0  288  19/2  57.60  8.47 40.80   0
## 9      0    2  27  14    LSG   2  14   2  1.4   13 2-Apr   6.50  7.80  5.00   0
## 10     0    0   6   3   PBKS   8   9   8 27.0  279  33/2  34.87 10.33 20.25   0
## 11     0    0   1   0    RCB  17  14  14 52.0  483  33/3  28.41  9.28 18.35   0
## 12     0    0   3   3     MI   1   2   2  7.0   55  26/1  55.00  7.85 42.00   0
## 13     0    0   3   2     MI  11  14  14 41.0  376 2-Dec  34.18  9.17 22.36   0
## 14     0    0   0   0    LSG  14  13  13 52.0  429  30/2  30.64  8.25 22.28   0
## 15     0    0   0   0     DC   4   6   5 15.0  171  24/1  42.75 11.40 22.50   0
## 16     0    0   2   1     GT   2   4   4 12.0  131 1-Oct  65.50 10.91 36.00   0
## 17     0    0   5   1   PBKS   4   7   6 13.0  110 1-May  27.50  8.46 19.50   0
## 18     0    0  18  12     MI  14  15  14 35.0  342  36/5  24.42  9.77 15.00   0
## 19     0    0   0   1   PBKS  10   8   7 22.0  190  22/3  19.00  8.63 13.20   0
## 20     0    0   0   0    SRH  16  13  13 43.5  430  28/4  26.87  9.80 16.43   2
## 21     0    0   5   3    KKR  15  13  13 44.0  448  25/3  29.86 10.18 17.60   0
## 22     0    0   3   4     RR  11  12  12 45.3  431  25/3  39.18  9.47 24.81   0
## 23     0    0   0   1     GT   2   4   4 14.0  162  41/1  81.00 11.57 42.00   0
## 24     0    0   7   2    SRH   2   5   4  7.0   60 1-Apr  30.00  8.57 21.00   0
## 25     0    0   0   0     MI   7   6   5 15.0  128  23/3  18.28  8.53 12.85   0
## 26     0    0   0   0    CSK  15  14  14 46.4  447  29/3  29.80  9.57 18.66   0
## 27     0    1   9   4    RCB  17  15  15 46.0  379  45/4  22.29  8.23 16.23   1
## 28     0    0   2   0     DC  15  14  13 51.0  361  22/3  24.06  7.07 20.40   0
## 29     0    0   0   0     RR   2   4   4  8.0   78  21/1  39.00  9.75 24.00   0
## 30     0    0   2   0     RR   1   2   2  5.0   54  32/1  54.00 10.80 30.00   0
## 31     0    1   4   9    RCB   2  10   5  9.0   76  28/2  38.00  8.44 27.00   0
## 32     0    0   1   0   PBKS   5   4   4 11.2  104  37/2  20.80  9.17 13.60   0
## 33     0    0   0   0     RR  11  11  11 42.0  410  26/2  37.27  9.76 22.90   0
## 34     0    0   3   4   PBKS  16  14  14 47.1  434  17/3  27.12  9.20 17.68   0
## 35     0    0   8  15   PBKS   1  13   9 14.1  175  14/1 175.00 12.35 85.00   0
## 36     0    0   2   3     MI  10  13  13 39.3  313 3-Nov  31.30  7.92 23.70   0
## 37     0    0   0   0     DC  14  11  10 36.0  366  35/5  26.14 10.16 15.42   0
## 38     0    0   0   0    KKR   6   6   5 16.0  136  23/2  22.66  8.50 16.00   0
## 39     0    0   1   0    SRH   6   9   9 30.0  337  28/2  56.16 11.23 30.00   0
## 40     0    0   0   0     GT  16  15  15 57.0  527  17/4  32.93  9.24 21.37   1
## 41     0    0   0   3     GT   6   9   9 21.0  217 1-Jul  36.16 10.33 21.00   0
## 42     0    0   0   0     DC   2   8   8 25.0  257 1-Oct 128.50 10.28 75.00   0
## 43     0    0  16   4    SRH   2  13   3  5.0   47  13/1  23.50  9.40 15.00   0
## 44     0    0   0   0    CSK  24  14  14 50.0  408  18/4  17.00  8.16 12.50   2
## 45     0    0   6   7    SRH  16  14  14 49.4  450  19/3  28.12  9.06 18.62   0
## 46     0    0   0   0    LSG   3   6   6 22.5  225  29/1  75.00  9.85 45.66   0
## 47     0    0   2   3     GT   9  15  15 55.0  514  25/2  57.11  9.34 36.66   0
## 48     0    0   0   2    LSG   9  11  11 37.0  401  18/2  44.55 10.83 24.66   0
## 49     0    0   3   1    CSK   7   9   9 31.0  283  41/2  40.42  9.12 26.57   0
## 50     0    2  25  10    CSK  10  14  14 37.5  324  17/2  32.40  8.56 22.70   0
## 51     0    1  27  27     RR   3  14   9 20.0  170 1-Dec  56.66  8.50 40.00   0
## 52     0    1   5   7    RCB   6   8   7 14.0  151  14/2  25.16 10.78 14.00   0
## 53     0    0   0   0     GT  19  15  15 42.3  393  30/3  20.68  9.24 13.42   0
## 54     0    1  11   4    CSK   1   5   5 12.0  133  34/1 133.00 11.08 72.00   0
## 55     0    0   0   0     RR   9  10  10 36.3  361  21/2  40.11  9.89 24.33   0
## 56     0    0   1   0    LSG   1   3   3  8.3  102  41/1 102.00 12.00 51.00   0
## 57     0    1  11  13     GT   1  15   1  1.0   13  13/1  13.00 13.00  6.00   0
## 58     0    0   3   0    LSG  13  10  10 34.0  375  34/4  28.84 11.02 15.69   1
## 59     0    0   0   0    SRH   2   4   4 10.0  141  46/2  70.50 14.10 30.00   0
## 60     0    0   0   0    KKR   1   4   4 11.2  133  42/1 133.00 11.73 68.00   0
## 61     0    0  25  19    KKR  12  12  12 45.0  351  13/3  29.25  7.80 22.50   0
## 62     0    0   0   0     MI  22  16  16 57.4  517  26/4  23.50  8.96 15.72   1
## 63     0    0   0   0     RR   9  10  10 32.0  340  44/3  37.77 10.62 21.33   0
## 64     0    0   0   0     MI   1   2   2  4.0   53  40/1  53.00 13.25 24.00   0
## 65     0    0   0   0    KKR  17  13  13 50.0  383  22/3  22.52  7.66 17.64   0
## 66     0    0  15   8     DC  11  14  13 39.0  356  18/2  32.36  9.12 21.27   0
## 67     0    0   0   0     RR  11  11  11 41.0  371  35/4  33.72  9.04 22.36   1
## 68     0    0  10   7     GT   2   6   5 10.5  111  28/1  55.50 10.24 32.50   0
## 69     0    1  22  11     MI   6  13   8 14.0  120  14/2  20.00  8.57 14.00   0
## 70     0    0   1   0   PBKS   2   4   4 10.0   96  26/1  48.00  9.60 30.00   0
## 71     0    0   0   0    RCB  13  15  15 49.0  470  18/2  36.15  9.59 22.61   0
##    X5W Batting_Performance Bowling_Performance
## 1    0            66224.90          0.43149946
## 2    0             1800.00          0.24896266
## 3    0              177.76          0.36166365
## 4    0            27341.24          0.67001675
## 5    0             1633.24          1.00000000
## 6    0               66.66          2.36486486
## 7    0             3675.00          1.26459144
## 8    0            41417.24          0.59031877
## 9    0            48754.51          0.25641026
## 10   0             7924.14          0.77444337
## 11   0              784.00          1.83189655
## 12   0             6902.89          0.12738854
## 13   0             5476.00          1.19956379
## 14   0               33.33          1.69696970
## 15   0              714.20          0.35087719
## 16   0             2627.18          0.18331806
## 17   0             4701.60          0.47281324
## 18   1            36624.00          1.43295803
## 19   0              930.71          1.15874855
## 20   0             1695.96          1.63265306
## 21   0             6129.78          1.47347741
## 22   0             7938.00          1.16156283
## 23   0             1012.50          0.17286085
## 24   0            12266.36          0.23337223
## 25   0              100.00          0.82063306
## 26   0               50.00          1.56739812
## 27   0            13814.66          2.06561361
## 28   0             2025.00          2.12164074
## 29   0              180.00          0.20512821
## 30   0             3200.00          0.09259259
## 31   0            14932.96          0.23696682
## 32   0             1600.00          0.54525627
## 33   0              370.30          1.12704918
## 34   0             8928.00          1.73913043
## 35   0            29766.40          0.08097166
## 36   0             4848.40          1.26262626
## 37   1              360.00          1.37795276
## 38   0              178.55          0.70588235
## 39   0             1000.00          0.53428317
## 40   0              225.00          1.73160173
## 41   0             2784.15          0.58083253
## 42   0               33.33          0.19455253
## 43   0            21648.90          0.21276596
## 44   0              288.19          2.94117647
## 45   0            16222.28          1.76600442
## 46   0              250.00          0.30456853
## 47   0             5714.00          0.96359743
## 48   0             1056.25          0.83102493
## 49   0             3630.00          0.76754386
## 50   0            40809.58          1.16822430
## 51   0            65442.36          0.35294118
## 52   0            20416.20          0.55658627
## 53   0              250.00          2.05627706
## 54   0            15470.94          0.09025271
## 55   0              720.00          0.91001011
## 56   0             1012.50          0.08333333
## 57   0            32041.00          0.07692308
## 58   0             2700.00          1.17967332
## 59   0              128.55          0.14184397
## 60   0              100.00          0.08525149
## 61   0            42024.18          1.53846154
## 62   0              133.32          2.45535714
## 63   0              612.50          0.84745763
## 64   0              100.00          0.07547170
## 65   0              100.00          2.21932115
## 66   0            25523.08          1.20614035
## 67   0              540.00          1.21681416
## 68   0            22111.25          0.19531250
## 69   0            31562.18          0.70011669
## 70   0              806.63          0.20833333
## 71   0              200.00          1.35557873
 #3. Which bowler has best economy rate?
bowlers[which.min(bowlers$ECO), c("Player.Name","ECO")]
##       Player.Name ECO
## 89 Nuwan Thushara 6.5
#Interpretation:
#Nuwan Thushara has the lowest economy rate, which means he gives fewer runs while bowling.
#This shows he is a very effective and economical bowler.
 #4. Best overall player (bat + bowl)
final_data$Overall <- final_data$Batting_Performance + final_data$Bowling_Performance
final_data[which.max(final_data$Overall), ]
##     Player.Name Team.x Runs Matches Inn No HS AVG.x  BF   SR.x X100s X50s X4s
## 1 Aiden Markram    LSG  445      13  13  0 66 34.23 299 148.82     0    5  38
##   X6s Team.y WKT MAT INN OVR RUNS  BBI AVG.y  ECO SR.y X4W X5W
## 1  22    LSG   4  13   5  11  102 30/2  25.5 9.27 16.5   0   0
##   Batting_Performance Bowling_Performance  Overall
## 1             66224.9           0.4314995 66225.33
#Interpretation:
#Aiden Markram has the highest overall performance, showing strong contribution in both batting and bowling.
#This indicates he is the best all-round player in the dataset.
 #5. Top 5 all-rounders
head(final_data[order(-final_data$Overall), c("Player.Name","Overall")],5)
##      Player.Name  Overall
## 1  Aiden Markram 66225.33
## 51   Riyan Parag 65442.71
## 9   Ayush Badoni 48754.77
## 61  Sunil Narine 42025.72
## 8     Axar Patel 41417.83
#Interpretation:
#Aiden Markram, Riyan Parag, and others are the top all-rounders with the highest overall performance scores.
#This shows they contribute strongly in both batting and bowling compared to other players.
 #6. Player with highest batting performance
final_data[which.max(final_data$Batting_Performance), ]
##     Player.Name Team.x Runs Matches Inn No HS AVG.x  BF   SR.x X100s X50s X4s
## 1 Aiden Markram    LSG  445      13  13  0 66 34.23 299 148.82     0    5  38
##   X6s Team.y WKT MAT INN OVR RUNS  BBI AVG.y  ECO SR.y X4W X5W
## 1  22    LSG   4  13   5  11  102 30/2  25.5 9.27 16.5   0   0
##   Batting_Performance Bowling_Performance  Overall
## 1             66224.9           0.4314995 66225.33
#Interpretation:
#Aiden Markram has the highest batting performance, showing he scored runs with a very good strike rate.
#This means he is one of the most impactful batsmen in the dataset.
 #7. Player with best bowling performance
final_data[which.max(final_data$Bowling_Performance), ]
##    Player.Name Team.x Runs Matches Inn No HS AVG.x BF  SR.x X100s X50s X4s X6s
## 44  Noor Ahmad    CSK    7      14   6  2 2*  1.75 17 41.17     0    0   0   0
##    Team.y WKT MAT INN OVR RUNS  BBI AVG.y  ECO SR.y X4W X5W Batting_Performance
## 44    CSK  24  14  14  50  408 18/4    17 8.16 12.5   2   0              288.19
##    Bowling_Performance  Overall
## 44            2.941176 291.1312
#Interpretation:
#Noor Ahmad has the best bowling performance, taking more wickets with a good economy rate.
#This shows he is a very effective and impactful bowler.
#8. Correlation between Runs and Wickets
cor(final_data$Runs, final_data$WKT)
## [1] -0.2022638
#Interpretation:
#The correlation between runs and wickets is negative, which means players who score more runs usually take fewer wickets.
#This shows batting and bowling performance are not strongly related. 
 #9. Players with high SR (>150
final_data[final_data$SR.x > 150, c("Player.Name","SR.x")]
##          Player.Name   SR.x
## 2         Akash Deep 300.00
## 4      Andre Russell 163.72
## 7         Avesh Khan 175.00
## 8         Axar Patel 157.48
## 16    Gerald Coetzee 154.54
## 18     Hardik Pandya 163.50
## 30     Kwena Maphaka 400.00
## 32   Lockie Ferguson 400.00
## 35    Marcus Stoinis 186.04
## 45       Pat Cummins 167.24
## 51       Riyan Parag 166.52
## 52  Romario Shepherd 291.66
## 57     Shahrukh Khan 179.00
## 61      Sunil Narine 170.83
## 66      Vipraj Nigam 179.74
## 68 Washington Sundar 166.25
#Interpretation:
#These players have a high strike rate, which means they score runs very quickly.
#This shows they are aggressive batsmen who can increase the run rate.
 #10. Team-wise Total Runs
team_avg <- aggregate(Runs ~ Team, data = batters, mean)

barplot(team_avg$Runs,
        names.arg = team_avg$Team,
        main = "Average Runs by Team",
        xlab = "Teams",
        ylab = "Average Runs")

#Interpretation:
#Some teams like PBKS and GT have higher average runs, showing stronger batting performance.
#Teams with lower bars have weaker average scoring compared to others.
 #11. Players with Most Sixes
top_six <- head(batters[order(-batters$X6s), ],5)

barplot(top_six$X6s,
        names.arg = top_six$Player.Name,
        main = "Top Six Hitters",
        xlab = "Players",
        ylab = "Sixes")

#Interpretation:
#These players have hit the highest number of sixes, showing strong power-hitting ability.
#This means they are aggressive batsmen who can score quick runs.
 #12. Players with Most Fours
top_four <- head(batters[order(-batters$X4s), ],5)

barplot(top_four$X4s,
        names.arg = top_four$Player.Name,
        main = "Top Four Hitters",
        xlab = "Players",
        ylab = "Fours")

#Interpretation:
#These players have hit the highest number of fours, showing strong timing and consistent boundary scoring.
#This means they rely more on placement and regular scoring rather than just power hitting.
 #13. Top 5 Batsmen Runs
top_bat <- head(batters[order(-batters$Runs), ],5)

barplot(top_bat$Runs,
        names.arg = top_bat$Player.Name,
        col = c("navyblue","blue","red","navyblue","darkblue"),
        main = "Top 5 Batsmen by Runs",
        xlab = "Players",
        ylab = "Runs")

#Interpretation:
#These players have scored the highest runs, showing strong and consistent batting performance.
#This means they are the top performers and key batsmen in the dataset.
#14. Top 5 Bowlers
top_bowl <- head(bowlers[order(-bowlers$WKT), ],5)

barplot(top_bowl$WKT,
        names.arg = top_bowl$Player.Name,
        col = "purple",
        main = "Top 5 Bowlers",
        xlab = "Players",
        ylab = "Wickets")

#Interpretation:
#These bowlers have taken the highest number of wickets, showing strong bowling performance.
#This means they are the most effective wicket-takers in the dataset. 
 #15. Runs vs Balls Faced

plot(batters$BF, batters$Runs,
     col = "blue",
     main = "Runs vs Balls Faced",
     xlab = "Balls Faced",
     ylab = "Runs")

#Interpretation:
#The graph shows a clear positive relationship, meaning as balls faced increase, runs also increase.
#This indicates that players who play more balls tend to score more runs.
#16. Team-wise Run Contribution (Pie Chart)
team_runs <- aggregate(Runs ~ Team, data = batters, sum)

pie(team_runs$Runs,
    labels = team_runs$Team,
    main = "Team-wise Total Run Contribution")

#Interpretation:
#This pie chart shows how much each team contributes to total runs.
#Teams with larger slices have stronger overall batting performance.
#17. Wickets Distribution by Team (Pie Chart)
team_wickets <- aggregate(WKT ~ Team, data = bowlers, sum)

pie(team_wickets$WKT,
    labels = team_wickets$Team,
    main = "Team-wise Wickets Distribution")

#Interpretation:
#This pie chart shows how many wickets each team has taken.
#Teams with larger slices have stronger and more effective bowling performance.
#18.Pair Plot of Batting Variables
pairs(batters[, c("Runs","BF","SR","X4s","X6s")],
      main = "Pair Plot of Batting Stats")

#Interpretation:
#The pair plot shows strong positive relationships, especially between Runs and Balls Faced.
#It also shows that more fours and sixes generally lead to higher runs.
#19. Pair Plot of Bowling Variables
pairs(bowlers[, c("WKT","ECO","OVR")],
      main = "Pair Plot of Bowling Stats")

#Interpretation:
#The plot shows that wickets increase as overs bowled increase (positive relationship).
#It also shows that lower economy rate generally helps in taking more wickets.
#20.Boxplot of Strike Rate
boxplot(batters$SR,
        main = "Strike Rate Distribution",
        col = "orange")

#Interpretation:
#Most players have a strike rate around the middle range (100–150).
#Some outliers show very high strike rates, indicating highly aggressive batsmen.
#21. Simple Linear Regression (Runs vs Balls Faced)
model1 <- lm(Runs ~ BF, data = batters)
summary(model1)
## 
## Call:
## lm(formula = Runs ~ BF, data = batters)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -65.989 -13.457   0.901   9.967 105.788 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept) -6.94987    2.73182  -2.544   0.0119 *  
## BF           1.59237    0.01776  89.685   <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 24.8 on 154 degrees of freedom
## Multiple R-squared:  0.9812, Adjusted R-squared:  0.9811 
## F-statistic:  8043 on 1 and 154 DF,  p-value: < 2.2e-16
#Plotting for Ques 21 
plot(batters$BF, batters$Runs,
     main = "Simple Linear Regression: Runs vs Balls Faced",
     xlab = "Balls Faced (BF)",
     ylab = "Runs",
     pch = 16)

#Interpretation:
#There is a very strong positive relationship between balls faced and runs scored.
#The high R² (~0.98) shows that balls faced explains most of the variation in runs
#22. Plotting Regression Line
plot(batters$BF, batters$Runs,
     main = "Regression: Runs vs Balls",
     xlab = "Balls Faced",
     ylab = "Runs")

abline(model1, col = "red")

#Interpretation:
#The plot shows a clear upward trend, meaning runs increase as balls faced increase.
#The regression line fits closely to the data, indicating a strong linear relationship.
#23. Multiple Regression (Runs Prediction)
model2 <- lm(Runs ~ BF + X4s + X6s, data = batters)
summary(model2)
## 
## Call:
## lm(formula = Runs ~ BF + X4s + X6s, data = batters)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -31.606  -3.404   1.333   3.915  28.513 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept) -3.78202    1.08667   -3.48 0.000654 ***
## BF           0.86965    0.02786   31.21  < 2e-16 ***
## X4s          2.62334    0.15701   16.71  < 2e-16 ***
## X6s          4.27393    0.17756   24.07  < 2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 9.542 on 152 degrees of freedom
## Multiple R-squared:  0.9973, Adjusted R-squared:  0.9972 
## F-statistic: 1.841e+04 on 3 and 152 DF,  p-value: < 2.2e-16
#Interpretation:
#Runs are strongly influenced by balls faced, fours, and sixes, and all variables are highly significant.
#The very high R² (~0.997) shows the model predicts runs very accurately.
#24.Multiple Regression (Wickets Prediction)
model3 <- lm(WKT ~ OVR + ECO, data = bowlers)
summary(model3)
## 
## Call:
## lm(formula = WKT ~ OVR + ECO, data = bowlers)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -8.3209 -1.6719 -0.1617  1.4807  7.9748 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  2.61686    2.00710   1.304    0.195    
## OVR          0.31377    0.01649  19.029   <2e-16 ***
## ECO         -0.27340    0.18129  -1.508    0.135    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 2.733 on 105 degrees of freedom
## Multiple R-squared:  0.815,  Adjusted R-squared:  0.8115 
## F-statistic: 231.3 on 2 and 105 DF,  p-value: < 2.2e-16
# Plotting for Ques 24
plot(bowlers$ECO, bowlers$WKT,
     main = "Regression: Wickets vs Economy",
     xlab = "Economy (ECO)",
     ylab = "Wickets (WKT)",
     pch = 16)

#Interpretation:
#Overs bowled have a strong positive and significant impact on wickets, while economy rate is not statistically significant.
#The model explains a good portion of variation in wickets (R² ≈ 0.81).
library(ggplot2)
#25. Polynomial Regression (Runs vs Balls)
model_poly <- lm(Runs ~ poly(BF, 2), data = batters)
summary(model_poly)
## 
## Call:
## lm(formula = Runs ~ poly(BF, 2), data = batters)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -65.697 -13.455   0.744   9.577 106.102 
## 
## Coefficients:
##              Estimate Std. Error t value Pr(>|t|)    
## (Intercept)   161.321      1.992  81.002   <2e-16 ***
## poly(BF, 2)1 2224.183     24.875  89.416   <2e-16 ***
## poly(BF, 2)2    6.929     24.875   0.279    0.781    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 24.87 on 153 degrees of freedom
## Multiple R-squared:  0.9812, Adjusted R-squared:  0.981 
## F-statistic:  3998 on 2 and 153 DF,  p-value: < 2.2e-16
#Graph for Ques 25 
ggplot(batters, aes(x = BF, y = Runs)) +
  geom_point() +
  stat_smooth(method = "lm",
              formula = y ~ poly(x, 2),
              se = FALSE) +
  labs(title = "Polynomial Regression (Degree 2)",
       x = "Balls Faced",
       y = "Runs")

#Interpretation:
#The polynomial model shows a strong relationship between balls faced and runs, but the squared term is not significant.
#This means the relationship is mostly linear, with very little curvature effect.