Statistical Science


Episode 7 Transcript

Tim Swartz  0:17  
Hi, Terry. Good evening.

Terry Soo  0:19  
Well thank you very much for joining us tonight. And so nice to see you again, after so many years. Just I took your course, stat 270 at SFU. I think 2000. Spring my second semester. You probably don't remember [me].  But I do remember your course. And obviously, I got a lot out of it. So I'm very happy to be speaking with you today and catching up with you. I was a first year student in 2000. What stage of your career were you at, at that time?

Tim Swartz  0:49  
Okay, 2000. I've been around for a long time. I did my PhD and 86 in August of 86. And in August of 86, they started at SFU. And I've been there ever since. So that would have been 14 years later, I think I was a new full professor at a time in Canada, we have the assistant professor, associate professor and full professor. So I had made it to full professor and 270 was one of my favourite courses because it's really tight. It's an introduction to probability and statistics. The students are good. And I even wrote a book for the course.

Terry Soo  1:31  
Oh, you guys are used, so when I was there, I don't think you [had the book yet], you had a lot of notes. But I don't think you had the book yet.

Tim Swartz  1:36  
Well, we had a book and it was the book by DeVore. And at the time, it was $286. And I felt some sympathy for the students. So I took my course notes and created a book. My daughter did the art design for the cover, and we sell it for $25.

Terry Soo  1:57  
I bought a used copy of I think I fourth edition. It was sort of a maroon colour. It was $80 I bought a used copy. I have a copy sitting here from when I taught a version of Stat 270 At university Victoria, edition five. Yeah. So you mentioned you got your PhD. Where did you do your PhD? 

Tim Swartz  2:14  
My PhD was at University of Toronto before that. I was at University of Waterloo, Kitchener Waterloo or Twin Cities. Kitchener is my hometown. So I was born, raised and trained. And I've done all my, my career has been in Canada. So I started out at University of Waterloo where I did a Bachelor in mathematics. Waterloo is, I think, one of the very few universities in the world that has as a Faculty of Mathematics. And then I went to Toronto for an MSc and PhD studies. And I worked under Mike Evans, Mike was very young at the time I was his first student. And we worked on computational problems, some inference, we eventually wrote a book together an Oxford University Press book called approximation of integrals that has a longer title than that. So yeah, I was there, from 83 to 86. I did those graduate degrees quickly, and then came up to SFU.

Terry Soo  3:18  
Also, SFU was your first real job? And that was the tenure track job. 

Tim Swartz  3:23  
Yeah.  So that was interesting, because, you know, at the time, I was teaching courses that I hadn't even taken myself. So, I was teaching and learning at the same time. And, you know, we were all young once. So I was very, very young back then.

Terry Soo  3:39  
So you mentioned you did a PhD in computational statistics. So this is like, so I'm not a real statistician, right. So this is like MCMC, I guess.

Tim Swartz  3:47  
Yeah. So, my career probably had the two main threads I had, probably the first thread was was Bayes. And then the second thread is the sports analytics. And maybe that's the thing that I've done. That is a little unusual. I was at Toronto from, as I said, 83 to 86. And this was a period when Bayes was gaining attention, because we now had access to personal computing. And also there was development of algorithms that allowed us to do Bayesian statistics in particular. Well, you know, things like Gibbs sampling and Metropolis algorithm. It was a very, very good time and to be in that area. I worked on some theory, I worked on applications there were lots of applications where, you know, something was a little bit difficult in a classical sense, but all of a sudden, if you switch things around a Bayesian analysis gave you immediate results. And so it was it was a very good period. And later on, you know, I've always had this passion for sports participation in sports and while at SFU, I had lots of Master's students who did projects at the end of their degree, and I would get them involved in sports projects. So this was this was my hobby. And I would say, probably around 2005, sports became my primary research focus. And I've been writing sports papers ever ever since.

Terry Soo  5:25  
So I saw when I was just before I graduated, you know, I used to be such a keen student, I would check on professors, websites and stuff like this. And I saw on your web page that you had a paper that said, I tried to read at the time, I wasn't, I don't think I knew enough math to read it, that the goalie should be pulled out, way before. So just for the people listening, in hockey, we know that you can pull the goalie out because the goalie is not that great a scorer. And at some point, if you're really behind you pull the goalie out for an attacker, for the extra attacker, we say, and lots of times this is done at two minutes. Right? So if I'm losing three-one, you know, 18 minutes third period, I guess I might pull my something that I might pull my goalie and then you would you did analysis that said, you should pull the goalie at four minutes, right, is this right?

