## Batting averages and the elusiveness of .249

For the discussion of math. Duh.

Moderators: gmalivuk, Moderators General, Prelates

### Batting averages and the elusiveness of .249

Baseball season recently started. Many things about baseball are interesting to people who are into trivia and numbers.

One of those interesting things is batting average. For anyone who doesn't know, batting average is essentially just a success rate (number of base hits divided by number of official at-bats) and is conventionally rounded to three decimal places.

Since it's early in the season, no player yet has a very large number of at-bats. As of right now (9:30 am East Coast time on Tuesday April 10th) the player with the most at-bats in the majors is David Freese of the Cardinals, with 24. (Freese has 10 hits in those 24 at-bats, for a batting average of .417. It would be .416666667 if we used more digits, but the convention is to round to the nearest thousandth.)

I claim that nobody will have a batting average of .249 until sometime in May.

Spoiler:
This is because early in the season, only certain batting averages are possible. After 1 at-bat, your average is either .000 or 1.000. After 2 at-bats, we add .500 to the list of possibilities. After 3 at-bats, we add .333 and .667 to the list of possibilities. Next we add .250 and .750, and so on. If the number of at-bats is not large, the possible averages cover just a small proportion of all the three-digit numbers from .001 to .999.

One way to approach this topic is just to brute-force everything. The previous paragraph suggests an algorithm: For each n, compute each of the fractions 1/n, 2/n, ..., (n-1)/n as a decimal, and round to three places. For each possible average from .001 to .999, keep track of the first n that gives you that average.

If we do this, we find, for example, that to get an average of .249, you need at least 169 at-bats. The fraction 42/169 rounds to .249 (a more accurate value is 0.24852071) and no fraction with a smaller denominator than 169 rounds to .249.

However, there's more structure here. What are some other averages that require a large number of at-bats? A few examples are .334 (requires at least 287 at-bats), .332 (requires at least 184 at-bats), .251 (requires at least 167 at-bats), .166 (requires at least 145 at-bats), .199 (requires at least 136 at-bats), and .285 (requires at least 123 at-bats).

Basically, the "hardest" averages to achieve are the ones that are very close to fractions with small denominators. Achieving .250 is easy: you can go 1 for 4, or 2 for 8, or 3 for 12, et cetera. But .249 is hard. We know k hits in 4k at-bats won't give you .249, because it'll give you .250. What about k-1 hits in 4k at-bats? Unless k is somewhat large, that's "too far" from .250, and will be less than .249. What about k hits in 4k+1 at-bats? Unless k is somewhat large, that also is "too far" from .250, and will be less than .249.

I wonder how easy it is to state and prove a general result. Suppose batting averages were rounded to 4 or 5 decimal places instead. Can we prove that the "last" batting averages to occur as possibilities (when we steadily increase the number of at-bats) are always numbers like .24999 or .33334? (Actually, I think the very last ones would be .00001 and .99999, which by itself is perhaps not difficult to prove.)
skullturf

Posts: 532
Joined: Thu Dec 07, 2006 8:37 pm UTC
Location: Delaware

### Re: Batting averages and the elusiveness of .249

0 and 1 are fractions with the smallest denominator (1), therefore numbers close to them are reached later than all others.

Spoiler:
With numbers up to 2n, you can reach 1/(2n) as smallest value larger than 0. It is possible to reach (n-1)/(2n)=1/2 - 1/(2n), too, which has the same distance from 0.5 as the distance which 1/(2n) has from 0. But you have the additional (n-1)/(2n-1) = 1/2 - 1/(4n-2), which has roughly half the distance to 0.5. In other words: You get the same distance twice as fast for 0.5, compared to 0.

The same is true for other denominators. To reach 0.001, you need 1/0.0015=667 at-bats (rounded up), to reach 0.499, you need about half the amount, and for 0.249 you need 1/4, which is ~167 and close to the real number of 169. For 0.251, it is 167.
A closer look reveals the system behind this: 169=4n+1, which allows to use n/(4n+1) to reach 0.249.

