Featured post

Textbook: Writing for Statistics and Data Science

If you are looking for my textbook Writing for Statistics and Data Science here it is for free in the Open Educational Resource Commons. Wri...

Showing posts with label sports. Show all posts
Showing posts with label sports. Show all posts

Friday, 29 December 2023

Rating Systems Explained

Teams in league sports often play balanced schedules. For example, in each season of the English Premier League, each football/soccer team plays each other team in the league exactly twice - once at their home stadium, and once at the opposing stadium. That way, at the end of the season, you can merely look at the record of wins, draws, and losses to determine which teams have done the best, second best, and so on. This works because everyone has had the same opposition, so wins against that same opposition are comparable.

But what would happen if different teams played different opponents, or even different numbers of matches? This is exactly the situation in many eSports, as well as chess; individual players may play different amounts of time against completely different opponents. To compare competitors in such as situation, we can use a rating system.

 

Thursday, 17 February 2022

Peer review of "Algorithmically deconstructing shot locations as a method for shot quality in hockey"

This is an open peer review I did for the manuscript "Algorithmically deconstructing shot locations as a method for shot quality in hockey" by Devan G. Becker, Douglas G. Woolford and Charmaine B. Dean as submitted to the Journal of Quantitative Assessment in Sport, back in 2020.

You can find the manuscript behind a $42 paywall put up by DeGruyter at https://www.degruyter.com/document/doi/10.1515/jqas-2020-0012/html

 

Saturday, 30 January 2021

Lottery tickets, baseball cards, and the coupon collector's problem

A man, a woman, an enby, and 27 elephants walk into a bar. The bartender looks at the group of 30 and asks "What is the probability that 2 or more of you have the same birthday?".


The group proceeds to disregard twins, leap years, and building codes. They talk amongst themselves, leave a little space for the reader to calculate or guess for themselves,

Thursday, 21 January 2021

Fantasy Sports Explained

Information on fantasy sports ranges from the overly broad or impossible to apply like personal stories about how fantasy sports changed lives, to extremely narrow or short-lived like opinions on players recent performances. This article is intended to cover some of the middle ground to help you understand the basics of fantasy with a worked example of how you might choose players at the beginning of a league.

 

Wednesday, 11 November 2020

T1B: Goodhart's Law and Baserunning

When I was about 11 years old, I was good at running, good enough to represent my elementary school as the anchor in a relay at a district track meet. This prompted all the grown-ups in my life to coach me on running. They told me all sorts of tricks about keeping my hands flat and remembering to breathe and to keep in a straight line and to keep from dragging my feet and to start early to get the baton.

The race came and I did all those things – hands, breathing, straight line, no dragging, start early. I forgot, however, to run. I blew a huge lead by running in perfect form, but in slow motion.

What's the lesson here?

Saturday, 22 August 2020

Fantasy League Sports Cards

 

The sports card industry (specifically baseball cards) crashed in 1994. Fantasy sports existed as early as the 60's, but really caught public attention around 1995. That timing is not coincident.

In both hobbies, fans get to have  surrogate ownership of players, and the market value of those surrogates goes up or down with the performance of those players. At the casual level, being in a fantasy league is just a more publicly acceptable way to collect and play with cards. At the serious level, fantasy is a more viable, faster way to make a profit with your expertise than cards were.

In short, fantasy is just trading cards for grown ups.

But what if physical cards let you draft players?

 

Thursday, 13 August 2020

Soccer-to-Hockey Translation Guide

Hockey and soccer (ice hockey and football) are similar enough from a fan or analytics perspective that if you’re familiar with one, it’s easy to become familiar with another. There could be a whole new world of sport you’re missing out on!

In this article I’ve organized many of the parallels and contrasts between hockey and soccer so that you can watch a few games and of either one and confidently say that "hockey is just like soccer except X instead of Y".

 

Sunday, 5 July 2020

Statistics, Gambling, and Games of Chance

This is a proposal for a survey course on statistics that uses gambling extensively in examples. The target audience is senior undergraduates with a non-statistical background, but quantitative students will also find enough novelty to be interested. The goal of the course is not to encourage gambling, but to use it as a vehicle for a broad range of otherwise difficult statistical topics.

Tuesday, 30 June 2020

Cheating vs Innovation in Sports


Why do some changes in sports end up being considered cheating, and others innovation? Let's look at some historical examples for patterns.
 
In baseball, "the shift" is a strategy in which defensive players deviate, or ‘shift’ from the default locations for their positions to locations closer to where they expect the ball to land. This practice has had a measurable statistical effect on the game; hits other than home runs have become rarer, and the hits that do happen are more often singles compared to seasons before 2010. The shift is simply data-driven strategy and yet the practice is still controversial.

It seems like such an arbitrary thing to call out as unfair

Friday, 28 February 2020

First impressions of the new XFL

