Predicting hockey games leads inventor to law school

First-year UAlberta Law student seeks wider knowledge of logic and legal contracts

Denis Ram - 3 December 2019

Jonas Patron's journey to law school at the University of Alberta began when he tried to sell an algorithm he's invented that predicts the winners of NHL hockey games, and was frustrated by the legal language in the contracts he was offered.

"I had sent letters to the NHL general managers, basically saying that I was really interested in working with hockey analytics (using data and statistics to help teams get a competitive advantage) and had created a game-prediction algorithm," said Patron, '22 JD.

"I also sent a similar letter to a hockey analytics company. I was offered a job at the analytics company, but turned it down because the conditions of the NDA (non-disclosure agreement) they wanted me to sign seemed really crazy."

Learning the law seemed like the best next step.

"I wanted to find a profession that combined rigorous logical analyses with real-world applications," said Patron. "The experience with NDAs definitely played a role because it made it clear to me how useful and interesting the study of law could be."

Patron was earning his joint degree in math and economics from McGill University, and was seeking a way to put those skills to use in the real world, when he created a formula that can predict the winner of the NHL's hockey games 60 to 70 per cent of the time.

Inspired by the 2011 film Moneyball, which tells how the general manager for the Oakland A's baseball team acquired a winning group of players with a small budget by using computer-generated analysis, Patron began crunching hockey statistics in 2016, his freshman year.

"I grew up playing hockey, and when I was little my dad and I used to study the old Canada-Russia Summit Series and Canada Cup tournaments - arguably, some of the best hockey ever played," said Patron. "Even now, I still love playing hockey, and in fact I'm even a member of the Faculty (of Law's) competitive hockey team, the Tortfeasors."

TESTING RESULTS

Compiling data from NHL records is a task becoming easier every year, said Patron, an Edmonton native who fell in love with hockey during the Oilers' 2006 playoff run.

Still, developing the algorithm took time. During his first year of university, Patron dedicated about six hours a week to collecting data and improving his math. He continued to work on the algorithm every day of his first-year summer break and throughout his second year.

The following summer, Patron took a full-time job in Professor David Wishart's bioinformatics lab at the University of Alberta's Faculty of Science. Teaching himself how to code in different languages, he used a statistical method called logistic regression (which analyzes a dataset in which there are one or more independent variables that determine an outcome) to improve his predictor.

While tweaking the algorithm, Patron often conducted probability tests to see the chances of his results being a fluke. At its current state, there is less than a one in four million chance the predictor is only coincidentally correct, he said.

Now in first-year law school, Patron intends to keep adding more data to the predictor, potentially incorporating machine-learning techniques (such as neural networks and decision trees). But for now, his main goal is to complete law school. He hopes that by learning how to think like a lawyer he will add logic and critical thinking to his tool belt.

"This experience made it clear to me that in the same way math and programming are useful skills, so is a background in law," said Patron. "The knowledge I acquire in law school might very well help me in other fields, including finding a job related to hockey analytics."