A Series of Random Events


This sounds like good advice but since it’s the dead of winter, we’ll have to generate the numbers ourselves. Thanks to R, this should be no problem. I’ll give each batter 2000 independent trials each season and a 50% chance of success in each trial. Then we’ll plot moving averages of the results and the stories will practically write themselves.

First, a function to compute moving averages

ma <- function(x,n=100){filter(x,rep(1/n,n), sides=2)}

Now, let’s simulate 9 seasons, and plot moving averages of the last 1000 trials:

for (i in 1:9) { 
   x <- rbinom(2000,1,.5) 
   m_avg <- ma(x,n=1000) 
   plot(m_avg, type="l", 
   main = paste("Season", i), 


In season 1, our hero started out fast but, pretty soon, pitchers made adjustments as they always do. Around trial 1300, however, our hero made the necessary counter-adjustments and his success rate climbed steadily for the remainder of the season.

Season 4 is a red flag. Don’t draft this player in your fantasy leagues. You could practically see his confidence waning as the season went on. Is his hip bothering him more than he lets on? Perhaps it’s time for a trade, as a change of scenery might do him some good.

Folks in the know will draft the player shown in Season 9. You can pretty much throw out the first two months of the season since he was obviously a completely different player by the summer months.

Now let’s try the same thing, another simulated 9 seasons, but with moving averages of 150 trials:


These players move between hot and cold more frequently than the players above. Player 2 is the kind of guy you need in your head-to-head leagues, making steady contributions week after week.

Rumors have it that the player in season 3 started enjoying the night life a bit too much in July but, after a closed door clubhouse meeting (credit shane), got things straightened out. If this doesn’t demonstrate the value of strong clubhouse leadership, I’m not sure what does.

For more insights and fantasy advice, follow me at @steamerpro.

Leave a Comment

Your email address will not be published. Required fields are marked *