Thank you so much, I love your videos especially with the explained code in python - it helps me learn python too and apply it in a way that I find interesting
I'm enjoying your presentations as a supplement to the book. Have you considered showing standard errors or a confidence interval around the points on the plots that relate theta and distance to the probability of a goal? I ask because that one outlier point you keep pointing out would clearly have a much larger SE and therefore CI which would show the problem of having a small amount of data in that range on the model.
Could this weird phenomenon regarding lack of data/shots on the edge of the box be related to some sort of cognitive trend of the player to either shoot when they realise they're just about to enter the box, or conversely when they are on the edge to try and make an extra step to better their chances (a completely intuitive /subconscious decision, totally unrelated to data-driven information discussed here)? Or, to make it even wilder, could it be related to the sunconsciously uncomfortable situation for many adults when 'stepping on cracks'? These are wild guesses of course and obviously the most prominent reason to investigate would be coding-related ..
i would say that the data error is not data error, but psychological effect of shot inside the Big Area. Additional, there in more shots in the semi circle, so it gives an hint about my assumption.
Hi! nice video. I'm having problems to import the data in json file it seems that needs to be payed. by any where can I see the data structure to see if I can build it? or any other source?
Had you ever tried to calculate the opportunity conversions in this probability? For example: Accurated Passes -> KeyPasses -> Assists (or Accurated shots) -> Goals Then you could see a kind of "weighted" goals shots. So when the FW misses a shot in the small area it is a bad cross (or he could not even touch the ball) and shots off the box are just shots caused by the lack of options. Anything like that.
When you say x and y coordinates where is your origin, is it the center of the goal? If so you would have zero as your x coordinate when you are in line with the center of the goal and that makes your function go to zero even though the angle is not zero.
ok got it. Wanna leave it here because it took me so damn long: x -> If the player is shooting to the goal on the right, this is distance on the x axis from left to right. y- > the distance to the shooting position on the y axis (from top to bottom) In my case the pitch is 120m long and 80m wide (Statsbomb convention) but will use PL for Pitch Length PW for Pitch Width And also remember the video is defining the goal width as b=7.32, so will use b in the formula. Under these definitions, the x,y coordinates the formula is using will be called capital X and capital Y: X = PL - x Y = PW/2 + b/2 - y These X and Y can be plugged in the formula on the video and will give you the shooting angle. If the angles are between 0 and 1 most likely you are getting them on radians so be sure to use numpy's np.rad2deg just to see nice understandable angle quantities like 20, 40 or 60 degrees. To confirm you are doing it right: a penalty shot should be 31.38 degrees approx. EDIT: FFS, my formula for Y is wrong since the video's reference point is the centre of the goal. I was using the opposite post to create a proper triangle. Well, the formula on the video works when: Y = PW/2 - y So I correct my previous comment since a penalty shot SHOULD ACTUALLY BE 33.92 degrees. Confirmed using a right triangle calculation for a shot from the penalty spot.
Plugging a shot exactly from the goal line (X=0) would be an edge case. You could replace a shot from the goal line as X=0.0001 lets say, so the function gives you approx 90 degrees. EDIT: This should give 180 degrees not 90.
EDIT: FFS, my formula for Y is wrong since the video's reference point is the centre of the goal. I was using the opposite post to create a proper triangle. Well, the formula on the video works when: Y = PW/2 - y So I correct my previous comment since a penalty shot SHOULD ACTUALLY BE 33.92 degrees. Confirmed using a right triangle calculation for a shot from the penalty spot.
Hello, How can I install FCPython in Spyder ? I got this Error: "No module named 'FCPython'". both .py scripts are in the same directory, but i cant import FC Python. What can I do ?
I have only watched up to the 15th minute so maybe this gets solved later but I have a doubt. Shots from inside the penalty area are obviously preferrable considering Xgs. First consequence should be that we all only try to shot from inside the box. At that point defences would probably cope with that better, decreasing the Xgs for shots inside the penalty area. So maybe outside shooters are sometimes part of the reason for goals scored inside the box. Correlations get very tricky
The issue with angles is that you are approaching this as every attempt is a straight shot. A leftfooted player shooting from the right needs a much smaller angle for his shot to curve into the far corner (think Arjen Robben) as opposed to a leftie shooting from the left. The probability to score if you want to put a value to it, should be much higher. Then if you were to play 4-3-3 with opposite wingers, you still need the wingback to overlap for this move to be more statistically successful.
If looking at a single variable in isolation you should just see it as a percentage rather than a probability. The data says X percent of shots from Y angle are goals. It would be foolish to say that that alone gives you an accurate probability. But the idea behind a model is that the more variables you include the more the percentage provides an accurate probability. So, maybe what you mentioned; the player’s stronger foot, should be a variable that is added to the model.
@@DanielGonzalez-xr1cp could you explain more about this? I've the same problem here. Already try to find some resources on the internet but couldn't find it
i think you guys should not use all the data but sample for the type of teams you applying off. A probability of scoring is not the same for barcelona and Granada in the same position.
Thank you so much, I love your videos especially with the explained code in python - it helps me learn python too and apply it in a way that I find interesting
My question is, how do I get event and tracking of previous week's matches to analyse
Awesome videos!!
I'm enjoying your presentations as a supplement to the book. Have you considered showing standard errors or a confidence interval around the points on the plots that relate theta and distance to the probability of a goal? I ask because that one outlier point you keep pointing out would clearly have a much larger SE and therefore CI which would show the problem of having a small amount of data in that range on the model.
Could this weird phenomenon regarding lack of data/shots on the edge of the box be related to some sort of cognitive trend of the player to either shoot when they realise they're just about to enter the box, or conversely when they are on the edge to try and make an extra step to better their chances (a completely intuitive /subconscious decision, totally unrelated to data-driven information discussed here)? Or, to make it even wilder, could it be related to the sunconsciously uncomfortable situation for many adults when 'stepping on cracks'? These are wild guesses of course and obviously the most prominent reason to investigate would be coding-related ..
@Antonio (Alfa Data) I agree 100% with your idea
Awesome explanation
i would say that the data error is not data error, but psychological effect of shot inside the Big Area. Additional, there in more shots in the semi circle, so it gives an hint about my assumption.
Hi! nice video. I'm having problems to import the data in json file it seems that needs to be payed. by any where can I see the data structure to see if I can build it? or any other source?
Can you explain how you came up with a^2=x^2+(y-b/2)^2?
Where can i find the data?
Had you ever tried to calculate the opportunity conversions in this probability?
For example: Accurated Passes -> KeyPasses -> Assists (or Accurated shots) -> Goals
Then you could see a kind of "weighted" goals shots. So when the FW misses a shot in the small area it is a bad cross (or he could not even touch the ball) and shots off the box are just shots caused by the lack of options. Anything like that.
When you say x and y coordinates where is your origin, is it the center of the goal? If so you would have zero as your x coordinate when you are in line with the center of the goal and that makes your function go to zero even though the angle is not zero.
Im doing some math on this to try to figure it out but haven't just yet. Could you solve the reference plane for x,y?
ok got it. Wanna leave it here because it took me so damn long:
x -> If the player is shooting to the goal on the right, this is distance on the x axis from left to right.
y- > the distance to the shooting position on the y axis (from top to bottom)
In my case the pitch is 120m long and 80m wide (Statsbomb convention) but will use
PL for Pitch Length
PW for Pitch Width
And also remember the video is defining the goal width as b=7.32, so will use b in the formula.
Under these definitions, the x,y coordinates the formula is using will be called capital X and capital Y:
X = PL - x
Y = PW/2 + b/2 - y
These X and Y can be plugged in the formula on the video and will give you the shooting angle. If the angles are between 0 and 1 most likely you are getting them on radians so be sure to use numpy's np.rad2deg just to see nice understandable angle quantities like 20, 40 or 60 degrees. To confirm you are doing it right: a penalty shot should be 31.38 degrees approx.
EDIT: FFS, my formula for Y is wrong since the video's reference point is the centre of the goal. I was using the opposite post to create a proper triangle. Well, the formula on the video works when:
Y = PW/2 - y
So I correct my previous comment since a penalty shot SHOULD ACTUALLY BE 33.92 degrees. Confirmed using a right triangle calculation for a shot from the penalty spot.
Plugging a shot exactly from the goal line (X=0) would be an edge case. You could replace a shot from the goal line as X=0.0001 lets say, so the function gives you approx 90 degrees.
EDIT: This should give 180 degrees not 90.
EDIT: FFS, my formula for Y is wrong since the video's reference point is the centre of the goal. I was using the opposite post to create a proper triangle. Well, the formula on the video works when:
Y = PW/2 - y
So I correct my previous comment since a penalty shot SHOULD ACTUALLY BE 33.92 degrees. Confirmed using a right triangle calculation for a shot from the penalty spot.
Hello, How can I install FCPython in Spyder ? I got this Error: "No module named 'FCPython'".
both .py scripts are in the same directory, but i cant import FC Python. What can I do ?
I have only watched up to the 15th minute so maybe this gets solved later but I have a doubt.
Shots from inside the penalty area are obviously preferrable considering Xgs. First consequence should be that we all only try to shot from inside the box. At that point defences would probably cope with that better, decreasing the Xgs for shots inside the penalty area. So maybe outside shooters are sometimes part of the reason for goals scored inside the box. Correlations get very tricky
I am unable to get the data from the link provided
The issue with angles is that you are approaching this as every attempt is a straight shot. A leftfooted player shooting from the right needs a much smaller angle for his shot to curve into the far corner (think Arjen Robben) as opposed to a leftie shooting from the left. The probability to score if you want to put a value to it, should be much higher. Then if you were to play 4-3-3 with opposite wingers, you still need the wingback to overlap for this move to be more statistically successful.
If looking at a single variable in isolation you should just see it as a percentage rather than a probability. The data says X percent of shots from Y angle are goals. It would be foolish to say that that alone gives you an accurate probability. But the idea behind a model is that the more variables you include the more the percentage provides an accurate probability. So, maybe what you mentioned; the player’s stronger foot, should be a variable that is added to the model.
Hi! Does somebody know how to install FCPyhthon?
I got the same problem...maybe you found a solution?
@@PokerSpinMaster I read with Jupiter and worked.. it doesn´t works with spyder. (for me)
@@DanielGonzalez-xr1cp could you explain more about this? I've the same problem here. Already try to find some resources on the internet but couldn't find it
Anyone else facing error when loading the json file? "jsondecodeerror: expecting value: line 1 column 1 (char 0)". Please help me. Thanks in advance.
@Antonio (Alfa Data) thank you so much Antonio!
IB math IA 😁
same bro mail me and ill share my document with you so we can share ideas.
Hey David, I'm really sorry about Tobias :(
i think you guys should not use all the data but sample for the type of teams you applying off. A probability of scoring is not the same for barcelona and Granada in the same position.