0.3315 (the smallest number which gets rounded to 0.332) is 0.0018333... away from 1/3, and we can use n/(3n+1)=1/3-1/(9n+3), therefore we need at least n=545/3=182. The closest 3n+1-number is 184, which gives the correct result.
0.3345 is closer to 1/3, therefore it requires more at-bats: The difference is 0.0011666... -> 1/(3*0.0011666...) = 286, and the closest 3n-1-number is 287.

It is indeed possible to calculate these numbers without brute force.
mfb

Posts: 824
Joined: Thu Jan 08, 2009 7:48 pm UTC

### Re: Batting averages and the elusiveness of .249

.0015 rounded up should surely be .002, no?

Also, no batter will ever have an average of 0.001. His ass would quite simply be sent back down to the minors well before that point!
gorcee

Posts: 1501
Joined: Sun Jul 13, 2008 3:14 am UTC
Location: Charlottesville, VA

### Re: Batting averages and the elusiveness of .249

That is the reason why I rounded 666,66... up to get 667, as 1/667 < 0.0015.

Also, no batter will ever have an average of 0.001. His ass would quite simply be sent back down to the minors well before that point!

I am not sure how to include this in the analysis.
mfb

Posts: 824
Joined: Thu Jan 08, 2009 7:48 pm UTC

### Re: Batting averages and the elusiveness of .249

mfb wrote:That is the reason why I rounded 666,66... up to get 667, as 1/667 < 0.0015.

Also, no batter will ever have an average of 0.001. His ass would quite simply be sent back down to the minors well before that point!

I am not sure how to include this in the analysis.

Oh you rounded up the other number, gotcha.

One way to isolate "impossible" averages is to look at baseball records, and make a few assumptions. For instance, take the roster player with the worst ever batting average. Assume that no player will get that many at bats with that average or lower. Take the best ever batting average, either over a season, or over some finite game streak (likely Ted Williams, for a season, or Joe DiMaggio, during his streak). Add 10%. Assume that no player will ever have a higher batting average over that many at bats.
gorcee

Posts: 1501
Joined: Sun Jul 13, 2008 3:14 am UTC
Location: Charlottesville, VA

### Re: Batting averages and the elusiveness of .249

Continued fractions will give some good insight into this.
addams wrote:This forum has some very well educated people typing away in loops with Sourmilk. He is a lucky Sourmilk.
mike-l

Posts: 2626
Joined: Tue Sep 04, 2007 2:16 am UTC

### Re: Batting averages and the elusiveness of .249

One way to isolate "impossible" averages is to look at baseball records, and make a few assumptions. For instance, take the roster player with the worst ever batting average. Assume that no player will get that many at bats with that average or lower. Take the best ever batting average, either over a season, or over some finite game streak (likely Ted Williams, for a season, or Joe DiMaggio, during his streak). Add 10%. Assume that no player will ever have a higher batting average over that many at bats.

When you check records, always be sure to divide the dead ball era from the modern era. Otherwise you'll run into guys like Tip O'Neill and Hugh Duffy with 440+ averages. In modern era, Ted Williams was the last man to bat above 400, and you are probably safe to set the upper bound around 400 (at the end of his 56 hit streak, DiMaggio was batting just under 410).

The lowest you'll see for a lot of at bats is something like 180. I think that was what Rob Deer was batting in the early 90s when he was chasing the record.
SU3SU2U1

Posts: 372
Joined: Sun Nov 25, 2007 4:15 am UTC

### Re: Batting averages and the elusiveness of .249

gorcee wrote:Also, no batter will ever have an average of 0.001. His ass would quite simply be sent back down to the minors well before that point!

A pitcher in the NL wouldn't necessarily be, but he would have to accumulate that over the course of several (like 10 or more) seasons because he certainly wouldn't be able to get 667 at bats in one season.
To all law enforcement entities, this is not an admission of guilt...

folkhero

Posts: 1775
Joined: Fri Aug 01, 2008 3:34 am UTC

### Re: Batting averages and the elusiveness of .249

Finally, two batters have an average of .249 today (Brennan Boesch of the Tigers and Marco Scutaro of the Rockies).
skullturf

Posts: 532
Joined: Thu Dec 07, 2006 8:37 pm UTC
Location: Delaware