Exploring Justin Verlander’s pitch type by count

2D categorical data
chi-squared test
mosaic plots

An introduction to 2D categorical data

Author

Ron Yurko

Published

July 9, 2024

Motivation

After nearly two full seasons due to injury, at the age of 39 Justin Verlander returned for the 2022 season to win the American League Cy Young award and World Series with the Houston Astros. Leading the league in a variety of statistics, Verlander dominated in his starts throughout the season. Pitch selection has played a key role into Verlander’s recent success with the Astros. Verlander throws four types of pitches (using MLB’s abbreviation): fastball (FF), slider (SL), curveball (CB), and changeup (CH). However, pitches are thrown in the context of an at-bat where the ball-strike count starts 0-0, and progresses until either the batter strikes out (reaches three strikes), is walked (reaches four balls), or is either hit-by-pitch or hits the ball in-play. As the count varies, pitchers often decide to favor certain pitches over others, e.g, with three balls (i.e., 3-X counts) the pitcher may favor throwing more accurate fastballs relative to out-of-the-zone offspeed pitches that are favored with two strikes (i.e., X-2 counts).

As defined above, pitch type and count are categorical variables. In this module, you will work with datasets of pitches thrown by Justin Verlander during both the 2019 (see 2019 Pitches tab) and 2022 season (see 2022 Pitches tab). You will learn about exploring, testing, and visualizing 2D categorical data to discover if there is a relationship between the count and the type of pitch Verlander throws.

Learning Objectives

By the end of this module, you will be able to:

  1. Create and assess different visualizations of 2D categorical data.
  2. Conduct and interpret chi-squared tests of independence.
  3. Create mosaic plots to assess relationship between two categorical variables.

Data

The dataset and description are available at the SCORE Network Data Repository.

Module

This module was created with ISLE: https://isle.stat.cmu.edu/SCORE/pitchtype/