If you want to understand the complexities of machine learning, you could study linear algebra and probability theory. Or, you could watch a soccer match. In this episode, Ari Joury (PhD, particle physics; Founder & CEO of Wangari Global) takes a break from enterprise AI to preview his upcoming O’Reilly book, Soccer Analytics with Python. He explains why the fluid, chaotic nature of soccer is the perfect laboratory for understanding predictive modeling, feature engineering, and the limits of correlational data. From the evolution of Expected Goals (xG) to the bias-variance tradeoff on the pitch, Ari shows how the lessons learned from analyzing sports data translate directly to building robust AI systems for the enterprise. And yes, he will explain why your AI model is basically a confused midfielder passing the ball backward. Topics covered: Soccer analytics, Expected Goals (xG), feature engineering, bias-variance tradeoff, causal inference, predictive modeling, O’Reilly Media, Python data science, enterprise AI context. Wangari is the newsletter and podcast for practitioners and leaders navigating the real work of enterprise AI. New episodes every Friday. https://wangari.global/contact Ari’s book (O’Reilly Media, early release out now and officially out in June): Soccer Analytics with Machine Learning This is a public episode. If you'd like to discuss this with other subscribers or get access to bonus episodes, visit newsletter.wangari.global/subscribe
Audio and video play straight from the show's own hosting. PodSubs stores and serves no media.
Transcript
From the show. Tap a time to play from there.
SPEAKER_00Welcome back to Wangari. I'm Ari Joury. For the past couple of weeks, we've been deep in the weeds of enterprise AI. We've talked about the five deaths that kill AI pilots, and we've talked about orchestration, evaluation, and governance in more detail. We've also talked about Solvency 2 and IFRS 17 and the regulatory requirements for deploying AI in the insurance industry. Today, we're going to do something completely different.
SPEAKER_00We're going to talk about soccer. Now, if you're a chief actuary or a head of AI who tuned in for the enterprise content, do not turn this off. Put down the spreadsheet. I promise this is relevant for your work. In fact, I would argue that understanding how to model a soccer match is one of the best ways to understand how to model a complex business environment. Because right now, most enterprise AI models are behaving like a confused
midfielder who just realized
SPEAKER_00he's playing in the wrong stadium. Next month, right around the time the FIFA World Cup kicks off, O'Reilly Media is publishing my new book co-authored with three other brilliant authors from various leading enterprises and top tier universities. It's called Soccer Analytics with Python. The team I co-authored it with was brilliant and it's been a labor of love for the past year.
SPEAKER_00The premise of the book is simple. If you want to understand machine learning, you don't need to start with abstract mathematics. You can start with something much more intuitive, maybe chaotic, universally understood. You can start with a beautiful game. Today, I want to share some of the lessons from that book. And I want to talk about what Sucker teaches us about data science, about predictive modeling, and about the limits of AI.
SPEAKER_00Let's start with why soccer is such an interesting data problem. If you look at baseball or cricket, they're essentially discrete sequential games. You have a pitcher who throws a ball, a batter who hits or misses it, then the play stops, the players reset, the next play begins. So it's very easy, really, to pass these games into discrete events,
SPEAKER_00which makes them fairly easy to model statistically. This is why baseball analytics, the Moneyball Revolution and all that happened decades before soccer analytics. Baseball is basically a spreadsheet that occasionally involves chewing tobacco. Soccer is not like that. Soccer is continuous. It's fluid. It's chaotic. There's 22 players on a massive pitch moving simultaneously,
SPEAKER_00interacting in complex ways over 90 minutes with very few stoppages. It's less like a spreadsheet and more like a riot that occasionally involves a ball. When you try to model a soccer match, you're not trying to model a sequence of discrete events. You're modeling a complex dynamic system. And this is exactly why soccer is such a good proxy for the enterprise.
SPEAKER_00A business is not a sequence of discrete independent events, unless, say, you're working at a fruit shop or something. It's a complex and dynamic system. Customers interact with products but competitors go ahead and change their pricing and then macroeconomic conditions shift and supply chains break and everything is connected to everything else and the state of that system is constantly evolving.
SPEAKER_00So when we try to build machine learning models for the enterprise, whether it's predicting customer churn or forecasting demand or pricing an insurance policy, we're dealing with the same kind of continuous chaotic environment that we see on the soccer pitch. So how do you model chaos exactly? Well, you start by quantifying the unquantifiable.
SPEAKER_00Easy, right? Well, in soccer, the most famous example of this is a metric called expected goals, or XG for short. If you follow soccer at all, you've probably heard of XG. It's revolutionized how the game is analyzed and increasingly how it is played even. But what actually is it? Well, at its core, XG is a probability model.
It takes a specific event, a shot on goal, and assigns a probability to it. What's the likelihood that a shot taken from this specific location with this specific part of the body under these specific defensive conditions will result in
SPEAKER_00a goal? Before XG, we evaluated strikers based on how many goals they scored. Which sounds logical, until you realize that goals are rare events and they're subject to massive variance. A striker might score five goals in three games because they got lucky. The goalkeeper slipped, the ball took a weird deflection, or I don't know, Mercury was in retrograde. Or they might go five games without scoring at all because they
were unlucky.
SPEAKER_00They hit the post three times, the opposing goalkeeper played the game of their life, or they were cursed by a witch. XG stripes away that variance. It tells us not what happened, but what should have happened, based on the quality of the chances created. It separates the process, so creating good chances, from the outcome, scoring goals.
SPEAKER_00That's a really profound concept in data science. In any complex system, outcomes are noisy. If you only measure outcomes, you will be fooled by randomness. Pardon about that. You will reward lucky decisions and punish unlucky ones. You'll promote the guy who bought a lottery ticket and fire the guy who invested in a diversified index fund. So to build robust models, you have to measure the process.
You have to quantify the quality of the decisions being made independent of the
SPEAKER_00immediate outcome. In the enterprise, this is exactly what we're trying to do when we build predictive models. We're trying to separate the signal, the underlying probability of an event, from the noise, which is the random variance of the actual outcome. Now, let's go a level deeper. Let's talk about how you actually build an XG model.
SPEAKER_00If you're a data scientist, then the first thing that you have to do is decide what data to feed in your model. This is called feature engineering and it's where the art of machine learning meets the science. If you want to predict whether a shot will be a goal, What features matter? Distance to the goal is obvious, right? Angle to the goal is obvious. But what else?
SPEAKER_00Is it a header or a shot with a foot? Was it from a cross or through a through ball? How much pressure was the shooter under? Where was the goalkeeper positioned? Was the striker thinking about his impending divorce? In the early days of XG models, the features were very simple, distance and angle. These models were useful, but they were biased.
They systematically underestimated the probability of certain types of shots and
SPEAKER_00overestimated others because they lacked context. They were the equivalent of judging a restaurant solely by how close it is to your house. As the data got better, as we moved from simple event data to optical tracking data that records the position of every player on the pitch 25 times a second, the models got more complex. So we could add features for defensive pressure,
SPEAKER_00for example, or for goalkeeper position, or for the speed of the pass preceding the shot. One of the most powerful engineered features in modern XG models is what researchers call the visible goal area. This is not just the distance to the goal. It's a geometric calculation of exactly how much of the goal the shooter can actually see, given the positions of the defenders between them and the goal.
Two shots from the same distance and angle can have completely different XG values if one is taken with a clear line of sight and the other is taken with three
SPEAKER_00defenders in the way. The raw data distance and angle is the same. The engineered feature, which is visible goal area, is completely different. This is the essence of feature engineering. So you're transforming raw data into a representation that captures the true underlying physics of the situation. But here we run into one of the fundamental laws of machine learning,
SPEAKER_00the bias-variance trade-off. If your model is too simple, so if it just uses distance and angle, it has a high bias. It misses the nuances of the game, it underfits the data, it's like the guy who thinks every problem can be solved with a hammer. If your model is too complex, if it uses hundreds of features, including the color of the striker's boots and the face of the moon,
SPEAKER_00it has a high variance. It memorizes the noise in your training data, it overfits, and it might perfectly predict every goal in your historical dataset, but it will fail miserably when you try to predict the next match. Maybe the moon is in a different phase and suddenly the prediction is all off. That's the guy who built a Rube Goldberg machine to butter his toast. Finding this sweet spot,
the model that is complex enough to capture the true signal but simple enough to
SPEAKER_00ignore the noise, that's the hardest part of predictive modeling. And again, this translates directly to the enterprise. I see this all the time in insurance pricing models. An actuarial team will build a pricing model with hundreds of variables. They'll include every piece of demographic data, every behavioral proxy, every historical interaction.
SPEAKER_00The model looks incredibly accurate on the historical data. It's a masterpiece of complexity. But when they deploy it, the performance degrades. Why? Because they overfit. They built a model with high variance. They memorize the noise of the past rather than learning the underlying system or signal that predicts the future. They built a model that perfectly predicts what happens in 2023,
SPEAKER_00which is incredibly useful if you're a time traveler. but are completely useless if you're an insurance company in 2026. Soccer teaches us that more data isn't always better data. More features don't always make a better model. The goal of feature engineering is not to include everything, it's to include only the things that actually matter.
This brings me to one of the most important lessons that SOCCO teaches us about
SPEAKER_00data science, and it's a lesson about the limits of correlation. Machine learning models, at least the standard correlational models that most people use, are very good at finding patterns in data. They're very good at identifying that A is associated with B. but they're really bad at understanding why A is associated with B. Let me give you a classic example from Soccer Analytics.
SPEAKER_00If you look at the data for a typical soccer match, you will often find a strong negative correlation between a team's possessing percentage and their likelihood of winning. Let me say that again because it sounds counterintuitive. The team that has the ball more is often less likely to win If you feed this data into a naive machine learning model,
SPEAKER_00the model will learn this correlation. It will conclude that possession is bad. If you ask the model for tactical advice, it will tell you that to give the ball to the other team is the best move. It'll tell you that the secret to winning is to actively avoid playing the sport Why does that happen? Because the model lacks context It lacks causal reasoning The model does not understand the concept of game state.
SPEAKER_00In soccer, if a team scores on an early goal and takes the lead, they will often change their tactics. They will drop deep, they will defend the lead and let the other team have the ball. The team that's losing will push forward and dominate possession as they try to equalize. So the team with high possession is often the team that's losing. The high possession didn't cause them to lose. Losing caused them to have high possession.
SPEAKER_00That's the difference between correlation and causation. And it's the trap that catches almost every data science team eventually. There's a related phenomenon in soccer analytics called crossing frequency. If you look at the raw data, teams that cross the ball more than 40 times in a match tend to lose. A naive model would tell the manager to stop crossing the ball.
SPEAKER_00But the causal analysis tells a different story. Teams cross the ball 40 times because they're losing. When a team is behind in the final 20 minutes, the opponent packs the penalty area with defenders. The only way to get the ball into the box is to cross it from wide positions. High crossing frequency is a symptom of being behind, not a cause of it losing. But if you build tactical strategy based on correlation,
yeah, you will fail. You'll have to understand that the causal mechanisms are what are really driving the data.
SPEAKER_00In the enterprise, we see this constantly. A marketing team builds a churn prediction model. The model finds that customers who call the support center three times in a month are highly likely to turn. The model has found a correlation. What's a naive intervention? Make it harder for customers to call the support center. If they can't call, they'll not churn, right? Of course not. Calling the support centre does not cause the churn. The underlying problem,
SPEAKER_00the broken product, the confusing billing, causes both the calls and the churn. The calls are just a symptom. If you hide the phone number, you don't fix the churn. You just make the customer angrier before they leave. If you build AI systems based purely on correlation, you will inevitably build systems that recommend the wrong interventions. And when the getting gets more complex and a human mind can quickly get around, that can be really,
SPEAKER_00really tricky. You're basically building systems that tell you to give the ball away or to hide the customer support phone number. And that's exactly why at Wangari we're so focused on causal AI. Causal AI is a branch of machine learning that explicitly models cause and effect relationships. It doesn't just look for patterns, it looks for mechanisms. So it allows you to ask what if questions.
SPEAKER_00What if we change our pricing strategy? What if we substitute a midfielder for a striker? Standard machine learning can tell you what happened in the past. Coarsly, I can tell you what will happen if you change the future. The final lesson I want to share from the book is about context. In soccer, a raw statistic is almost meaningless without context.
SPEAKER_00Take a metric like passes completed. A midfielder might complete 90% of their passes in a match. That sounds excellent. But what if all those passes were safe, lateral passes to the defenders behind them? What if they never attempted a risky pass forward to break the opponent's defensive line? A player who completes 70% of the passes but constantly attempts difficult,
progressive passes that create scoring opportunity is far more valuable than a
SPEAKER_00player who completes 90% of safe, meaningless passes. The raw data, the 90% completion rate, is misleading without the spatial and tactical context of where those passes occurred and what they were trying to achieve. It's kind of like bragging that you have a hundred percent success rate at parallel parking, but fail to mention that you only park an empty loss. That's why modern soccer analytics has moved towards metrics
like progressive
SPEAKER_00passes, passes that move the ball significantly closer to the opponent's goal, and passes into the final third, so passes that penetrate the most dangerous zone of the pitch. These are engineered features. They require understanding the geometry of the pitch, the tactical context of the game state, and the strategic intent behind each action. They're not just counting passes, they're measuring the value of passes.
SPEAKER_00In enterprise AI, data without context is a liability. We're currently living through a hype cycle LLMs are incredible tools for processing text, but they have no inherent understanding of the context in which that text exists. If you feed an LLM a set of financial regulations and ask it to generate a compliance summary, it will produce something that looks authoritative and well-structured.
SPEAKER_00But it does not understand the economic context of the regulations. It doesn't understand the specific risk profile in your business. It doesn't understand the causal relationships between the different financial metrics that it is summarizing. So it's completing the passes, but it doesn't understand the game. It's passing the ball backwards to the goalkeeper and expecting a round of applause.
To build enterprise AI systems that actually work, you have to provide the context. You have to ground the probabilistic outputs of the LLM in the deterministic
SPEAKER_00reality of your business logic. You have to combine the language capabilities of the foundation models with the structural understanding of causal models and the rigorous validation of an orchestration layer. You have to build a system that understands not just the data, but the game that you're playing There's a useful analogy here from the world of soccer scouting Before the data revolution,
SPEAKER_00clubs relied entirely on human scouts to evaluate players The scouts would watch hundreds of hours of footage and they'd develop an intuitive sense of a player's value that went far beyond what any raw statistics could capture. The best modern soccer analytics teams do not replace these scouts with algorithms. They combine the two. The algorithms process the raw tracking data and surface the engineered features.
The scales provide the contextual domain knowledge that tells the analysts which
SPEAKER_00feature actually matters. So the algorithm handles the scale. The human handles the context. The work isn't really erased, it's just upgraded. And that's exactly the architecture that we're building at Wangari. So the LLM handles the language, the structure, the summarization, the generation. The causal model handles the reasoning, the logic, the calculation, the explanation. And the domain expert,
SPEAKER_00the actuary or the compliance officer, provides that contextual knowledge that makes the whole system trustworthy. A quick update from Wangari before I wrap up. While I've been talking about soccer today, the core focus at Wangari remains on solving the hardest data challenges in the enterprise. We're building authentic AI systems for regulatory reporting in the insurance industry.
Systems that understand the context that reason causally and that guarantee zero hallucinations. If you're a technical leader looking to bridge the gap between AI prototypes and
SPEAKER_00production systems, my upcoming course is designed for you. It's called From Demo to Production, Operationalize an Enterprise-Grade Identic AI Reporting System. We launch on June 9th. Over six weeks, we'll cover the orchestration, evaluation and governance frameworks necessary to build reliable AI systems. We'll not be talking about soccer, but we will be applying the exact same principles of rigorous
data science to the
SPEAKER_00realities of enterprise deployment. Enrollment is now open at Gen AI Academy. The link is in the show notes. And if you're interested in exploring machine learning through the lens of sports, then my new book, Soccer Analytics with Python, will be published by O'Reilly Media in June. You can find a link to the early release in the show notes as well. That's it for today. Writing this book has been a fascinating exercise in translation.
It's reinforced my belief that the most complex technical concepts can be made
SPEAKER_00accessible when framed through the right lens. You don't need a PhD in physics to understand how to build predictive models. You just need to understand the principles of probability, the importance of context, and the difference between correlation and causation. The beautiful game is more than just a sport. To me, it's a masterclass in data science. Next week, we're back to the enterprise. We're going to talk about a phenomenon that I call the slow collapse,
the silent degradation of AI systems in production and why your monitoring
SPEAKER_00dashboards are probably lying to you. Until then, enjoy the football and keep building things that actually work.
Summer is here, the soccer World Cup is in full swing, and Ari Joury (PhD, particle physics; Founder & CEO of Wangari Global) is connecting the dots between the beautiful game and the hardest concepts in machine...
People often ask how transitioning from theoretical particle physics to founding an enterprise AI company makes any sense. In this episode, Ari Joury (PhD, particle physics; Founder & CEO of Wangari Global) explains why...
For the past decade, the enterprise AI narrative has been dominated by deep learning and pattern matching. These models are incredibly powerful at answering “What is happening?” but fundamentally incapable of answering...
If you want to build a machine learning model to predict the outcome of a soccer match, the algorithm you choose is the least important part of the process. The real challenge is deciding what data to feed it. In this...
Walk into the actuarial department of any major insurance firm, and you will find some of the most highly educated, analytically brilliant minds in the corporate world. Now ask them how they spend their time. The answer...