Alteryx: Modeling Random Chance on the Football Field or in The Mission Planning Arena
From IC Insider Alteryx
The 2023 NFL Season is well under way and in many instances the success of your team could be the result of random chance on the field. And as much as random chance can impact the outcome of a game it can also have a profound effect on the outcome of a mission or operation. This blog starts with a simple question:
How do you model random chance into a particular outcome or process?
What do we mean by random chance? In sports, for example, sometimes, even when a player is ‘supposed’ to win, they don’t. Like the famous ‘Helmet Catch,’ in the 2008 Championship Game where a player pulls off something incredible, even though the numbers say it’s nearly impossible. That’s a random chance. Something that wasn’t supposed to happen happened, which is a big reason why we love sports.
As complex as modern football data and analytics are, accounting for things like random chance is difficult. But there is a tried-and-true way that game designers have been modeling random chance into games for decades: DICE. That simple square piece of plastic you use in Monopoly, Yahtzee, or Craps is a highly effective tool for modeling random chance. Let’s explain by walking through an example using the video game Madden NFL Football.
Using Dice to Model Chance
Take two characters in the game that face off in some way: a wide receiver and a defender. Whether the wide receiver catches the ball is determined by a combination of the two players’ skill abilities and, you guessed it, random chance calculated using a dice roll. Every play inside Madden NFL football works this way; the 2 characters will have ability scores, and the dice roll will determine the encounter’s outcome.
In a 2015 FiveThirtyEight article, Rex Dickson, Madden’s creative director, described how Madden works:
“The way the game works on a high level is that when two players run into each other and are about to do an interaction — let’s say it’s a ball-carrier and a linebacker — it’s going to take several ratings and throw them into a formula and do a dice roll. The dice roll is how we get the randomness. So, it’s basically his break-tackle chance against your tackle chance, and then a dice roll on top of that. The rating mismatch is your modifier on the dice roll.”
This seemingly simple process pays off in modeling accuracy and predicting the future. Every year, EA Sports releases its NFL franchise game ahead of the start of the season. When they do this, they also run simulations of the season to determine who will end up in the Super Bowl. Running play after play across all game matchups until the season ends with two teams left in the Super Bowl.
Madden NFL has added more player metrics and rankings that have become increasingly complex over the years and has even begun incorporating AI into its gameplay and player models. Today, it’s as accurate a simulation of an NFL game as you can get, and it shows. Since 2017, Madden NFL’s simulated seasons have accurately predicted the two teams that will end up in the Super Bowl with 100% accuracy. Imagine being able to predict something like this with 100% accuracy for your business!
Using Random Chance for Mission Outcomes
So, how is all this related to your organization? Let’s look at it this way: How do you model random chance into a particular outcome or process your organization undertakes? How could this improve decision-making in your organization?
Adding randomness into your model training data gives you a more accurate determination of a particular outcome. If you were trying to predict whether an All-Star Wide Receiver would catch a ball over a mediocre defender, then basic data analytics would tell you they would catch the ball 100% of the time. But that’s not real life; sometimes, the better player drops the ball. The same goes for your business; sometimes, things happen that aren’t supposed to happen.
For instance, a supply chain is sometimes disrupted by a random event, a traffic accident, a blizzard, or other delay. With all its complexities, a supply chain is vulnerable to random events.
The impacts of random events on supply chains are cascading, meaning that a slight delay in one step will flow into the next step, causing a cascade of delays that ultimately end up in a binary outcome: delivered on time or not. So, vital material may not be delivered on time impacting mission parameters.
Another example is in Human Resources. Consider a highly productive and promising employee who suddenly leaves the company. Or some unforeseen event takes place that impacts their ability to work. How do you model the ability to work? Events in the real world are random and can significantly impact operational outcomes.
Using Alteryx to create better model training data
So, how can Alteryx help? Well, believe it or not, Alteryx can produce randomness by using a dice roll! We can create a workflow to simulate a scenario like catching a ball (or any other outcome) using player ranking data from Madden NFL 2019.
And the workflow is more straightforward than you might expect. We can use formula tools and prep and blend tools to run this simulation. No complicated or advanced tools are required. Let’s see how it works:
First, create a three-dice roller. You can start with this community challenge. The workflow abbreviates the dice roller as ‘3d6’, meaning three dice are rolled with 6 sides. Add three text input tools with numbers 1-6 to represent an individual die. Then we append all fields together:
To roll the dice, add a random sample tool and configure it to choose one record:
Next, we add a text input to calculate the modifiers:
What’s important to note here is the ‘multiplier’ column. This will determine the encounter’s outcome by multiplying that number against player ratings mismatch. For example, if the Wide Receiver has a catch score of 95, and the defender has a defend score of 70, then the encounter is -25 points in favor of the Wide Receiver. But, if the dice roll is 3, and you multiply that -25 by -1, then the defender’s disadvantage becomes a +25 point advantage, meaning they will successfully defend the pass. But rolling a 3 is very hard, so it won’t happen often, which is how we account for those ‘rare’ moments. Notice the more common numbers like 10 and 11; it’s more even and favored toward the receiver.
So then all we have to do is see which player scores higher over the other, which can be done in a multi-row formula, and viola, you have the outcome:
Using this method, we ran over 350 plays simulating catch or drop for these two players. The ‘virtual’ catch percentage for Da’Vante Adams was 56.8%. Da’Vante Adam’s real-world catch percentage from the 2022 season, which was 55.6%. Incredible. Adding the randomness of the dice roll and modifiers enabled us very accurately model Da’Vante Adam’s catch percentage for an entire season.
This dataset of catches and drops can be used as training data for models of Dae’Vante’s performances throughout an entire season. Adding that randomness improves the quality of training data for video games and your mission planning scenarios. This has many use cases, from supply chain performance, to mission planning, and risk mitigation.
So, explore how adding this fun and effective method of modeling randomness into your model training data can help your organization model outcomes more accurately.
Discover the power of sports analytics and how it translates to business insights, visit the Alteryx Fanalytics page. Try Alteryx sports analytics templates to predict game outcomes, analyze player stats, and more with the Alteryx Fanalytics Starter Kit.
Photo credit:
Photo: https://unsplash.com/photos/football-players-in-blue-and-white-jersey-shirt-HiDcs2pIU3k
About Alteryx, Inc.
Revolutionizing business through data science and analytics, Alteryx offers an end-to-end analytics platform that empowers data analysts and scientists alike to break data barriers, deliver insights, and experience the thrill of getting to the answer faster. Organizations all over the world rely on Alteryx daily to deliver actionable insights. For more information, visit www.alteryx.com.
Alteryx is a registered trademark of Alteryx, Inc.
About IC Insiders
IC Insiders is a special sponsored feature that provides deep-dive analysis, interviews with IC leaders, perspective from industry experts, and more. Learn how your company can become an IC Insider.