<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Sagi Venkatapathi Varma Raju on Medium]]></title>
        <description><![CDATA[Stories by Sagi Venkatapathi Varma Raju on Medium]]></description>
        <link>https://medium.com/@sagivenkatapathivarmaraju?source=rss-8750dea39e2b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Stories by Sagi Venkatapathi Varma Raju on Medium</title>
            <link>https://medium.com/@sagivenkatapathivarmaraju?source=rss-8750dea39e2b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 18:17:52 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sagivenkatapathivarmaraju/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Cricket Analytics — Sachin vs Virat]]></title>
            <link>https://medium.com/@sagivenkatapathivarmaraju/cricket-analytics-sachin-vs-virat-2480a091fe89?source=rss-8750dea39e2b------2</link>
            <guid isPermaLink="false">https://medium.com/p/2480a091fe89</guid>
            <dc:creator><![CDATA[Sagi Venkatapathi Varma Raju]]></dc:creator>
            <pubDate>Sun, 16 Aug 2020 03:08:08 GMT</pubDate>
            <atom:updated>2020-08-16T03:08:08.507Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Cricket Analytics — Sachin vs Virat</strong></h3><p>In this blog, we will focus on how analytics can be applied to Cricket. The combined data of the bowler as well as the batsman if analyzed efficiently has the ability to give significant insights into the game. This helps the coach as well as the cricketers to make decisions in the right direction. This can be explained in a better way by performing an Exploratory Data Analysis (EDA) on a dataset.</p><p>We will perform an EDA on the datasets of the two most popular players of the Indian Cricket team, Master Blaster –“Sachin Tendulkar” and Captain Hot — “Virat Kohli”. We will focus on the batting styles of both and then do a comparative analysis of their performance.</p><p>The analysis has been done using the “cricketr” package in R. This package scraps the data from the “ESPN Crickinfo Statsguru”. As the main focus is on the batting style we will only focus on the variables associated with it.</p><h4><strong>Extraction of Data :</strong></h4><p>We have made use of “<em>getPlayerDataOD”</em> function available in “<em>cricketr” </em>package to get the data. Here OD signifies One Day. We will be only using the data of One Day International matches of both the players. The key parameter used in the function are explained below:</p><p><em>profile</em> — signifies the profile number of Virat Kohli which can be found by entering his name on the “ESPN Cricinfo Statsguru” website. The profile number of Virat Kohli is 253802 and that of Sachin Tendulkar is 35320.</p><p>Let’s first look at the data sample and understand the different variables in the data that help us do the analysis.</p><p>The data variables are explained in brief in the order in which they appear below Data Samples for both players:</p><p>1) The runs faced by the batsman<br> 2) The minutes spent at the crease<br> 3) The number of balls faced by the batsman<br> 4) The number of 4s made by the player<br> 5) The number of 6s made by the player<br> 6) The strike rate in that particular match<br> 7) The position at which the player plays<br> 8) The description of dismissal of the player if any<br> 9) The innings in which the player played<br> 10)The name of the opposition<br> 11)The place or the ground on which the match was played<br> 12)The date of the match<br> <br>So with the help of the above variables, we will try to extract as much information as possible. We will be dealing with the One Day International(ODI) dataset of Sachin and Kohli. We will make use of statistics as well as machine learning techniques for performing analysis on the two datasets. We will try to highlight the factors which are responsible for making these two cricketers so popular as well as different from each other.</p><p>We do this by Cleaning the data which includes removing all the rows either with Runs scored when not out, when the player “Did not Bat” and when the “team did not bat”. We do this for the data of both the players.</p><h4><strong>Data Sample for Virat Kohli :</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O3mx-LXtGqONPCt-JklzJg.jpeg" /><figcaption>Top 6 rows of the Dataset for Virat Kohli</figcaption></figure><h4><strong>Data Sample for Sachin Tendulkar:</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LUYU2dPBhC8ykzOjv52T6g.jpeg" /><figcaption>Top 6 rows of the Dataset for Sachin Tendulkar</figcaption></figure><p>Let’s do some exploratory data analysis of both the players.</p><h4><strong>Histogram of Runs Scored:</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SwUAUG71GK_XcbQY2bPZlw.jpeg" /></figure><p>The above histograms tell us the range over which Virat Kohli and Sachin Tendulkar have scored runs as well its frequency. We can observe the following:</p><ol><li>Both Virat and Sachin have mostly scored runs in the range of 0–50.</li><li>The percentage of centuries scored by Sachin is far more than that of Virat.</li><li>The number of games played by Sachin is far higher than that of Virat indicating that Sachin’s career is much longer than Virat’s career.</li></ol><h4><strong>Boxplot of Runs Scored:</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T0t7rvB9__6KU8fsTWA6ZQ.jpeg" /></figure><p>The above boxplots not only tell us about the range of the runs scored but also emphasize on the median of the runs scored by both. The line drawn is used for representing the median.</p><ol><li>The median score for Virat is 34.5.</li><li>The median score for Sachin is 28.</li></ol><p>Also, the extreme lines in the figures known as whiskers indicate the least and the highest runs scored by both. The least runs scored by both is zero and the maximum is 183 for Kohli and 200 for Sachin.</p><h4><strong>Matches played by Virat year wise:</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2YnYTkSxtD2X8qByxNd9LA.jpeg" /></figure><p>From the above histogram, we observe that in 2011 and 2013, Virat played the maximum number of ODI matches while he played the least in 2016 excluding 2020 at the time this blog was posted.</p><h4><strong>Matches played by Sachin year wise:</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*903avGBdPwdmioFs1xtXpA.jpeg" /></figure><p>From the above histogram, we observe that between 1997, Sachin played the maximum number of ODI matches.</p><h4><strong>Histogram of runs played during their peak years:</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kD6w2WQB11hpr2luYE4Zgg.jpeg" /></figure><p>Focussing on the two years we have plotted two Histograms:</p><ol><li>The first indicates the frequency of the runs scored by Virat Kohli in 2011 and the second indicates the frequency of the runs scored by Sachin in 1997.</li><li>Also, the percentage of half-centuries scored by Sachin is more whereas the percentage of centuries scored by Virat is more.</li><li>Virat Kohli scored more highest runs than Sachin during their best years.</li></ol><h4><strong>Barplots for Dismissals of the player :</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qWWKgg_dZL1vKp_iS-fuEg.jpeg" /></figure><p>From the above bar plots, we observe that both the players were mostly caught out.</p><h4>Applying Linear regression between Runs Scored and Balls Faced:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*smaFW6Oyuvs6-r4V6a9d8A.jpeg" /></figure><p>We can summarise the following from above:</p><ol><li>Virat’s plot has a higher slope. This means that for every extra ball faced by Virat we can expect the runs to increase by an average of 1.044.</li><li>Sachin’s plot has a lesser slope. This means that for every extra ball faced by Sachin we can expect the runs to increase by an average of 0.9467.</li></ol><h4>Applying Linear regression between Runs Scored and Minutes Spent at the Crease :</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L1nrrGone4Tlfz7ROBhiYQ.jpeg" /></figure><p>From the above , we can summarise the following:</p><ol><li>Virat’s plot has a lower slope. This means that for every extra minute spent at the crease by Virat we can expect the runs to increase by an average of 0.5595.</li><li>Dhoni’s plot has a higher slope. This means that for every extra minute spent at the crease by Dhoni we can expect the runs to increase by an average of 0.5722.</li><li>The team scores more runs when Sachin spends more time at the crease.</li></ol><h4>Barplots for the percentage of 4s,6s, and others in the total runs scored :</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J1May-eTcNeQzd3DY8xjxQ.jpeg" /></figure><p>We can observe that percentage of 1s,2s, 3s, and 6s scored by Virat is more than that of Sachin whereas, the percentage of 4s scored is more for Sachin.</p><h4>K Means for predicting player’s runs scoring likelihood in % :</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ELOKU8JbPaIo1FcRJk6S_A.jpeg" /></figure><pre>Summary of  Kohli &#39;s runs scoring likelihood<br>********************************************<br>1) There is a 31.22 % likelihood that Kohli  will make  65 Runs in<br>   71 balls over 100  Minutes.<br>2) There is a 50.73 % likelihood that Kohli  will make  14 Runs in<br>   19 balls over  26  Minutes.<br>3) There is a 18.05 % likelihood that Kohli  will make  117 Runs in<br>   113 balls over 163  Minutes.</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LXvobrz8-avK80bPuFG3mg.jpeg" /></figure><pre>Summary of  Sachin &#39;s runs scoring likelihood<br>*********************************************<br>1) There is a 53.52 % likelihood that Sachin  will make  13 Runs in<br>   18 balls over 27  Minutes.<br>2) There is a 18.09 % likelihood that Sachin  will make  111 Runs in<br>   118 balls over  172  Minutes.<br>3) There is a 28.39 % likelihood that Sachin  will make  53 Runs in<br>   63 balls over 95  Minutes.</pre><p>I conclude my analysis here. We have covered how analytics can be applied to the most favorite sport of Indians by using EDA and Machine Learning. We can extend this analysis in a similar way for the Bowlers and Fielders as well.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2480a091fe89" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>