Hi ken, your videos are wonderful. I have been going through a couple of your videos and found them quite informative & relevant. Thanks for sharing your diverse experience here and giving us a head up. Please keep putting new stuff.
@KenJee_ds4 жыл бұрын
Thanks for watching! I am glad they have been helpful!
@datalyfe53864 жыл бұрын
I never thought about simulating games before. Definitely going to give it a try!
@KenJee_ds4 жыл бұрын
Definitely do! You get some pretty fun results!
@dibs34583 жыл бұрын
Informational. Love your content, man. Keep it up!
@KenJee_ds3 жыл бұрын
Thanks for watching!
@tomkmb41202 жыл бұрын
This was a really interesting video. I'd love to see more like this.
@KenJee_ds2 жыл бұрын
Glad you liked it! I have a few more related to basketball I think. You should be able to search "basketball" in my channel to find them
@tomkmb41202 жыл бұрын
@@KenJee_ds Thanks Ken, I'll take a look!
@delt195 жыл бұрын
Very informative video. Any thoughts how to handle simulation for data that is not normally distributed. I'm thinking of player FGM, for example, that doesn't seem to be normally distributed.
@KenJee_ds5 жыл бұрын
Hi DT - If the data is not normally distributed, my favorite approach is to use re-sampling. You just randomly pick from the actual outcomes to form the distribution. Another approach is to use multiple distributions based on thresholds. You could say that if a sample is over a threshold the simulation is generated based off of a different distribution that the previous one.
@joeholleran70795 жыл бұрын
Ken, great stuff! Thanks for walking us through your simulation. Quick question: the way you calculate the score seems to skew the comparisons if one of the scores is high. For example: If one team score is say 140-139 it averages to approx 140. The other team score is 120-90. It averages 105. So the team that won by 1 gets the win in the sim cause they scored a lot of points. But the other team won by 30 and had a better defense. Do you see my point? I'm thinking you ought to subtract and return a margin of victory then compare the margin of victory. Maybe worth running simulations to see how different they are? Thanks again!
@KenJee_ds5 жыл бұрын
Hey Joe - Thanks for watching the video and responding! In isolation (1 simulation) there could be skew introduced, but since we are running the simulation over and over again, these differences should normalize. With this we should get a realistic projected outcome set. We are using GSW offense vs CLE def and CLE off vs GSW defense, so just like in any game, an offense or defense could play well and have a very high or low score. To your point, you could also have a distribution of the point differential at the end of the game; that would be completely valid. However, I don't think that this method introduces any skew (again because of the 1000's of simulations). Does this answer your question? Happy to talk more about this if I am still not getting it or am incorrect here. Feel free to reach out via email kenneth.b.jee@gmail.com Thanks! Ken
@joeholleran70795 жыл бұрын
@@KenJee_ds thanks for the quick reply! Yes, I definitely see your point. And like you said one of the advantages of the Monte Carlo is the high number of sims to allow for the probabilities to normalize. I'm working on a NBA model for a python class and am using a monte carlo sim. I'll mess around with some ideas and email you if I find anything insightful. I'm thinking it may be useful to get a random sample of the point diff THEN apply that to a random sample of the team pts scored. And then compare that to the same thing from the opponent. I'll see if this yields any meaningful changes on the probability. Have a good one, Joe.
@KenJee_ds5 жыл бұрын
@@joeholleran7079 Would love to hear what you come up with! Definitely let me know if you get different results. Good luck on the project! Again, feel free to reach out if you have any questions. Best, Ken
@delt195 жыл бұрын
Very informative video. Any thoughts how to habdle simulation for data that is not normally distributed. I'm thinking of player FGM, for example, that doesn't seem go be normally distributed.
@panosphilalithis67414 жыл бұрын
Hi Ken I was wondering where I could find the data for the latest season and before 2014 as well, I love your videos and used the nba_api but it doesn't seem to have a suitable endpoint. If you have any idea that would be so helpful, thanks!
@KenJee_ds4 жыл бұрын
I think there is an updated dataset related to this on kaggle!
@panosphilalithis67414 жыл бұрын
@@KenJee_ds awesome, can you link it if you get a chance?
@thebetter10154 жыл бұрын
Any chance you sell a simulation software like this? Or is there somewhere I could download it? Very interested!
@KenJee_ds4 жыл бұрын
Feel free to shoot me an email at kenjee.ds@gmail.com! Not currently for sale, but I would be happy to talk about a custom solution or show you how to use the code base!
@thebetter10154 жыл бұрын
@@KenJee_ds awesome. I just sent an email to you using my personal email. Thank you!
@danrich11942 жыл бұрын
I have a problem with the def game sim its telling me that im missing a ns argument
@tbnrsports1884 жыл бұрын
Hi Ken! Thank you for this video, I just used your code and built my own little model! Using 2020 data and looking back at the NBA games from back in March I would've correctly picked 9 of the 13 NBA over/unders correctly. This is a small sample size, but I believe the model I have is pretty accurate. However, I was wondering how I would make it more accurate? Like what new data points I should add to predict the score. I'm very excited about the return of the NBA.
@KenJee_ds4 жыл бұрын
Thanks for following along! Something that in theory could make it more realistic would be to do this based on minutes played for each play. You could create distributions for their points scored per minute and multiply that by each minute you expect them to play in a game. May be a little harder for the defensive type stuff, but in theory you could do the same thing. This gives a big more granularity to the simulation and could potentially be more accurate. No promises though haha!
@tbnrsports1884 жыл бұрын
@@KenJee_ds Awesome, Thank you for your help!
@surajsuresh67234 жыл бұрын
Hey Ken Can I use this model for my work. I’m thinking of creating something similar for soccer
@KenJee_ds4 жыл бұрын
Feel free to! I would appreciate it if you referenced it though!
@surajsuresh67234 жыл бұрын
@@KenJee_ds I would definitely tag you once I'm done on LinkedIn. I'm staryng to work on projects and post them. This will take time as my exams are on but will definitely tag you once it's done. Thank you so much
@KenJee_ds4 жыл бұрын
@@surajsuresh6723 Happy I could help!
@mkaberli5 жыл бұрын
Thanks for the video, but why do yo have such a small screenshot of the code? I’m watching this on an iPad and my eyesight sucks. Also, what is the point of having your image in the lower right-hand corner. Does you image make it easier to comprehend what concepts and ideas your expressing? All that negative space is distracting from your content, which is interesting e
@KenJee_ds5 жыл бұрын
Thanks for the feedback. This was one of the earlier videos I made, hopefully the more recent ones will be clearer. I also have a write-up of this if that would be easier to follow along with: www.playingnumbers.com/2019/12/how-to-simulate-nba-games-in-python/
@mkaberli5 жыл бұрын
Ken Jee: thank you. I appreciate it.
@guddusah23144 жыл бұрын
Very good video i like it
@derekjohnson54154 жыл бұрын
Great stuff!
@KenJee_ds4 жыл бұрын
Thanks for watching Derek!
@christopherchambers16224 жыл бұрын
Hi I am new to Python and am trying to set up the data and code in the program. How do i get the data over and start to work on the team stats?
@KenJee_ds4 жыл бұрын
Hi Christopher - You should put your data in the same folder as where your code is saved after downloading it from kaggle. Then the pd.read_csv('files.csv') should work. I hope this helpes!
@christopherchambers16224 жыл бұрын
Ok thanks, would using kaggle to do the sim work as well?
@jcvillainfo4 жыл бұрын
Thanks!
@KenJee_ds4 жыл бұрын
Thanks for watching!
@a_vickyp83604 жыл бұрын
#5: I come from the future, so I will answer your question: Yes, keep producing content, people will like it!!! he he Excellent video, I have some data from another sport and I'm on the EDA, but this gives me great ideas! Thank you!! #66daysofdata