In 2001, the XFL, short for the X Football League* started as a sort of college-level alternate to the NHL, the premier gridiron football league in the United States. Establishing a new team is hard, let alone an entirely new league, and the XFL shut down after only one season and a ton of controversy.

In 2020, somehow, it came back.

Saturday, 9 November 2019

Basketball Data Science with Applications in R - An Advance Review

My overall impression of "Basketball Data Science" is that it's exactly the sort of book I would recommend to an instructor or able student of statistics in sport. Most of my criticisms are because it's not the book I imagine I would have written, not because the book isn't good.

Sunday, 29 September 2019

Tips to successfully web scrape with a macro


Recently, I updated the cricket simulator that I made in grad school, which entailed gathering four years of new T20I, IPL, and ODI cricket data. That's about 1000 matches, and the website ESPNcricinfo has been dramatically updated since I first scraped it. For that matter, so have the tools in R for scraping.

However, for one part, the play-by-play commentaries, nothing was working, and I ended up relying on recording and repeating mouse-and-keyboard macros. It's crude, but the loading-as-scrolling mechanic was just too hard to deal with programmatically, even with otherwise very powerful Rselenium.

Using macros to scrape pages is a trial-and-error process, but with the following principles, you can drastically reduce the number of trials it takes to get it right.

Tuesday, 16 April 2019

President's Trophy - A Curse by Design


There are lots of ways the NHL rewards failure and punishes excellence, like the player draft, ever shrinking salary caps, and the half-win award for participating in overtime, but even the way in which playoff pairings are decided has a perverse incentive.


There are three rewards to doing well in the NHL regular season:
-         1. Going to the playoffs,
-          2. A favorable first round pairing in said playoffs,
-          3. Home team advantage for playoff games more often.

Here I argue that the first-round pairings are not as favorable as they could be. 

Tuesday, 12 February 2019

Lingering questions from the 2018 MLB season

Here's a few more comments and ongoing questions about Major League Baseball that I wanted to post but didn't fit anywhere else. Just a few more weeks until spring training!

Inside: Pitch count superstitions, base coach evaluation, WAR in blowouts, and anecdotes of SafeCo.


Saturday, 26 January 2019

I read this: Smart Baseball

Smart Baseball, by Keith Law, exposes many common baseball statistics like batting average for the garbage they are. He does this in an approachable, narrative style that will appeal to long-time baseball fans. It's very light on statistics, but Law obviously knows his stuff; he just isn't interested in showing off the details.

Monday, 22 October 2018

The Last Review I'll Do For the Open Journal of Statistics

The following review is for a paper that is currently published in the Scientific Research Publishing's Open Journal of Statistics (link omitted intentionally). I accepted the responsibility to review it, found it unfit for publication, and returned a review less than a month later only to find that the paper had already been published as is.

I won't be reviewing for this journal or this publishing house again. To ask for my review, get my assent, and not wait a reasonable time (a month, really?), for the review before going ahead and publishing is disrespectful of my time. It also smacks of predatory journal behaviour. 
Was there another peer reviewer and were they qualified to perform the review? Read my review, and the paper, and judge for yourself.

Wednesday, 22 August 2018

Draft Pairing Tournament Format


Worst-vs-first pairing structures for playoffs are designed to reward teams for doing well in the regular season. Sometimes this backfires. A better system would be a 'pairing draft' in which teams choose their first-round playoff opponents in order of regular season ranking.

Give me a few minutes to convince you.


Monday, 20 August 2018

Baseball-to-Cricket translation guide

If sports were species of animals, baseball and cricket would be consider closely related, at least as close as English rules rugby is to American football. Having said that, it's been hard to find fellow fans of both sports. So, in the hopes of increasing the number of crossover fans, I've prepared the following 'translation guide' to explain one sport in terms of the other as closely as possible.


Thursday, 9 August 2018

I read this: Visualizing Baseball

What Tim Swartz teaches statistics in sports, he does so through case studies. He will take a paper such as one about the optimal times in which to substitute players in soccer and use that as a platform to demonstrate analysis of soccer data. Visualizing Baseball by Jim Albert is a collection of nine case studies most of which would be excellent for a course like Tim Swartz's.

This is a book written by a statistician for the stats enthusiast about baseball. I say stats enthusiast and not statistician because little to no stats experience is required to understand the book. Likewise little expertise about baseball is assumed, and key concepts are explained clearly but dryly.


Sunday, 13 August 2017

Sports questions - Speculation, RISP, and PEDs


What will popular sports look like in the year 2030? (All sports)

Technology is rapidly making new sports possible. 

Will improved cameras and laser gates make races with running starts viable? I would love to know how much faster the 100 metre dash can be without starting from a standstill.

Will drone racing or drone hunting take flight?  Will e-sports continue their growth and penetration into the mainstream?

Will self driving cars start competing in Nascar? Formula One? Rally car racing? Will all of these racing formats survive or maintain their scale in the next 15-20 years?