Tim Swartz  6:13  
Yeah, I think that's that's about right. But actually, the tradition had been to pull your goalie with less than a minute to go. Yeah, and, you know, we received a lot of attention for that paper. And I think the reason is, because it's, it's counterintuitive, when you pull your goalie and you have an empty net, it's quite likely that the other team will score on you. But that kind of misses the point, because you're going to lose the game anyway. So you might as well take a chance with an extra attacker and score the goal. And this was picked up by Patrick Roy, in particular, he was coach of the Colorado Avalanche. And he did it a few times, and had a lot of success. And he was in the news. 

Terry Soo 7:00
Also, Patrick Roy actually used this!

Tim Swartz  7:02
We sent him our paper, when he was still in the Quebec major Junior Hockey League as a coach. So I don't know if he ever read it. But he he did start pulling his goalie much earlier than what had been done in the past. And so that, if you if you look at the times, now the average times when, when teams will pull their goalie when they're trailing by one goal, I think they'll, they'll do it. You know, with maybe two minutes, two and a half minutes left. And I think our optimal time in the paper was, was three minutes. So these are the kinds of problems I like; I like sports analytics problems, were the solution. The advice differs from tradition. I think that's really a lot of fun when you find a result like that. So those are, those are the problems that that attract me. And you know, I watch sport a lot when on television, and I see things and I kind of asked myself, is that right? And, you know, sometimes we investigate these with data and statistical methodology.

Terry Soo  8:07  
So I'm quite jealous. So Patrick, you said Patrick Roy read you paper and then he actually followed your advice. And this is just for context. Guys got six Stanley Cups or something? That's right?

Tim Swartz  8:16  
Yeah, okay. So I don't want to say he followed our advice. I can tell you that we sent him the paper. I don't know if he read it, read it. But he did start pulling the goalie much earlier than than other coaches. 

Terry Soo  8:30  
This is a big deal, right? Because Because he's a legendary goalie himself. Right?

Tim Swartz  8:34  
He won the Vezina trophy. He was an outstanding goalie for the Montreal Canadiens. And then he had this coaching career.

Terry Soo  8:42  
So from what I understood was that he wouldn't be able to be chosen for Team Canada, because this guy is so much ego, that he could not get replaced at some point, right. And this is what happens in Canada, right that the goalie, the top goalie always gets replaced, right that this is using that because it's you know, all these guys are still so high up there. This is, you know, I gotta bring up this talk, I saw you give a talk in Victoria, was one of your former students, Min [Tsao]?

Tim Swartz  9:04  
I didn't supervise Min, Min Tsao, but he was a graduate student at the time I was there. And I remember I had Min in a class, a class with three students. So those were the good old days when you could run a class that was really, really small, they would let us do that anymore.

Terry Soo  9:21  
So he invited you to talk and then obviously, I knew nothing about statistics, and he goes: Okay, look, Tim is gonna give a really general audience talk and obviously this is because it's the math department right? Because you know, math people need to be blown away by things they don't understand right?  Like this is at my request that he's gonna give this talk and that was that was one of the best talks I saw when I was a postdoc in Victoria and you held up something about hockey, so you ran a gambling ring or something like this, right? You have these odds in a very calm ways and notice that does not add up to one or something like this for and what was the team you were cheering for? I guess you were cheering for?

Tim Swartz  9:54  
Well, when I when I was a kid, I always cheered for the Toronto Maple Leafs. That was Toronto was only an hour and a half drive from from Kitchener, Waterloo, gambling and sports are intertwined. Especially in the UK, gambling is a bit of a taboo subject in Canada, or at least it was I remember, when I was a child, the only thing you could gamble on was maybe bingo, but now you can gamble on everything. And I'm really hesitant to say much about gambling because I'm very aware that you know, there's gambling addictions, and bookmakers exist because they make money and therefore most people end up losing. But it's interesting probabilistically. You know, now there's in game betting, you know, correlations come into play, these are statistical ideas. And I can tell you that one of my students has made millions of dollars gambling, and I've had other students who've made on the order of $50,000  gambling. So I talked to them, but I'm not really the gambler, myself. I'm interested, but I don't really gamble much.

