Author: Jonah Hofeld – Applied Mathematics Major at Boston University and Cornbelters Analytics Intern.

Introduction

In my previous article, published in early June, I utilized Prospect League Trackman data to build a model that identified the pitch characteristics that are most predictive of inducing a whiff across seven different pitch types. We found that breaking balls dominate whiff generation and are driven by induced vertical break and spin. While this analysis was intriguing, it was limited in the sense that all pitches were treated equally, regardless of when they were thrown.

Over a month and 94,224 pitches later, the dataset has nearly tripled, creating an opportunity to revisit this whiff question from a different angle. We now ask how the count context changes what pitches generate whiffs, and how often? With this expanded dataset, I’ve built separate logistic regression models for each pitch type across three distinct count categories that are explained below. These models aim to help us understand how to increase the likelihood of eliciting a whiff from a situational perspective.

Before diving in, it is important to note that all models in this analysis predict whiff probability conditional on the batter swinging. Whiff% is defined as swing and misses divided by total swings. This means the analysis captures what happens on swings only.

Data & Count Context

This analysis uses Trackman data from all Prospect League games up to 7/13/2026, including over 94,000 pitches across seven pitch types. This is a significant expansion from the first article, which covered roughly 28,000 pitches from the first two weeks of the season. Therefore, this large sample gives the results of this analysis significantly more credibility.

As we know, all counts are not created equal. When a pitcher is ahead, it is advantageous because the pitcher can operate from a position of strength and usually can expand the zone and therefore throw more kinds of pitches varying in shape and location. A hitter who is ahead in the count can be more selective, hunting for certain pitch types and locations. These scenarios produce fundamentally different swing decisions and whiffs, which is the central motivation for our analysis.

To capture this, we group the twelve possible pitch counts into three categories:

  • Pitcher Counts (0-1, 0-2, 1-2, 2-2): Pitcher advantage. Hitters are forced to expand their zone and protect.
  • Neutral Counts (0-0, 1-1, 3-2): Neither side is clearly advantaged.
  • Hitter Counts (1-0, 2-0, 2-1, 3-1): Hitter advantage. Pitchers are forced to throw strikes while hitters can be more selective.

Note that 3-0 counts have been excluded from this analysis due to small sample sizes across most pitch types.

The table and chart below show us how pitch mix shifts across these count categories. In the hitter counts, four-seamers account for nearly 70% of all pitches thrown. This is because pitchers need strikes in these counts, and a fastball is the most controllable pitch. Naturally, as counts move in the pitcher’s favor, the mix diversifies.

Count4-SeamChangeupCurveballCutterSinkerSliderSweeper
0-04403585464324585114985
0-119545034251892351012112
0-211322703078810658871
1-0289918113818134239820
1-1213634640419128079286
1-21549544547137166963116
2-011975646651331198
2-1165013015210719734825
2-2178240448014120482882
3-081412940
3-11029393050114884
3-2180113420111419243638

The Model

For this count-level analysis, we again choose to utilize a logistic regression model for each pitch and count environment. This gives us 21 models in total, where each model outputs the probability of a whiff for a given pitch and count environment. Again, the methodology follows the sigmoid function:

(whiff)=11+ez\mathbb{P}(whiff) = \frac{1}{1+e^-z}

Where z is a linear combination of pitch characteristics and their learned weights:

z=β0+β1X1+β2X2+...+βnXnz = \beta_0 + \beta_1X_1 + \beta_2X_2+ …+ \beta_nX_n

Each XiX_i is a feature representing a pitch characteristic like induced vertical break, velocity, spin, etc, and each βi\beta_i is the coefficient or linear weight that the model has learned for that feature.

All features XiX_i are then normalized to a resulting XiX^*_i with mean zero and variance one, putting all features on the same scale so that coefficients are directly comparable.

One methodological improvement from our last analysis was the implementation of a test-train split. The model uses an 80/20 split, meaning it is trained on 80% of the swings in a given pitch type and count bin, then evaluated on the 20% of swings that it never saw during training. This gives us a way to measure model performance after training.

The table below shows how well the model performed on the test data that it hadn’t seen before. An AUC (Area Under the Curve) of 0.5 is random, while 1 is a perfect prediction.

As we can see from the table, breaking balls are again the most model-predictable pitch types across all counts. The curveball and slider have AUC scores above 0.72 regardless of the count, meaning pitch characteristics reliably distinguish whiff outcomes on these pitches. The sinker is the clearest outlier with AUC values of 0.503, 0.516, and 0.462 across three bins, which is effectively random. This shows us that factors beyond stuff characteristics drive sinker whiff outcomes. The AUC of 0.462 specifically reflects that sinkers thrown in hitter counts are meant to induce weak or ground ball contact, and that no combination of features will reliably predict a whiff. Additionally, the hitter count sweeper (n_test = 12) should be disregarded because no real conclusions can be drawn from a sample size this small.

Results

The heatmap below is the central output for this analysis. Each cell shows the model-predicted whiff probability for a given pitch type in a given count bin, computed by holding all pitch characteristics at their mean values for that specific pitch type and count combination. This gives us the model’s baseline prediction for a pitch with average characteristics.

