Get Goalside football analytics blog

Subscribe
Archives
December 2, 2022

An OpenAI Q&A about expected goals

On Friday evening I started seeing tweets about OpenAI's ChatGPT which were the usual case of tech-y people playing with a new toy and tweeting about it. I hadn't ventured into OpenAI's free selection box of features yet but this pulled me in to start messing around with them.

What follows is from their general text generation beta. It isn't really worth putting out as a regular newsletter, but I figured it'd interest Get Goalside's paying subscribers. It works very simply: I type a question, it produces a response.


Q: What is expected goals and why do people use it?
A: Expected goals (xG) is a metric used to measure he quality of a shot taken in a soccer match. It is calculated by taking into account factors such as the location of the shot, the type of shot, and the angle of the shot. The metric is used to measure the quality of a shot and to compare the quality of shots taken by different players. It is also used to evaluate the performance of a team or individual player over time.

Q: Are there any improvements that can be made to expected goals models?
A: Yes, there are several improvements that can be made to expected goals models. For example, the models can be improved by taking into account more factors such as the speed of the shot, the type of pass that led to the shot, and the defensive pressure on the shooter. Additionally, the models can be improved by incorporating more data points such as the number of shots taken in a game and the number of shots on target. Finally, the models can be improved by using more advanced machine learning techniques such as deep learning and neural networks.

[Mark: Being picky, I think its first answer was giving me 'what' xG is used for more than 'why', but ah well. The answer to the second question could be drawn almost directly from [redacted]'s marketing literature]

Q: What is a neural network?
A: A neural network is a type of machine learning algorithm that is modeled after the human brain. It is composed of interconnected nodes, or neurons, that are used to process data and make predictions. Neural networks are used in a variety of applications, including image recognition, natural language processing, and autonomous driving.

Q: Can expected goals tell us which strikers are good finishers? [Yeah, I decided to see how it would cope with this]
A: Yes, expected goals can be used to measure the quality of a striker's finishing ability. By looking at the expected goals of a striker's shots, it is possible to determine how often they are able to convert their chances into goals. This can be used to compare the finishing ability of different strikers and to evaluate the performance of a striker over time.

Q: How large a sample would we need to identify the quality of a striker's finishing ability?
A: The size of the sample needed to identify the quality of a striker's finishing ability depends on the accuracy of the expected goals model being used. Generally, a sample size of at least 50 shots is recommended in order to get an accurate assessment of a striker's finishing ability.

[Going to break my chronological Q&A here. As I was putting this into a post I realised that I could simply ask it where it was getting this '50 shots' recommendation from]

Q: What is a good citation for the recommendation to wait for a sample of 50 shots on a striker's finishing ability?
A: A good citation for the recommendation to wait for a sample of 50 shots on a striker's finishing ability is "Expected Goals: A Comprehensive Guide" by Michael Caley (2020).

[An internet search for '"Expected Goals: A Comprehensive Guide" michael caley' produced nothing, so I think I just got an invented article from OpenAI presented in a citation format. Oops. Back to my original Q&A]

Q: How many matches would it take for a striker to get to 50 shots?
A: This depends on the number of shots taken by the striker in each match. Generally, it would take between 5 and 10 matches for a striker to take 50 shots.

[This is... not true, unless you were putting prime Lionel Messi in 'prime' Andres Villas-Boas Tottenham. I then kinda got into an argument with OpenAI by asking it some questions it wasn't really equipped to answer. After three of them I decided I wasn't going to get anywhere and finished things up]

Q: To what extent does the team a player is on affect their finishing ability, if at all?
A: The team a player is on can have an effect on their finishing ability, as the quality of the team's passing and attacking play can influence the quality of chances a striker gets. Additionally, the quality of the team's defense can also affect a striker's finishing ability, as it can make it more difficult for them to get into good shooting positions.

Q: I mean how well a striker scores compared to expected goals. Does the team they're on affect their ability to score more (or fewer) goals than xG?
A: Yes, the team a striker is on can affect their ability to score more (or fewer) goals than expected goals. The quality of the team's passing and attacking play can create better chances for the striker, which can lead to more goals than expected. Additionally, the quality of the team's defense can make it more difficult for the striker to get into good shooting positions, which can lead to fewer goals than expected.

Q: But wouldn't a striker struggling to get into good shooting positions mean a lower xG? They might still finish at a rate higher than expected goals, even if the opposition defence is limiting the chances they get, right?
A: Yes, a striker struggling to get into good shooting positions can lead to a lower xG. However, they may still finish at a rate higher than expected goals if they are able to take advantage of the limited chances they get. For example, if a striker is able to take more difficult shots and convert them into goals, they may be able to finish at a rate higher than expected goals.

Fin.


It's pretty interesting, although I guess it's 'only' a case of scraping the internet and returning that information into human-readable answers. It made up a citation!

The 'strikers generally take 5-10 games to get to 50 shots' is funny because the easy way to answer that, as a human, would be to check the average number of shots per game and divide 50 by that. I guess it might just be getting '5-10 games' from articles where xG use is mentioned? But if a user encountered that kind of incorrect interpretation on a pretty simple factual question, it'd probably be a big hit to their trust in the overall responses.

On the last three questions intrigue me, I kind of assumed that it would retain the same notion of 'finishing ability' throughout the exchange (which, in hindsight, is probably silly). Its answer to my initial question sounded to me like it was talking about 'xG minus goals', but in the penultimate question it was like it was talking about pure xG per game.

Overall: like talking to a pretty eloquent person who'd done a decent amount of reading around the subject, but was still clearly making some things up and wasn't capable of much, if any, original thought.

Don't miss what's next. Subscribe to Get Goalside football analytics blog:
This email brought to you by Buttondown, the easiest way to start and grow your newsletter.