<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://www.simulace.info/index.php?action=history&amp;feed=atom&amp;title=NBA_game_simulation</id>
	<title>NBA game simulation - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://www.simulace.info/index.php?action=history&amp;feed=atom&amp;title=NBA_game_simulation"/>
	<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=NBA_game_simulation&amp;action=history"/>
	<updated>2026-07-27T13:06:04Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.31.1</generator>
	<entry>
		<id>http://www.simulace.info/index.php?title=NBA_game_simulation&amp;diff=23457&amp;oldid=prev</id>
		<title>Prin03vse: /* Source and Code */</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=NBA_game_simulation&amp;diff=23457&amp;oldid=prev"/>
		<updated>2023-01-25T22:37:02Z</updated>

		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Source and Code&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 22:37, 25 January 2023&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l30&quot; &gt;Line 30:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 30:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=Source and Code=&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=Source and Code=&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Simulation with datasource and manipulations can be found there: https://www.simulace.info/images/MC_NBA_prin03.xlsx&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Simulation with datasource and manipulations can be found there: https://www.simulace.info/images/MC_NBA_prin03.xlsx&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;(Original datasource: https://www.kaggle.com/datasets/pablote/nba-enhanced-stats?resource=download)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;(Original datasource: https://www.kaggle.com/datasets/pablote/nba-enhanced-stats?resource=download)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=Comments=&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=Comments=&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;There can be some bugs when running a simulation. Mainly it occurs when a person opens it in English version of Excel. On my personal laptop it works perfectly, but I tried on other and it somehow crashed a couple of time (#SPILL). After some refreshes, you can get the result.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;There can be some bugs when running a simulation. Mainly it occurs when a person opens it in English version of Excel. On my personal laptop it works perfectly, but I tried on other and it somehow crashed a couple of time (#SPILL). After some refreshes, you can get the result.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Prin03vse</name></author>
		
	</entry>
	<entry>
		<id>http://www.simulace.info/index.php?title=NBA_game_simulation&amp;diff=23455&amp;oldid=prev</id>
		<title>Prin03vse: NBA MC Simulation</title>
		<link rel="alternate" type="text/html" href="http://www.simulace.info/index.php?title=NBA_game_simulation&amp;diff=23455&amp;oldid=prev"/>
		<updated>2023-01-25T22:34:50Z</updated>

		<summary type="html">&lt;p&gt;NBA MC Simulation&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Introduction&lt;br /&gt;
NBA games are hardly predictable. Although it is clear that leader has more chances against offsider, there can be situations like injuries, bad shooting or fouling out. This factors influence the result of the game. My idea is to try forecasting games' results based on individual players' statistics. It can be useful for advanced sport analytics, simulating the season and even for betting.&lt;br /&gt;
&lt;br /&gt;
=Problem definition and  Method=&lt;br /&gt;
As an input data I got a dataset for 2017/2018 season with boxscores of the games with different players' statistics. There were a lot of indicators for every team member per individual game. I had to clean the data, so the attributes that I needed for the simulation were: Player, Team, Position, Played Games, Points, Role, Arena, Minutes Played. For the simulation, I chose Monte Carlo simulation for forecasting.&lt;br /&gt;
&lt;br /&gt;
=Model=&lt;br /&gt;
As I have already mentioned, I have cleaned the dataset, so only relevant attributes remain. After this, some manipulations were needed. All the calculated fields were diveded by arena - Home or Away.&lt;br /&gt;
&lt;br /&gt;
First of all, I decided to find out in how many games individual player took part. Then I was able to calculate probability of '''missing the game''' and '''being a starter'''.&lt;br /&gt;
&lt;br /&gt;
Then I added '''points rate''' (points per minute) for each game per player, found out '''minimum''' and '''maximum''' rates and defined '''minimum''' and '''maximum minutes played'''.&lt;br /&gt;
&lt;br /&gt;
Before simulating results, I created a list called :&amp;quot;Preprocess&amp;quot;, where the exact simulation is running.&lt;br /&gt;
&lt;br /&gt;
So, if a user chooses 2 teams (Home and Away), it calculates starting 5, if player misses the game, minutes and points. There is an important constaint regarding the values: there are 5 starters and 5 positions only.&lt;br /&gt;
&lt;br /&gt;
Starting 5 is defined by the Role (starter)/Games Played. If there are several players, who were switching between each other in start, there will be a random choice.&lt;br /&gt;
&lt;br /&gt;
Minutes are calculated by random between minimum and maximum minutes played. For starting players are defined at once. There is a limit of 48 minutes per each position, so I decided to make a coefficient, which represents a part per each bench player to remaining time.&lt;br /&gt;
&lt;br /&gt;
And finally points are calculated as random between minimum and maximum player's points rate multiply minutes played. &lt;br /&gt;
&lt;br /&gt;
=Results=&lt;br /&gt;
As a result, if we combine all of the players' points, we can identify a winner.&lt;br /&gt;
&lt;br /&gt;
=Conclusions=&lt;br /&gt;
After many simulations, I ended up with conclusion, that there is a clear home advantage. Some of the results were even quite similar to real ones. But mainly starting players influence the game: if they have more minutes, there is a higher possibility of winning. It comes up from points rate, and by average starting 5 has it higher.&lt;br /&gt;
&lt;br /&gt;
=Source and Code=&lt;br /&gt;
Simulation with datasource and manipulations can be found there: https://www.simulace.info/images/MC_NBA_prin03.xlsx&lt;br /&gt;
(Original datasource: https://www.kaggle.com/datasets/pablote/nba-enhanced-stats?resource=download)&lt;br /&gt;
&lt;br /&gt;
=Comments=&lt;br /&gt;
There can be some bugs when running a simulation. Mainly it occurs when a person opens it in English version of Excel. On my personal laptop it works perfectly, but I tried on other and it somehow crashed a couple of time (#SPILL). After some refreshes, you can get the result.&lt;/div&gt;</summary>
		<author><name>Prin03vse</name></author>
		
	</entry>
</feed>