Mike Trout and Bryce Harper are the best players in baseball but who is better? Trout won the AL MVP in 2014 and 2016. For the Angels this year he is batting .341/.451/.742 with 13 home runs and leads the majors in Baseball References’ wins above replacement.

Not to be out done this season, Harper is hitting .376/.491/.744. The former NL MVP has slugged 13 dingers this year and according to FanGraph’s version of WAR is the best player in baseball.

It is hard to say which player is better so let’s ask a different question. Mike Trout or Bryce Harper, who is more likely to get a hit?

In their young careers Trout is batting .307 (3,129 at bats, 961 hits) and Harper is hitting .284 (2,469 at bats, 701 hits). Trout’s career average is higher but how certain are we that he is a better hitter?

To answer this question we are going to use R and some code created by David Robinson at VarianceExplained for Bayesian testing. One of the first things the code does is create estimates for each player’s “true” batting averages using posterior distributions (the range of plausible values for their batting averages). You can see the values displayed in the chart below.

Looking at the graph, while there is some overlap, it looks pretty clear that Trout is more likely to get a hit. However, we want to know the probability that Trout is the better hitter.

To find that answer, using the R code, we run a simulation of the posterior draws.

After running 1 million simulations, using everything we know about each player, there is an 86.9% chance that Mike Trout is a better hitter than Bryce Harper!

Wow, I was expecting Trout to come out on top but not in a landslide. This simulation won’t end the debate but it is another piece of evidence that Trout is the best player in the game.

Baseball is in full swing, don’t miss out on the action

Try Bet Labs for a month, just \$49