<?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 H.YAMA on Medium]]></title>
        <description><![CDATA[Stories by H.YAMA on Medium]]></description>
        <link>https://medium.com/@yamahisa?source=rss-3e3ee91ae200------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*5lP9rhdjZbRwpmXJtNb1ig.jpeg</url>
            <title>Stories by H.YAMA on Medium</title>
            <link>https://medium.com/@yamahisa?source=rss-3e3ee91ae200------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 19:44:06 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@yamahisa/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[The Theory That NBA Championship Teams Have Cost-Effective Players]]></title>
            <link>https://yamahisa.medium.com/the-theory-that-nba-championship-teams-have-cost-effective-players-53b825f7bba0?source=rss-3e3ee91ae200------2</link>
            <guid isPermaLink="false">https://medium.com/p/53b825f7bba0</guid>
            <category><![CDATA[basketball-analytics]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[nba-analytics]]></category>
            <category><![CDATA[nba]]></category>
            <dc:creator><![CDATA[H.YAMA]]></dc:creator>
            <pubDate>Sat, 11 May 2024 10:47:35 GMT</pubDate>
            <atom:updated>2024-05-11T10:49:13.338Z</atom:updated>
            <content:encoded><![CDATA[<h3>Summary</h3><ul><li>It has become apparent that championship teams, or those advancing to the final, invariably have <strong>players with cost-effective contracts</strong>.</li><li>However, the specifics of these contracts vary by team. Interestingly, from the perspective of winning a championship, <strong>teams that rely solely on players with lower salary contracts across the league tend to struggle</strong> to clinch titles(except for 2021–22 GSW), as observed over three seasons.</li><li>Further analysis of past seasons and variations between regular season and playoff minutes may reveal more about these trends, which is something I plan to explore in future studies.</li></ul><h3>Introduction</h3><p>I’ve heard that NBA championship teams always seem to have players with cost-effective contracts for the team (though I don’t remember the specific sources or posts…). So, I’ve decided to explore and verify this hypothesis.</p><p>First of all, I define the meaning of cost-effective contracts as below.</p><blockquote><strong>A cost-effective contract for a team is defined here as one where the actual contribution of a player significantly exceeds the predicted contribution, based on the relationship between each player’s salary and their contribution to victories.</strong></blockquote><p>I believe this definition will resonate with all of you reading this article. (Indeed, even the player evaluation metric we’re using here, Lebron, calculates a figure called <a href="https://www.bball-index.com/lebron-database/">LEBRON CONTRACT VALUE</a>.)</p><p>However, <strong>there are few instances where championship teams or teams that have made it to the NBA Finals have been analyzed with this definition</strong> in mind. Through this article, I hope you can enjoy the deeper aspects of the basketball world.</p><h3>Analysis Methods and Data Utilization</h3><p>This article requires the identification of players with cost-effective contracts. <br>As previously mentioned, the basic idea is that a player’s actual contribution significantly exceeds the value predicted from their salary.<br>However, various methods can be considered for calculating the predicted contribution from salary. <br>As this is my first attempt, I have opted for a simple method to ensure comprehensibility. I created a <strong>simple linear regression model based on salary and contribution</strong> data to predict contributions.</p><p>For the data, I use salary information from <a href="https://hoopshype.com/salaries/">HoopsHype</a> and the WAR (Wins Above Replacement) values calculated by <a href="https://www.bball-index.com/lebron-database/">LEBRON</a> as our measure of contribution. <br>I&#39;m focusing on three seasons from 2020–21 to 2022–23, and I exclude players with less than 820 minutes of playtime in the regular season from the model creation.</p><h3>Results</h3><h4>2022–23 season</h4><p>First, to understand the data overview, let’s visualize the distribution of salaries and WAR for the 2022–23 season.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/653/1*fWpnUG1528_nrMxl3yJqiw.png" /></figure><p>The diagonal line drawn represents the WAR values predicted from player salaries. <br>(In this case, a salary of $10 million corresponds to a WAR of about 2.5, and $20 million corresponds to around 4.)</p><p>Looking at the overall trend, <strong>there is a tendency for higher salaries to correspond to higher WAR values, but there is also variability in WAR within the same salary range</strong>.</p><p>These results might seem obvious, but let’s now look at the data by team, starting with the 2022–23 champion team, DEN.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/653/1*xg42om3_XRkVBFxFqX3s8w.png" /></figure><p>Nikola Jokić stands out significantly, but within the context of this discussion, Aaron Gordon becomes a focal point. He is approximately the fourth highest-paid player on the team, yet in terms of contribution, he ranks within the top two in the team and is also relatively high in WAR within the same salary bracket. Although I did not watch every game of the 2022–23 Denver Nuggets, the contributions he made were likely as significant as these results suggest. In terms of cost-effective contracts,<strong> the players around the fourth salary tier</strong> on the 2022–23 DEN team might be considered to have excellent cost-effectiveness.</p><p>Let’s also take a look at the Miami Heat, who faced Denver in the finals for the 2022–23 season, for comparison.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/766/1*DPg41GmXLKm_-cIaPl4DgA.png" /></figure><p>Looking at Nikola Jokić’s exceptional VORP might set a high benchmark, but even then, a different trend can be observed in DEN. <br>Specifically, take Tyler Herro, who ranks under the top five in salary on the team and is positioned at 216th league-wide, <strong>which doesn’t classify him among the high earners</strong>. However,<strong> in terms of WAR, he ranks third on the team and relatively high within his salary tier.</strong> <br>Moreover, Herro is on a rookie contract, which highlights how the team has managed to secure value by keeping his salary low (Caleb Martin, too, contributes reasonably under a full contract from a two-way deal). <br>This situation exemplifies <strong>the type of cost-effectiveness that can be found league-wide among players with lower salaries</strong>. <br>*Personally, this kind of cost-effective contract was what I had envisioned before this analysis.</p><p>It’s interesting to see different trends even within the 2022–23 season alone. Let’s keep up this momentum and look at the 2021–22 season next.</p><h4>2021–22 season</h4><p>Starting with the champion team, GSW.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/653/1*10t7hhJNS2XLxA7n6fr7CA.png" /></figure><p>Players like Jordan Poole, Kevon Looney, Otto Porter Jr., and Gary Payton II are visible for <strong>their cost-effectiveness, even among those with lower contracts league-wide.</strong> The team’s ability to assemble such a group of well-performing players at a low cost speaks to the skillfulness of their management. <br>Regarding the team’s higher earners, everyone except Klay has performed up to their salary level, and it hasn’t posed a significant issue.</p><p>In terms of contract strategy, <strong>this setup is similar to what we observed with MIA in the 2022–23 season</strong>.</p><p>Let’s also take a look at the Boston Celtics.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/598/1*cBbuT0ptb2axKaNc-GCAag.png" /></figure><p>This is quite impressive!!!<br>The team has assembled players with <strong>good cost-effectiveness across various salary ranges</strong>, and Robert Williams III has an even higher VORP than his counterparts in the same salary range at GSW (excluding Jordan Poole), undoubtedly qualifying him as a high-value contract player. <br>Most of the key players have cost-effective contracts, suggesting that <strong>the main roster comprises high-value types</strong>. <br>Looking back like this, it might feel regrettable that they lost to GSW in such a season.</p><p>Let’s also take a look at the 2020–21 season.</p><h4>2020–21 Season</h4><p>Starting with MIL:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/653/1*3GPfkRoTAcxnuHapFauxow.png" /></figure><p>It was known beforehand that Giannis’ metrics would be high, but the graph highlights the great cost-effectiveness of Brook Lopez and Donte DiVincenzo. Their situation resembles the 2021–22 BOS.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/648/1*KYwGiNjN6tAoHEirPftodg.png" /></figure><p>The graph clearly shows the cost-effectiveness of Mikal Bridges and Deandre Ayton, who have relatively low salaries within the league. This is similar to the 2022–23 MIA.</p><h3>Conclusion</h3><p>Reviewing the past three seasons, <strong>it’s evident that championship teams or those advancing to the finals consistently feature players with cost-effective contracts</strong>. <br>However, the specifics of these contracts vary by team. From a championship perspective, teams consisting solely of players with lower league-wide salaries tend to find it challenging to win — although this observation is based only on three seasons. <br>Further examination of past seasons’ data and differences in playtime between the regular season and playoffs might reveal more trends, which we will consider for future study.</p><p>Lastly, let’s publish the distribution of salaries and VORP for the top-ranking teams this season (2023–24). Use this information for discussions on which team might win the championship in terms of cost-effective players.</p><p>WEST</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/653/1*mHM0f_Nf7zei0BLNaer7VA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/766/1*b1v_P5UGmYogWuzmu95GsQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/766/1*VHZjxAH_VV2qG_5tIugTAg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/766/1*2TL7nb6keR3nje5B_Gl-Nw.png" /></figure><p>EAST</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/653/1*54H7XMFYoR43aGbOjbj2Pg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/766/1*y7LtumN_ruSpf-YhUfvIZQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/766/1*6Ysnk83HIPzZ7xKbEx4BBg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/766/1*umlTB47StCimQQtQDlW98A.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=53b825f7bba0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Seeking an Opportunity as a Data Analyst for an NBA Team]]></title>
            <link>https://yamahisa.medium.com/seeking-an-opportunity-as-a-data-analyst-for-an-nba-team-ad661ed184c?source=rss-3e3ee91ae200------2</link>
            <guid isPermaLink="false">https://medium.com/p/ad661ed184c</guid>
            <category><![CDATA[nba]]></category>
            <category><![CDATA[data-analyst]]></category>
            <dc:creator><![CDATA[H.YAMA]]></dc:creator>
            <pubDate>Mon, 14 Aug 2023 14:02:31 GMT</pubDate>
            <atom:updated>2023-08-14T14:02:31.549Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello, I’m Hisataka Yamazaki from Tokyo, Japan. <br>I graduated from a Japanese university where I majored in Education and conducted data-driven research on school sports activities.</p><p>I’m passionate about leveraging data to drive team success and am keenly interested in becoming a Data Analyst for an NBA team.</p><h3>Experience &amp; Skills:</h3><ul><li>Currently working as a Data Analyst for a leading Japanese apparel e-commerce company.</li><li>Proficient in statistical tests, causal inference, business visualization using tools like Spreadsheet and PowerBI, and user profiling using decision trees.</li><li>Well-versed in R, Python, SQL, Spreadsheet, and PowerBI. For instance, I’ve created dashboards for business departments and conducted statistical analyses and game simulations in my personal projects.</li><li>Played basketball during my middle and high school years and later coached a junior high basketball team. I’ve also independently analyzed basketball data, with one of my analyses focusing on identifying NBA players who are good at drawing shooting fouls by using machine learning. <a href="https://yamahisa.medium.com/finding-nba-players-who-are-good-at-drawing-shooting-fouls-7902eb4bcaeb">Check it out here</a>.</li></ul><h3>Initiatives:</h3><ul><li>Actively share my basketball analyses on <a href="https://twitter.com/HYAMA_1160">Twitter</a> and <a href="https://medium.com/@yamahisa">Medium</a>.</li><li>Collaborated with a Japanese sports data analysis company, contributing to the simulation of basketball game results using PbP data and so on.</li><li>Completed the Basketball Analytics Course offered by Sports Management Worldwide, instructed by Benjamin Alamar, a seasoned analyst from OKC, CLE, and ESPN. <a href="https://www.sportsmanagementworldwide.com/certificate/hisataka-yamazaki/784682/course/BBAC/3376">View my certificate here</a>.</li></ul><h3>Contact:</h3><ul><li><a href="https://twitter.com/HYAMA_1160">Twitter</a></li><li><a href="https://medium.com/@yamahisa">Medium</a></li><li><a href="https://www.linkedin.com/in/hisataka-y-2948381b4/?locale=en_US">LinkedIn</a></li></ul><p>Becoming a Data Analyst for an NBA team is one of my dreams. I genuinely believe that my skills and experiences can contribute to your team’s success. <br>I’m eager to be a part of the journey to lead the team to victory. If you’re interested, please don’t hesitate to reach out. I’m looking forward to potential collaborations.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ad661ed184c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[“Retesting the Theory: Do Teams with a Double-Digit Lead at Half-Time Really Lose More Often in…]]></title>
            <link>https://yamahisa.medium.com/retesting-the-theory-do-teams-with-a-double-digit-lead-at-half-time-really-lose-more-often-in-55353580468e?source=rss-3e3ee91ae200------2</link>
            <guid isPermaLink="false">https://medium.com/p/55353580468e</guid>
            <category><![CDATA[nba]]></category>
            <category><![CDATA[nba-analytics]]></category>
            <category><![CDATA[sports-analytics]]></category>
            <dc:creator><![CDATA[H.YAMA]]></dc:creator>
            <pubDate>Wed, 14 Jun 2023 13:56:12 GMT</pubDate>
            <atom:updated>2023-06-14T14:02:47.672Z</atom:updated>
            <content:encoded><![CDATA[<h3>“Retesting the Theory: Do Teams with a Double-Digit Lead at Half-Time Really Lose More Often in the NBA?”</h3><h3>Intro</h3><p>Greetings to all basketball enthusiasts! I hope this blog finds you well.<br> In a previous study, I conducted an analysis using data from Japan’s professional basketball league to investigate whether <strong>a team becomes more likely to lose if there is a double-digit point difference at halftime</strong>.</p><p><a href="https://yamahisa.medium.com/is-a-team-more-likely-to-lose-when-points-diffrence-is-more-than-double-digits-ad46090174ea">Is a team more likely to lose when points diffrence is more than double digits?</a></p><p>As a result, no such trend was observed. However, I suspected that different results might emerge from the NBA data, prompting me to undertake this new analysis.</p><h3>What are the implications of being more likely to lose?</h3><p>Before we dive into the analysis, let’s refresh our understanding of what we mean by “<strong>more likely to lose</strong>”. <br>At first glance, it might seem like we could simply analyze whether teams with a double-digit points difference at halftime are more likely to lose. However, this approach doesn’t help us distinguish whether <strong>a team is more likely to lose simply because of the points difference or specifically because it’s a double-digit points difference</strong>. <br>For instance, if a team’s winning probability is lower with a 10-point difference compared to a 9-point difference, does that prove our point? But what if we see the same trend between a 5-point and a 6-point difference? It appears that the phrase “double-digit points difference” takes on a different meaning in this context.</p><p>Hence, the real question we should be asking is whether teams are more likely to lose when the points difference reaches double digits, compared to a single-digit difference. So, our goal for this analysis is to determine <strong><em>whether a double-digit difference at halftime results in a higher likelihood of losing than a single-digit difference!</em></strong></p><h3>Analysis approach</h3><p>For this analysis, I decided to explore two main points:</p><ol><li>Visualize the winning percentage for each goal difference at halftime.</li><li>Employ statistical methods to analyze whether a team is more likely to lose when the points difference reaches double digits, compared to a single-digit difference.</li></ol><p>I used logistic regression and RDD (Regression Discontinuity Design) for the statistical analysis. The specific details of this approach will be covered later. <br>The analysis was conducted using data from 4800 games spanning four seasons from 2020 to 2023.<br>(If you are interested in seeing the code as it was analyzed, here is the GitHub <a href="https://github.com/pauze-pauze/basketball_data_analysis/tree/master/2_digits_diff_influence">link</a>)</p><h3>Analysis part1</h3><p>In the first part of the analysis, I graphed the final winning percentage based on the points difference at halftime.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H4XVQQAXHrKOu7sNzTNQEQ.png" /></figure><p>As expected, a<strong> larger points difference at halftime correlates to a higher probability of losing</strong>, and <strong>the rate of decrease in the winning percentage doesn’t seem to significantly change around a 10-point difference</strong>. <br>On the other hand, there were some instances where the winning probability was higher despite a larger points difference, such as between a 3-point and a 4-point difference, or a 5-point and a 6-point difference. <br>This was not observed as frequently in the B.LEAGUE data(shown below), which makes it a point of interest (although we won’t delve deeper into this in the current analysis).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gO29Rd5IEmTNkOiwc70zOw.png" /></figure><p>I also created the same graph using data from the end of the third quarter, which showed a similar trend.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8nD5XamSkYu0bUBbmjYl-w.png" /></figure><p>Therefore, it can be concluded from this simple aggregation that our initial hypothesis is not supported.</p><h3>Analysis part2</h3><p>In the second part of the analysis, we used two approaches — logistic regression and RDD. For the logistic regression, I set up a regression model as follows:</p><blockquote>logit(y) = a + b×(points difference) + c×(double-digit difference dummy)</blockquote><p>This allowed us to account for the influence of a widening points difference on the winning probability while assessing the significance of a double-digit difference. <br>I only used data from games where the points difference was between 5 and 15 to avoid influences from other factors such as garbage time (a double-digit difference dummy of 1 was given to games with a 10 to 15 points difference). <br>The significance level was set at 5%, which was also the case for the RDD.</p><p>The result of the logistic regression, using halftime data, showed that <strong>the points difference(pts_diff_tq in the image) significantly affected the winning probability, but the double-digit difference dummy(two_digits_flag) was not significant </strong>(the same result was obtained using data from the end of the third quarter).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1002/1*mr3wvkATbCuQDcygdtk1bQ.png" /></figure><p>Next, I conducted an RDD analysis. While this method requires certain assumptions (detailed <a href="https://www.jstage.jst.go.jp/article/ace/4/1/4_22001/_html/-char/en"><strong>here</strong></a>), I believe this case meets these conditions.</p><ul><li><strong>Assignment Rules and Thresholds are Known</strong><br>→Players know the point difference between them and their opponents.</li><li><strong>Pre-Intervention Assignment Variables cannot be Manipulated</strong><br>→Because of the opponents. Players can almost never decide whether to go for double-digit or single-digit point differentials at their own will.</li><li><strong>All Factors Other Than the Intervention are Continuous around the Threshold</strong><br>→I haven’t verified this, but it’s hard to imagine that factors other than point difference would be discontinuous.</li></ul><p>The results of the RDD analysis are illustrated in the subsequent image.</p><p>*As I was unable to use the win/loss flag as the dependent variable for this analysis, I focused on the influence of the final point difference (The logic behind this was that if the final point difference had an impact, it would also affect the game outcome).</p><p>However, no significant effect was found in the results (refer to the LATE’s Pr(&gt;|z|) value of 0.2697).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/992/1*V2I3jB6asZbL8d5AD1kykg.png" /></figure><p>Given these findings, it can be concluded that <strong>neither logistic regression nor RDD provides evidence that a double-digit point difference significantly influences the outcome</strong>.</p><h3>Conclusion</h3><p>The conclusion was that it cannot be said that it is easier to lose when there is a double-digit point difference. However, it doesn’t mean that it’s okay to have a double-digit point difference (because the more points you have, the harder it is to turn the game around). So, what we should say is, “It would be nice to have a close score difference going into halftime, but there is no need to worry about a double-digit score difference. It’s an obvious conclusion, isn’t it?<br>*Same conclusion I wrote before. lol</p><p>Here is my <a href="https://twitter.com/HYAMA_1160">Twitter</a> and <a href="https://www.linkedin.com/in/hisataka-y-2948381b4/?locale=en_US">LinkedIn</a> account. If you are interested, please follow me.</p><p><a href="https://twitter.com/HYAMA_1160">JavaScript is not available.</a></p><p><a href="https://www.linkedin.com/in/hisataka-y-2948381b4/?locale=en_US">https://www.linkedin.com/in/hisataka-y-2948381b4/?locale=en_US</a></p><p>I am presently in search of an opportunity to serve as a Data Analyst within the NBA.<br>Should you have any interest or happen to know of any potential openings, I would greatly appreciate it if you could kindly reach out to me.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=55353580468e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Finding NBA players who are good at drawing shooting fouls.]]></title>
            <link>https://yamahisa.medium.com/finding-nba-players-who-are-good-at-drawing-shooting-fouls-7902eb4bcaeb?source=rss-3e3ee91ae200------2</link>
            <guid isPermaLink="false">https://medium.com/p/7902eb4bcaeb</guid>
            <category><![CDATA[basketball-analytics]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[nba]]></category>
            <dc:creator><![CDATA[H.YAMA]]></dc:creator>
            <pubDate>Fri, 24 Mar 2023 12:19:59 GMT</pubDate>
            <atom:updated>2023-03-24T13:50:03.488Z</atom:updated>
            <content:encoded><![CDATA[<h3>Summary</h3><ul><li>I explored methods for finding NBA players who are good at drawing shooting fouls.</li><li>I adopted an approach that involves identifying players who have more actual free throw attempts (FTA) than predicted FTA.</li><li>As a result, it was suggested that in addition to players who are generally considered good at drawing shooting fouls, such as Joel Embiid and DeMar DeRozan, Lonnie Walker IV and Bojan Bogdanovic may also be skilled at it.</li></ul><h3>Background</h3><p>As the title suggests, I am interested in finding NBA players who are skilled at drawing shooting fouls through data analysis. <br>While Joel Embiid and DeMar DeRozan are known to be good at drawing shooting fouls, there may be other players with a high skill level who are less well-known. <br>However, watching game footage for every game would be incredibly time-consuming, so the concept is to pick up players who are likely to be good at drawing shooting fouls to some extent from their statistics. So, let’s take a closer look at this.</p><h3>Approach and Data</h3><p>This time, I will adopt an approach that considers players who have more actual free throw attempts (FTA) than predicted FTA to be good at drawing shooting fouls. <br>For the feature variables used to predict FTA, I will use playing time, field goal attempts (FGA), and personal fouls drawn (PFD), which are expected to have a strong correlation with FTA.</p><p>Two types of predictive models and preprocessing of feature variables will be created, and the most accurate model and preprocessing will be adopted by combining them (generalization performance will be confirmed using cross-validation). <br>Based on the model and processing created so far, the entire dataset will be used to make predictions, and players with a high ratio of actual FTA to predicted FTA will be considered good at drawing shooting fouls.</p><p>The data used for this analysis is from the NBA’s 2021–22 regular season. If you are interested in the raw data, please see the following spreadsheet, which was manually copied from the official website:<br><a href="https://docs.google.com/spreadsheets/d/1gdlAOctQXfM1M99gQIvjsTxzSQ_JJX-x62ai0CvoDEE/edit?usp=sharing">https://docs.google.com/spreadsheets/d/1gdlAOctQXfM1M99gQIvjsTxzSQ_JJX-x62ai0CvoDEE/edit?usp=sharing</a></p><p>※The sample data frame is shown in the following image.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/734/1*XZwx2bK1H-o1gCP4RPLZ_A.png" /></figure><h3>Result</h3><p>First, let’s take a look at the relationship between the data used in this analysis. <br>※In this analysis, R was used. If you would like to see the details of the analysis code, please refer to <a href="https://github.com/pauze-pauze/basketball_data_analysis/tree/master/find_players_good_at_draw_shooting_foul">this</a> Github link.</p><pre>pairs.panels(df %&gt;% select(-Player))</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*jqU6p_j6wMsjR_-ANQOdTQ.png" /><figcaption>The upper right shows the correlation coefficients between each variable, and the lower left shows the scatter plots.</figcaption></figure><p>From the results, we can see that all variables have a certain degree of correlation, and in particular, PFD and FTA have an extremely high correlation coefficient. <br>Regarding Min and FGA, their relationship with FTA appears to be quadratic, which is an interesting trend.</p><p>Now let’s create a predictive model. <br>The code is shown below.</p><pre>seed = 1031<br>set.seed(seed)<br><br>folds &lt;- df %&gt;%<br>  vfold_cv(v = 5, strata = FTA)<br>folds<br><br># define recipe<br>fta_recipe_base &lt;- df %&gt;%<br>  recipe(formula = FTA ~ .) %&gt;%<br>  update_role(Player, new_role = &quot;id variable&quot;) %&gt;%<br>  step_zv(all_predictors()) %&gt;%<br>  step_center(all_predictors())<br>fta_recipe_yj &lt;- fta_recipe_base %&gt;%<br>  step_YeoJohnson(Min, FGA)<br><br># define model<br>lm_spec &lt;- <br>  linear_reg() %&gt;%<br>  set_engine(&quot;lm&quot;) %&gt;%<br>  set_mode(&quot;regression&quot;)<br><br>xgb_spec &lt;- <br>  boost_tree() %&gt;%<br>  set_engine(&quot;xgboost&quot;) %&gt;%<br>  set_mode(&quot;regression&quot;)<br># This time, I skip hyper parameter tuning.<br><br># learning<br>fta_models &lt;- <br>  workflow_set(<br>    preproc = list(<br>      base = fta_recipe_base<br>      ,yj = fta_recipe_yj<br>    )<br>    ,models = list(<br>      lm = lm_spec<br>      ,xgb = xgb_spec<br>    )<br>    ,cross = TRUE<br>  )<br>set.seed(seed)<br>fta_models &lt;- fta_models %&gt;%<br>  workflow_map(<br>    resamples = folds<br>    ,metrics = metric_set(mae)<br>    ,verbose = FALSE<br>  )<br>fta_models<br>fta_models %&gt;%<br>  rank_results(<br>    rank_metric = &quot;mae&quot;<br>    ,select_best = TRUE<br>  ) %&gt;%<br>  select(rank, mean, model, wflow_id, .config)<br><br># base recipe and lm is the best model</pre><p>Now that the model has been created, let’s use it to calculate predicted values of FTA for each player and extract players with high and low ratios of predicted values to actual values, as well as players with high FTA. (Players with actual FTA of 100 or more are included.)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bKPJPycTQBkQWYi3vBNNxQ.png" /></figure><p>The first five players have high ratios, the next five have low ratios, and the remaining ten have high FTA. <br>Among players with high FTA, there are players like James Harden, Jimmy Butler, Joel Embiid, and Demar DeRozan, who are said to be good at drawing fouls and have high ratios, while players like Nikola Jokic and KAT tend to have low ratios. <br>※By the way, although LeBron James is not listed in this table, his real_pred_ratio is 89.8%, which is less than the expected FTA. He may have a tendency not to get fouls called on him.</p><p>The first five players are considered to be good at drawing shooting fouls, which is the theme of this analysis. <br>It will require video analysis to determine if they actually are good at drawing fouls, but as a way to find candidates, this analysis result is not bad. <br>Let’s also take a look at the scatter plot of predicted values versus actual values.</p><p>Let’s also take a look at the scatter plot of predicted values versus actual values.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QiG08Pgga-yA-ioaOkEiXA.png" /></figure><p>Players with high and low ratios generally have fewer FTA than players who are said to be good at drawing shooting fouls, so they may not stand out as much, as can be seen from this graph.</p><h3>Conclusion</h3><ul><li>I conducted an analysis to find NBA players who are skilled at drawing shooting fouls through data analysis.</li><li>As a result, we were able to find players who were previously not discussed.</li><li>On the other hand, there is a need for discussion regarding whether players with high predicted values compared to actual values can be considered good at drawing shooting fouls, as there may be other factors such as playing time at the end of the game with many team fouls leading to personal fouls that result in FTA.</li></ul><p>Here is my Twitter account. If you are interested, please follow me.</p><p><a href="https://twitter.com/HYAMA_1160">JavaScript is not available.</a></p><p>P.S.<br>I received a comment and it is very insightful, so if I have time, I would like to try</p><h3>Rob Moore on Twitter: &quot;Interesting analysis based on select and simple features. You could do somethingore advanced with tracking data and expected foul rate based on player positions, but I&#39;d bet the results would be in large part similar / Twitter&quot;</h3><p>Interesting analysis based on select and simple features. You could do somethingore advanced with tracking data and expected foul rate based on player positions, but I&#39;d bet the results would be in large part similar</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7902eb4bcaeb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Predict season 3P% by early time stats and Bayesian inference]]></title>
            <link>https://yamahisa.medium.com/predict-season-3p-by-early-time-stats-and-bayesian-inference-f493c420562d?source=rss-3e3ee91ae200------2</link>
            <guid isPermaLink="false">https://medium.com/p/f493c420562d</guid>
            <category><![CDATA[nba]]></category>
            <category><![CDATA[sports-analytics]]></category>
            <category><![CDATA[basketball-analytics]]></category>
            <dc:creator><![CDATA[H.YAMA]]></dc:creator>
            <pubDate>Tue, 23 Nov 2021 00:26:25 GMT</pubDate>
            <atom:updated>2021-11-23T00:26:25.291Z</atom:updated>
            <content:encoded><![CDATA[<h3>Abstract</h3><p>Based on the stats of 3P shots in the early season of the NBA, I used <strong>Bayesian inference</strong> to predict the possible range of the final 3P% stats.<br>The results of the calculation were not so bad qualitatively, but there were some issues.</p><blockquote>Is the width of the credible interval practical?<br>Is it possible to make predictions in the case of extreme values? <br>Is the actual value in the confidence interval in the same proportion as the proportion in the calculated confidence interval?</blockquote><p>In short, there is no evaluation metric to determine which prediction is the best.</p><h3>Intro</h3><p>The other day, I saw the following article.</p><p><a href="https://kmedved.com/2020/08/06/nba-stabilization-rates-and-the-padding-approach/">NBA Stabilization Rates and the Padding Approach</a></p><p>It is a very interesting approach to predicting the final stats by padding the noisy early season results with league-wide numbers.</p><p>However, there is a point of concern, which the predicted value is always a single value(point estimation), and <strong>the certainty of that value is not known</strong>.</p><p>For example, if a simulation predicts that this player’s 3P% at the end of the season will be 35%, it doesn’t mean that there is a 100% chance that it will be 35%. It may be 34% or 36%.<br>The question then becomes, what is the probability that it will be 35%, or 34% or 36%, but the above method cannot answer that question.</p><p>So I’m going to try to predict the final 3P% based on the early season results while using a <a href="https://seeing-theory.brown.edu/bayesian-inference/index.html">Bayesian inference</a>, which can simulate the interval of 3% with possibility, to eliminate the above shortcomings.</p><h3>Analysis approach</h3><p>In order to use Bayesian estimation, we need to set up a prior distribution.</p><p>Let’s say <em>p</em> is the 3P% we want to predict, and <strong><em>p</em> follows a normal distribution , and <em>p</em> is between 0.2 and 0.5. Then, depending on the p, we set the Bernoulli distribution to generate the success or failure of the 3P shot</strong>.<br>The stan code to express above settings as below(I use R and stan to caluculate).</p><pre>data {<br>  int N;<br>  int Y[N];<br>  real prior_mean;<br>  real prior_sd;<br>}</pre><pre>parameters {<br>  <strong>real&lt;lower=0.2,upper=0.5&gt; p;</strong><br>}</pre><pre>model {<br>  <strong>p ~ normal(prior_mean, prior_sd);<br>  for (n in 1:N)<br>    Y[n] ~ bernoulli(p);</strong><br>}</pre><p>Then we need to set normal distribution parameters, <strong>mean and standard deviation(sd)</strong>.</p><p>I make three parameter patterns as below.</p><p><strong>Pattern1</strong><br><strong>mean</strong> : past two seasons’ 3P% average, which results from top 100 player who shot more 3P than others.<br><strong>sd</strong> : past two seasons’ 3P% standard deviation, which results from top 100 player who shot more 3P than others.<br>* I check the distribution of 3P% in graph below and think this looks like normal distribution,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_c6DzZ-1GzM5QMeRS2kOJw.png" /></figure><p><strong>Pattern2</strong><br><strong>mean</strong> : each player’s last seasons’ 3P%.<br><strong>sd</strong> : calculate square root of “last season 3P% * (1-last season 3P%) * 3P attempt num in last season” and divide by 3P attempt num in last season.<br><em>* It is calculated by approximating the normal distribution from the binomial distribution using the central limit theorem and dividing it by the number of trials n.</em></p><p><strong>Pattern3</strong><br><strong>mean</strong> : each player’s last seasons’ 3P%.<br><strong>sd </strong>: past two seasons’ 3P% standard deviation, which results from top 100 player who shot more 3P than others.</p><p>In short, <strong>pattern1 uses entire players’ stats, pattern2 uses each player’s own stats, and pattern3 is mixture of patten1 and pattern2.</strong></p><p>In addition to these information, I use 2017–18 and 2018–19 regular season and 2019–20 early time data(by 2019–11–17) to predict 2019–20 final stats.</p><h3>Result</h3><h4>The accuracy of predict</h4><p>By running the code, I calculate 3P% interval like this.</p><blockquote>The 3P% is between 35% and 40% by 80% possibility<br>(35% is 10% tile num and 40% is 90% tile num.)</blockquote><p>So <strong>I want to check if each player’s 3P% is within the predicted range. If the ratio of within players is similar to the possibility(80% in this example), then the simulation is good</strong>.<br>(Calculating 10 players’ 3P% interval by 80% possibility, and 8players’ final 3P% being within the interval is good. If 10 players are within the interval, it’s no information, and if 3 players are within, it’s too much filtered.)</p><p>Here are each patterns’ within ratio by 80% and 50% possibility.</p><blockquote>Pattern1 (40 players to predict)<br>80% possibility : 30 players are within <strong>(75.0%</strong>)<br>50% possibility : 20 players are within (<strong>50.0%</strong>)</blockquote><blockquote>Pattern2 (38 players to predict)<br>80% possibility : 26 players are within (<strong>68.4%</strong>)<br>50% possibility : 17 players are within (<strong>44.7%</strong>)<br>* 2 players have no 3PA last season, so I exclude in pattern2 and 3.</blockquote><blockquote>Pattern3 (38 players to predict)<br>80% possibility : 28 players are within (<strong>73.7%</strong>)<br>50% possibility : 20 players are within (<strong>52.6%</strong>)</blockquote><p>It seems that <strong>pattern1 is more accurate than other patterns</strong>.<br>It is natural, however, that each player’s own 3P skills, in other words last season 3P%, is useful information. For example, <strong>a player whose 3P% is 40% last year, much better than league 3P%, and if his 3P% in early time is 42%, we think this stats is his own skill rather than this is extreme value</strong>.<br>So it is needed to check if pattern2 and 3 predict those who made extreme 3P% in early time.(It will be listed in the last.)</p><h4>The range of credible interval</h4><p>Next, I check the range of credible interval by the num of 3PA and each pattern.<br>Here are the graph to show above data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yzKaUxqk_pMKNfWlnmgMzg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Yfm9pyKyOUgFYgYQDyg1sQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zJJfRMxqoCod3iAWLR6fLg.png" /></figure><p>Pattern1 and 3 have same trend, around 7% range by 80% possibility and 4% range by 50%.<br><strong>Pattern2 is much more scattered than other patterns, because the standard deviation is different by each players</strong>(the fewer last season’s 3PA, the bigger the standard deviation and range of credible interval.)</p><p>I don’t know the range is narrow enough to use in practical situation, but I think it is not too wide.</p><h4>Who is predictable?</h4><p>In the last, I check who is predicted correctly by each patterns.<br>Here are tables which include each players’ 3PA, 3PM and 3P% by early time and final time, and flag which mean final 3P% is within 80% tile.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/542/1*qSfOkZzbw9gh4tO9pdKeNw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/536/1*O_5yzQ_UOXMu56dKVovRUQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/537/1*Ko23WIWN62RuKpfNobwKxg.png" /><figcaption>From left to right, pattern1, 2 and3.(right predict have green background)</figcaption></figure><p>By comparing each tables,within_80per_flag in pattern1 and 3 looks biased in the middle(a bit more in pattern1, I think).Those of pattern2 looks uniformly distributed.<br>It seems that pattern2 is good at predicting 3P% which the player’s final stats ,who have extreme 3P% in early time.</p><p><strong>However, each topic I write about has the same problem, how to evaluate the patterns.<br>The interpretations I said above is qualitative, and in order to decide which pattern we should select, it needs quantitative metrics.</strong></p><p>To devise or come up with quantitative metrics is future prospects, so if someone devise or come up with metrics to evaluate predicted method with range, I’d like to discuss it!</p><p>Here is my Twitter account. If you are interested, please follow me.</p><p><a href="https://twitter.com/HYAMA_1160">JavaScript is not available.</a></p><p>R and stan code is below.</p><p><a href="https://github.com/pauze-pauze/basketball_data_analysis/tree/master/predict_3Pper_by_early_season_stats_NBA">basketball_data_analysis/predict_3Pper_by_early_season_stats_NBA at master · pauze-pauze/basketball_data_analysis</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f493c420562d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Simulating the distribution of scores for the entire season.]]></title>
            <link>https://yamahisa.medium.com/simulating-the-distribution-of-scores-for-the-entire-season-550d928e982?source=rss-3e3ee91ae200------2</link>
            <guid isPermaLink="false">https://medium.com/p/550d928e982</guid>
            <category><![CDATA[nba]]></category>
            <category><![CDATA[sports-analytics]]></category>
            <category><![CDATA[basketball-analytics]]></category>
            <dc:creator><![CDATA[H.YAMA]]></dc:creator>
            <pubDate>Sun, 29 Aug 2021 08:38:07 GMT</pubDate>
            <atom:updated>2021-08-29T08:42:33.517Z</atom:updated>
            <content:encoded><![CDATA[<h3>Intro</h3><p>The other day, I have read “<a href="https://www.amazon.co.jp/dp/B00BPDR3E2/ref=dp-kindle-redirect?_encoding=UTF8&amp;btkr=1">The Numbers Game: Why Everything You Know About Soccer Is Wrong</a>” and one of the things it said was that <strong>the Poisson distribution can explain how the number of goals scored per game is distributed over the entire season</strong>.<br>* I can`t post the graph of the book, but I found a <a href="https://www-ie.meijo-u.ac.jp/~konaka/footballPoissonSimulation.html">website</a> that does something similar, so I`ll quote the image.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/1*I0m29OrhDJFxZxwsGMFgMQ.png" /></figure><p>As shown in the image above, the distribution of the actual scores and the distribution predicted by the Poisson distribution will be very close.<br>After reading this, I wanted to apply it to basketball, so I simulated it.<br>As a result, the predicted distribution is not close to the actual distribution, suggesting the existence of different factors than in soccer.</p><h3>Analysis approach</h3><p>First of all, I try to think about how to simulate distribution.<br>In the case of soccer, the goal is characterized by “<strong>a large number of trials and a small probability of success</strong>,” and since these characteristics can be captured as a Poisson distribution, the website simulates distribution with this.<br>However, in the case of basketball, the success probability is not so small, and since the score and success rate differ for each type of shot, it is necessary to simulate it in a different way from soccer.<br>So this time, we simulated the following process.</p><blockquote>(1) Randomly calculate the number of times to shoot in each game using an <strong>exponential distribution</strong>.<br>(ii) Randomly select which type of shot (3P shot, 2P shot, FT) will be taken for the nth time using a <strong>multinomial distribution</strong>.<br>(iii) Randomly select whether the shot selected in (ii) will be successful or not using <strong>Bernoulli distribution</strong>, and convert it into a score.<br>(4) Repeat (2) and (3) as many times as in (1), and calculate the number of goals scored in one game.<br>(5) Repeat (4) for the expected number of games to simulate the distribution of the number of goals scored in each game.</blockquote><p>To Sum up, <br>・How many times you will be prompted in each game (1, 4)<br>・Whether each shot in the game will be a 3P, 2P, or FT (2)<br>・Whether the shot you take will succeed or fail (3)<br>by simulating each of these according to a probability distribution, we can compare them with the distribution of actual scores.</p><p>Now let’s get into it!</p><h3>Result</h3><p>First, I will run the simulation.<br>(If you are interested in the code, feel free to check <a href="https://github.com/pauze-pauze/basketball_data_analysis/blob/master/point_predict_distribution/03_code/point_predict_distribution_NBA.R">Github</a>.)</p><p>The result is below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eWEj-00YirIShY3twL7fsw.png" /></figure><p>Both distributions are mountainous, but <strong>the actual distribution is closer to the center, and the simulation appears to have a wider base</strong>. It doesn’t look like the case of soccer.</p><p>However, this may have happened by accident in one simulation. If you run the simulation 10 times, for example, it might get closer.<br>So, I run the simulation 10 times.</p><p>The result is below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pHrJYypLaQ-tvX1z2YoqXA.png" /></figure><p>The format of the graph has changed, but the actual distribution is still closer to the center, and the simulation has a wider base.<br>So it seems that there are some factors that are not fully captured in this simulation.</p><p>It is a hypothesis from here on, but <strong>the assumption that “the probability of scoring at any time is the same and independent” may not be valid</strong>. Because coaches can change players as many times as they want, and there is an incentive to rest the main players.</p><p>In the case of soccer, there are limited opportunities for player substitutions, and there is an incentive to score until the end of the game due to the winning score and goal difference. Therefore, it is easy to make the assumption that the probability of scoring is the same and independent at all times.</p><p>In the case of basketball, however, the results until the middle of the game will affect the results afterward, as the pace of scoring afterward will slow down and extreme scoring will be eliminated because key members will go back to the bench when garbage time comes.</p><p>Well, that’s probably a good result, as you can get somewhat close to the number using only the league-wide average number of attempts, the breakdown of the number of attempts, and the success rate of each, without using the stats for each team.</p><p>Finally, as an appendix, I show you the graph of B.LEAGUE — a professional basketball league in Japan — version. These are similar tendency.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JliIFtels-qXCLfwPwwwYA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RDTAmYwrYysabQ8MI6r7Hg.png" /></figure><p>Here is my Twitter account. If you are interested, please follow me.<br><a href="https://twitter.com/HYAMA_1160">https://twitter.com/HYAMA_1160</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=550d928e982" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Make a web application to compare stats between NBA and euroleague]]></title>
            <link>https://yamahisa.medium.com/make-a-web-application-to-compare-stats-between-nba-and-euroleague-c2bccaf38d93?source=rss-3e3ee91ae200------2</link>
            <guid isPermaLink="false">https://medium.com/p/c2bccaf38d93</guid>
            <category><![CDATA[euroleague]]></category>
            <category><![CDATA[basketball-analytics]]></category>
            <category><![CDATA[nba]]></category>
            <category><![CDATA[data-analysis]]></category>
            <dc:creator><![CDATA[H.YAMA]]></dc:creator>
            <pubDate>Sun, 21 Feb 2021 13:41:04 GMT</pubDate>
            <atom:updated>2021-02-21T13:41:04.793Z</atom:updated>
            <content:encoded><![CDATA[<p>The other day, I read a paper which analyze stats transition between NBA and Euroleague.<br>(Link is below.)</p><p><a href="https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0223524">Trends in NBA and Euroleague basketball: Analysis and comparison of statistical data from 2000 to 2017</a></p><p>It is very interesting paper, but the content in this paper is not main theme of this article.<br>In this paper, the raw data has been published, which includes 2000 to 2017 season data.<br>So, I think of using those data and make it easy to compare NBA and Euroleague stats.<br>In this article, I would like to introduce web application to compare stats between NBA and euroleague.<br>(Link is below.)</p><p><a href="https://b-s-k-t.shinyapps.io/shiny_comparison_euroleague_NBA_in_English/">Comparison of stats between NBA and Euroleague</a></p><p>This web application is to compare stats interactively.<br>For example, you can create graghs like the one below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*ag9Z9hN3r99l80JceSL7fw.png" /></figure><p>The increasing 3PA trend is obvious by this gragh (especially in NBA).</p><p>You can use like this.<br>(This is a japanese version, but the function is equal.)</p><h3></h3><p>新しいグラフを追加した pic.twitter.com/1XXPi47P2o</p><p>I think there are few sites that provide you with the function of compare NBA and Euroleague stats with ease. So if you interested in this web application, please feel free to visit.</p><p>Attention</p><p>I do not guarantee the accuracy or validity of the numbers output by this web application.<br>Also, due to the services used, there is a possibility that the application may be slow to start or may not be able to be viewed due to usage restrictions. Please understand this in advance.<br>Please also note that there is a possibility that I may stop publishing without prior notice.</p><p>Code is below. <br>(Gtihub Link)</p><p><a href="https://github.com/pauze-pauze/basketball_data_analysis/tree/master/shiny_comparison_euroleague_NBA_in_English">pauze-pauze/basketball_data_analysis</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c2bccaf38d93" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Is a team more likely to lose when points diffrence is more than double digits?]]></title>
            <link>https://yamahisa.medium.com/is-a-team-more-likely-to-lose-when-points-diffrence-is-more-than-double-digits-ad46090174ea?source=rss-3e3ee91ae200------2</link>
            <guid isPermaLink="false">https://medium.com/p/ad46090174ea</guid>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[basketball-analytics]]></category>
            <category><![CDATA[basketball]]></category>
            <category><![CDATA[b-league]]></category>
            <dc:creator><![CDATA[H.YAMA]]></dc:creator>
            <pubDate>Thu, 28 Jan 2021 13:30:41 GMT</pubDate>
            <atom:updated>2023-06-14T13:20:06.049Z</atom:updated>
            <content:encoded><![CDATA[<h3>Is a team more likely to lose when the points difference is more than double digits?</h3><h3>Abstract</h3><p>In Japan, it is sometimes said that it is better to keep the goal difference at halftime to single digits. In this post, I analyzed whether this discourse is valid. The conclusion is that a double-digit goal difference makes it easier to lose, but the tendency was the same as within a single-digit goal difference. Therefore, it can be said that closing the gap is a worthwhile act in itself, but a double-digit gap does not clearly make it easier to lose.</p><h3>Intro</h3><p>In Japanese professional basketball games, it is often said that the team had better keep the score difference to single digits by the time the game reaches halftime. However, I have not found any research that discusses whether it is effective to keep the point difference to single digits.</p><p>So, in this article, I analyse this topic by using B.LEAGUE — a professional basketball league in japan — data.</p><h3>Analysis approach</h3><p>First, let me clarify what I want to know in this analysis. In simple terms, it would seem that we should examine whether the winning percentage drops when the point differential reaches double digits.</p><p>However, we need to deeply interpret what we want to this disclosure says here. This is because the above examination does not distinguish between the fact that it becomes more likely to lose when the point difference becomes double digits and the fact that it becomes more likely to lose simply because the point difference increases.</p><p>In other words, what we need to examine here is whether it becomes more likely to lose when the point difference becomes double digits.</p><p>Based on the above, I analyze the following two points.</p><ol><li>Visualize the winning percentage for each goal difference at halftime.</li><li>Estimate how far the actual winning percentage is off, based on the predicted winning percentage when the point differential is in double digits.</li></ol><p>The data is from the 2016~2019 season of B.LEAGUE, a professional basketball league in Japan (the number of games covered is 3936, excluding cases of ties at halftime).</p><p>The code is stored on Github <a href="https://github.com/pauze-pauze/basketball_data_analysis/tree/master/2_digits_diff_influence">here</a> (please note that many parts are written in Japanese).</p><h3>Analysis Part1</h3><p>First, let’s look at a graph of the winning percentage for each goal differential at halftime. Here are the results.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gO29Rd5IEmTNkOiwc70zOw.png" /></figure><p>It’s a very clear transition. One of the characteristics is that the winning percentage drops linearly as the score difference at halftime opens up. To be honest, I didn’t expect the winning percentage to drop so smoothly. And the important part is the double-digit point difference, but looking at the graph, there doesn’t seem to be any tendency for the win rate to drop significantly near that point.</p><p>I’m sure you can draw conclusions from this graph alone, but let’s also try another approach.</p><h3>Analysis Part2</h3><p>Another approach, which I will examine in the following way. (The assumption is that there were 184 games with a 10-point halftime difference, and 29 of those games were won by the team that was behind.)</p><p>Predict the probability of winning when the score difference is 10 points, based on the winning percentage when the score difference is 1~9 points.</p><p>Based on that probability, there is a yy% chance that the number of wins will be less than zz times when 184 games are played.</p><p>“Since the actual number of wins is 29, which is more than zz times, we can’t say that the winning percentage is significantly lower when the difference is double-digit points” or “since it is less than zz times, we can say that the winning percentage is significantly lower”.</p><p>In other words, if the number of wins by 10 points is extremely less than the number of wins by 10 points predicted from the trend of winning percentages between 1 and 9 points, we can say that it is more likely to lose by double digits. Let’s take a look at the actual results. (Note that the yy% above is specified as 10%. It depends on the case, but it is a loose level for this kind of statistical analysis.)</p><p>First, for the probability of winning when there is a 10-point difference, the predicted value is about 18.2%.<br>(The calculation method is described below. If you are not interested, please skip it.)</p><pre>This time, I did a Bayesian logistic regression using the binary variable of the final win/loss of the team that was losing at halftime as the objective variable, and the number of points behind at halftime as the explanatory variable. </pre><p>Now, based on the predicted win rate of 18.2%, I will use the binomial distribution to fill in the numbers for “yy% probability that the number of wins will be less than or equal to zz”.</p><p>Since yy is set at 10%, based on this number, the probability of winning 18.2%, and the information that 184 games will be played, zz is 27. If we fill in the numbers, we get.</p><blockquote><em>There is a 10% chance that the number of games won will be less than 27, but the actual number of games won is 29. Therefore, we can’t say that the number of wins when there is a 10-point difference is extremely less than the number of wins when there is a 10-point difference, which is predicted from the trend of the winning percentage of 1~9 points difference.</em></blockquote><p>That is, at least according to the current data.</p><p>In other words, at least with the current data, we can’t say that it’s more likely to lose when the score is in double digits.</p><h3>Conclusion</h3><p>The conclusion was that it cannot be said that it is easier to lose when there is a double-digit point difference. However, it doesn’t mean that it’s okay to have a double-digit point difference (because the more points you have, the harder it is to turn the game around). So, what we should say is, “It would be nice to have a close score difference going into halftime, but there is no need to worry about a double-digit score difference. It’s an obvious conclusion, isn’t it?</p><p>Finally, as an appendix, I’ve included a graph showing the distribution of the score difference at halftime and the final score difference.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ukFgAbIBRNO3DA4I3ywEPQ.png" /></figure><p>Here is my twitter account. If you interested, please follow me.</p><p><a href="https://twitter.com/HYAMA_1160">https://twitter.com/HYAMA_1160</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ad46090174ea" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>