Two of the best teams in the National League in 2017, the Diamondbacks and the Rockies, are frauds. Shams. Charlatans!

Despite ranking first and fourth, respectively, in runs scored across the NL during the regular season, neither team was the offensive powerhouse that each claimed to be.

Yes, both the Rockies and Diamondbacks were actually below average offensively: the Rockies posted a wRC+ of only 87, and the Diamondbacks fared only a little better with 95 wRC+. How are two of the highest-run-scoring teams in the NL considered below average offensively?

The answer lies where they play.

Park factors explained

It's no coincidence that since the Rockies joined the majors in 1993, 11 NL batting titles have been won by Rockies, with eight different players taking home the crown. It’s also why pitchers loathe throwing in Coors Field. The term “park factor” refers to any characteristic — environmental or physical — of the ballpark that affects the game.

One of the most popular examples of a park factor is altitude. The density of air in high altitudes — which is a significant factor at mile-high Coors Field and other stadiums at high elevations — leads to increased run production. If the air is thinner, batters can hit the ball harder because there’s less air resistance. As a result, more batted balls fall in for hits. Compared to a stadium at sea level, balls are hit less hard, so fewer balls fall in for hits.

Another excellent example of a park factor is park dimensions. Every ballpark has different dimensions for the outfield fences, and this can affect what types of hits a batted ball produces. For instance, a fly ball down the right-field line at Fenway can make it out easily thanks to the short right-field fence and low wall, but in other parks, that ball might only be a double. Yankee Stadium’s short fences lead to a much higher rate of home runs, but a fair amount of those probably wouldn’t go out at Citi Field.

Significance of park factors

Park factors are important in determining player performance. Exhibit A: Larry Walker.

Walker played his first six seasons with the Montreal Expos, hitting .281/.357/.483 during that span. After joining the Rockies in free agency, Walker hit .339/.421/.638 over his first six seasons with his new team, where he played half his games at Coors Field.

This isn’t to say that Walker was only a good player because he played at Coors Field, or that the rise in his production can be solely attributed to the move to another team, but the offense-boosting park factors of Coors Field undoubtedly helped Walker put up video game-like numbers. If I am looking to predict or evaluate a player’s performance, park factors are an important consideration.

It is generally considered good practice to use metrics that use park adjusted factors in evaluating players and teams. Using OPS — which is notpark adjusted — the Diamondbacks and Rockies were the fifth and seventh best teams offensively in the majors. Using wRC+ — which is park adjusted — the Diamondbacks and Rockies were the 17th and 27th best teams offensively. That's a huge difference.

Modeling Park Factors

Calculating park factors are actually fairly simple. If you're interested in how park factors of a ballpark affect run production, you look at how many runs per game all teams average while playing at the park (we’ll call this the park RPG), and how many runs per game all teams average while not playing at that park (or the away RPG).

Dividing the park RPG by the away RPG gives us the park factors for runs. If teams average five runs per game while at a particular park, but four runs while away from that park, the park factors for runs is 1.25. In other words, 25 percent more runs score at that park than elsewhere.

If teams average three runs per game at that park instead, then the park factor for runs is .75, and 25 percent fewer runs score at that park than elsewhere.

This calculation can also be done for home runs, triples or any other plate outcome, including walks. While the numbers will vary slightly year over year, park factors measurements usually do a good job measuring park characteristics that affect offensive output.

Applications, detriments of park factors

The applications described here are simple, but park factors are vital to many advanced statistics, like wRC+, ERA-, and OPS+. They’re also useful in evaluating hitters and pitchers in a vacuum.

For example, Charlie Blackmon posted a 1.000 OPS in 2017, higher than Freddie Freeman’s .989. When a stat is used that accounts for park factors — like OPS+ — to compare the two, Freeman outperforms Blackmon (157 OPS+ to 142 OPS+). If Blackmon and Freeman were to replay 2017 with each in a neutral environment, Freeman would likely outperform Blackmon.

To that end, park adjusted stats aren’t perfect. Park factors measure the effect of the environment on batted balls, but not every hitter produces the same batted balls.

A lefty line-drive hitter will love Fenway Park’s low right-field wall, but a righty line-drive hitter will have a tough time getting one over the green monster. Park factor measurements are getting more and more accurate thanks to technology like Statcast, but we’re still some ways away from having perfect park factors that neutralize everything.