Demographics are opening new possibilities too. 

Shrinking populations and urbanization are leaving behind many otherwise livable and usable buildings as abandoned. Will terrain-based sports like airsoft and paintball take off with the abundance of good locations? Will GoPro and similar robust and portable camera make such pursuits into spectator sports?

Will we see a shift of focus towards women in sport, following the trend of tennis? Will we see mixed-sex competition in sports where size and muscle mass mean less?

Will extreme sports see a revival, led by Red Bull sponsored events like Crashed Ice and Flugtag?

What sports will decline? 

Will UFC mixed martial-arts continue to eat into the viewing market share of WWE wrestling? Why didn't Texas Hold 'em keep its hold on the public? Could the NHL (and the KHL) mismanage ice hockey into a fringe sport? Can American Football maintain its popularity in the face of growing concern over brain injury? Will American football adapt? Can golf maintain its popularity given its cost?

What about stadiums?

Instead of building stadiums for specific sports, or a limited set of sports, will new sports emerge to fit into already made stadiums? Will existing sports start to use stadiums that were built for other purposes, such as softball in a baseball stadium, or soccer football in an American football stadium?




On RISP, Runners In Scoring Position. (Baseball)

Batters do better (or pitchers do worse) when there are runners in scoring position. Why? Is it just a result of skill auto-correlation, such as a pitcher's tendency to do poorly in streaks of batters, or is it something else? Is it the distraction on the pitcher for having a batter who could steal a base or read signs? Is it the effect of the fielders having to do more than one job at once? 

A more measurable or actionable question: is the RISP advantage greater for certain batters? For example does a player with a reputation for stealing bases give a larger 'RISP bonus'  than another with ordinary base-running. Does the effect add with multiple runners? Does it change with base? Does it change with pickoff attempts? How much of this is balks being drawn?

Similarly, how should pickoff attempts be counted with regards to pitching load? My guess is that they have the effect of about half a pitch in terms of performance in that game and in that plate appearance.


What performance enhancers are 'fair'? (All sports)

A lot of drugs are banned from a lot of sports, but why? My assumption is that it makes the feats of one era comparable to another. We can take Usain Bolt's running records and compare them to the records of Donovan Bailey's in the 90's, and say with little or no argument that Bolt at his peak was faster than Bailey at his. The difference in their 100 metre dash times can isolated to the runners and not the chemical technology of their respective eras.

My assumption comes from the qualifying statements in hockey and baseball about different eras of each sport defined by seemingly minor changes in the equipment or rules of the game. Hitting feats from the 1990s seasons of MLB baseball are qualified with comments about steroid use by superstar hitters. Steroid use was allowed at the time, I presume on the basis that every player had access to the steroids.

Why is chemical technology is seen as unfair and other technology like improved running shoes is fair? Probably the hidden nature of drugs, and the related difficulty in directly regulating the 'equipment' used. It's much simpler to enforce rules about the volume of a golf club face, or the curvature of a hockey stick, rather than an acceptable dosage of steroids.

Things have gotten confusing lately.

Oscar Pistorius, whom had both his legs amputated below the knee as an infant, was until recently a competitive paralypmic sprinter. He used springy blades, described here, to run. He also wanted to compete in general sprinting competition but was barred from general competition as it was found that his prosthetic feet were more efficient for running than baseline human feet. So, even though paralypmic competition was designed to provide viable competition to those with physical disabilities, the technology used to mitigate Pistorius's disability was deemed too effective.

In January 2017, the IOC (International Oympic Committee) released the results of testing they had done on various drugs to test for performance enhancement in, of all things, chess. They found that caffeine, Ritalin, and Adderal all improved performance in double blind tests. So, if chess ever becomes an Olympic sport, should these drugs be banned and tested for? What happens if someone has a prescription for Ritalin, do they have to go without to compete?


Things are about to get a lot more confusing.

CRISPR is a technology that may have the potential to arbitrarily rewrite genetic code. If done to a human embryo to specialize the resulting human into a particular sport, what are the rules to be surrounding that? Generic editing seems like drugs and blood doping in that it's a hidden technology that would be very complicated to regulate other than to ban completely. It would be at least intended to be performance enhancing, and not every competitor would have access to the technology, at least not at first.

But changing the genetics of a person is not adding something foreign to the person, it is changing who that person is. That's who that person will be through their entire life growing up. Should we ban someone from competition for being 'naturally' too good at something as a result of a decision made before that person's birth?

Or, do we separate competitors into 'baseline' and 'enhanced' humans? This is starting to sound way more like a dystopian, racist dog show (with terms like 'best in breed') than the 'faster, higher, stronger' tone I was aiming for. It's something we collectively need to think about though, not just for sport but for all human interaction going forward.

Let's close with this thought on the subject by speedrunner Narcissa Wright: "All the categories are arbitrary".