Terry Soo  11:07  
I obviously didn't pay enough attention in Stat270, I really missed out of these millions.

Tim Swartz  11:14  
So what happens in sports gambling, especially if you're doing internet gambling, is that when there's a weakness in the system, the sports books, identify it, and then remove the weakness. So what my former student did, where he made a lot of money, and he's still making money, but in different ways, but at the time, what he did was he would look at different sports books, and identify arbitrage opportunities. So if there's a Team A and Team B, and he happened to find odds where you bet $100 on Team A, and if you win, if they win, you win $105. And then at the other internet, if you bet $100 on Team B, and they win, you win $105. So that means you can't lose, if you make $100, that's on each side, you're going to win $5. But you know, he would make bigger bets than $105. And he would do this every day, day after day. Now the sports books are communicating with one another, there's a service called Don best. And when people come in and make large bets, which adjust the odds, all the sports books, adjust their odds accordingly. So these opportunities of arbitrage are less frequent than they used to be. So that's one way he made money.

Terry Soo  12:37  
I'm surprised this existed, actually; you figured they'd be smarter than that?

Tim Swartz  12:41  
Well, this was in the early days, right? So the sports books that didn't have sharp lines, they went out of business, maybe they took your money, because they were all offshore sports books. But you know, there's other systems that people use thing is, it's very hard to beat the sports books. And the lines or the blinds are very sharp for most major sports. And you need to sort of have inside knowledge, you need to know if LeBron James has a cold. And maybe he's not going to be playing so well tonight. And we don't know these things. So I don't actually recommend it to anyone. But for an introductory course, there's lots of probabilistic concepts. And yeah, I teach some of these things in some of my sports analytics courses.

Terry Soo  13:29
So I grew up in Vancouver at Hastings and Renfrew. So this is right next to the PNE, and there was a racetrack there, my father would bring me to the racetrack. So I learned a little bit about live odds and with this kind of stuff, and sometimes I had some vision of what I thought were the platonic odds. So the race schedule and the morning line odds and then use the word platonic, but I thought those are the real odds somehow and then as people bet the odds would change of course and then I thought well, that's just because the track has to make money but these are the real actual odds somehow I don't know where they would get those from sometimes you know, a horse would be on the manual and it'd be like you know, rarely ever would be more than 20 to 1 right because they weight the horses so that the races are exciting, right? They wouldn't put a 20 to 1 horse next to one that was 1 to 1 or whatever. So you will see a 21 to 1 horse sometimes and then sometimes on the betting it will go to 99 to 1, no one was betting on it. Now maybe these guys knew better. The horse was sick or something like this. But I always kind of believed that, well, they just this was almost arbitrage as far as I was concerned because there's no way, there's six horses running, how can this house be 99 to 1, it was 17 to 1 in the manual 20 minutes after the horses walked around, they run the horses around and people look at them, inspect them and make other superstitious judgments. I don't see how a horse go from 20 to 1 to 99 to 1, but okay, I was I was a kid and so I never would bet my $2 on the 99 to 1.  Do you have any thoughts on this?

Tim Swartz  14:47  
Yeah, so racetrack betting is a little bit different. The way it works is everybody bets and then the race track returns 80% of the pot to the winners. So you can see that the racetrack never loses when you bet on a sporting event like cricket match or a football game, whatever law odds you lock in, are the odds that you're going to be paid at. So if there's lots of us betting on a certain team, it's actually possible for the sports book to lose. So the race track will never lose. But the sports book with these other sports can lose.

Terry Soo  15:23  
Oh, so they don't fluctuate, because this what I thought happens.

Tim Swartz  15:25  
They do fluctuate, but once you've made your bet on a soccer game or football game, you get the odds that you bet at and what happens in the horse races? Is that the big better is that they tend to bet at the last minute, 

Terry Soo  15:40 
Yeah, they don't want to give themselves away, right? 

Tim Swartz 15:42 
Yeah. And then there's other people who believe that these are people with knowledge, so they try to follow what they're doing. There's a lot of psychology in there. But I think winning at the race track, again, extremely difficult. In fact, that they only pay out 80% of the pot, you know, really makes it difficult. So I'd say stay away from the race courses.

Unknown Speaker  16:07  
UCL minds brings together the knowledge, insights and ideas of our community through a wide range of events and activities that are open to everyone.