Standout findings:

  • Curveball in hitter counts (34.6%) is the most dangerous pitch/count combination in the model. Despite being thrown only 6.5% of the time when hitters are ahead, the curveball generates the highest predicted whiff probability of any pitch in any count. This is an intriguing finding, though it brings up an important note. These models predict whiff probability conditional on the batter swinging and do not account for whether hitters choose to swing at curveballs in hitter counts or the value of called strikes. A complete picture of curveball value in hitter counts would require incorporating swing decisions and overall pitch outcomes.
  • The slider is effective in every count bin. Predicted whiff probability moves slightly from 28.8% in pitcher counts to 31.1% in hitter counts, showing productivity across all counts and value since it can be thrown whenever.
  • The 4-Seam steadily declines from pitcher to hitter counts, which is plausible since hitters tend to sit fastball in favorable counts and make better contact. No surprises here, but worth the check.
  • Changeups peak in neutral counts at 31.2% predicted whiff, which is an interesting finding. This means it is most effective when neither side has a clear advantage, perhaps because hitters are looking for a fastball in these counts and are fooled by the velocity change.
  • Sweeper drops sharply down to 23.4% in hitter counts. This is because when hitters are ahead and can be selective, the sweeper loses its edge since hitters won’t chase it as often. As expected, the sweeper does exceptionally in leverage counts, but drops when the hitter is ahead.
  • Sinker has the lowest whiff counts across the board, which again makes sense as we already established that sinkers are not whiff pitchers.
  • The cutter is very count-dependent, dropping four percentage points from pitcher to hitter count. It is also worth noting that the hitter-count counter AUC is 0.579, meaning the model sees almost no correlation between features and whiffs in these counts. For a collegiate summer league like the Prospect League, cutters are quite similar to fastballs in shape, and therefore hitters can cover them when they’re ahead.

Model Evaluation

Predicted vs. Actual

The scatter plot below compares the model’s predicted whiff rate to the actual whiff rate on the test data for each pitch type and count environment combination. Points on the dashed line represent perfect prediction. Points above the line mean the model overpredicted, while points below mean it underpredicted.

Overall, models with large training samples perform well. 4-seam, slider, sinker, and neutral curveball all fall within 2 points of the diagonal. The largest deviations are concentrated in small-sample combinations. One example of this is the neutral sweeper (n_test = 42) shows a -10.2% gap where the model predicted 32.7%, but the test set whiffed at 42.9%. Additionally, the pitcher count cutter underpredicts by 6.5%, and the hitter count curveball underpredicts by 5.7%. These errors reflect test set variance in a thin sample rather than a systematic model failure. With fewer than 100 samples, a couple extra whiffs can shift the percentage dramatically. We can deduce that the model is reliable for sufficient sample sizes and less trustworthy for smaller samples.

ROC Curves

The ROC Curves below show us the AUC values from the model table. Each curve shows the trade-off between true and false positive rates, or how accurately the model predicts a whiff. A curve that is farther toward the top left corner indicates a better model.

Across all three count bins, the breaking balls produce the most bowed and smoother curves, while sinker and cutter are more flat curves. The sinker in hitter counts falls mostly below the diagonal, meaning the model cannot reliably distinguish whiff sinkers from non-whiff sinkers, confirming sinker outcomes are driven by something other than stuff characteristics. The sweeper’s staircase shape in hitter counts reflects the small test size of n=12 and should not be interpreted as genuine model performance.

Limitations & Assumptions

Trackman Pitch Tagging: Since pitch characteristics and metrics can vary by pitcher, some pitches may be misclassified, introducing some noise into each model. This limitation applies especially to pitch types with less distinct shape profiles.

Sample Size: Count binning reduces the sample size available for each model. The hitter count sweeper is the most extreme case at n_train = 45 and n_test = 12 and should be disregarded. More broadly, any pitch with fewer than 100 observations should be interpreted with caution.

Conditional on Swinging: All models estimate whiff probability given that the batter swings. The analysis does not model swing decisions, called strikes or overall pitch value. A modest whiff probability does not indicate low efficiency since it could be called for a strike at a high clip. Therefore, interpreting these results as a complete measure of pitch effectiveness would be an overreach.

Count Context Within Bins: Binning eleven pitches into three categories sacrifices granularity and the ability to differentiate between similar counts. While a separate model for each count and pitch would require 77 models (and super small sample sizes), hopefully future work could model individual counts with a sufficient sample size.

In-Sample vs. Out-of-Sample: Unlike the first article, this analysis uses a train-test split to evaluate model performance. The AUC values reported here are out-of-sample measures. However, the train and test sets are drawn from the same 2026 Prospect League season, meaning the models have not been validated on a different league or year. Cross-season validation would be a stronger test for the model.

Observation Independence: Each pitch is treated as an independent observation, but pitches thrown by the same pitcher share the same arm, mechanics, and arsenal. A random 80/20 split does not account for this, meaning pitches from the same pitcher could appear in both the test and training sets. This means the model may partially be learning pitcher identity rather than pure pitch characteristics. Grouped validation by pitcher would provide a stronger test.

Conclusion

In conclusion, we have shown that count context is an important variable in pitch analysis. Across 94,224 pitches and 21 models, the data shows how drastically whiff rates can change for the same pitch across different counts. The curveball is a prime example, generating a 34.6% model-predicted whiff rate in hitter counts, which is nearly 8 points higher than in pitcher counts. Even so, this pitch is thrown only 6.5% of the time when hitters are ahead. The slider is the league’s most count-stable weapon, maintaining whiff rates above 28% in every environment. We can also conclude that the sinker cannot be modeled for whiff generation regardless of count. For pitchers developing their arsenals in the Prospect League, count environment has proven to be greatly important when selecting pitches.

Sources

Leave a Comment