ESPN’s PR feud with the Patriots is being waged on the stat sheet, after the worldwide leader determined that Tom Brady was one of the NFL’s worst quarterbacks in Week 5.

The Brady you saw Sunday was surgical in the Pats’ 30-6 dissection of the Dallas Cowboys.

He completed 20-of-27 passes (74.1 percent), averaged a fantastic 10.2 yards per attempt (YPA), passed for two touchdowns, ran for one more and committed zero turnovers. His 130.9 passer rating made it one of the 23 most efficient performances of his 16-year career. The Patriots are a perfect 23-0 in those games.

Brady is on pace to set personal records for passing yards (5,558), yards per attempt (8.7), passing accuracy (72.5 percent) and passer rating (121.5).

ESPN saw the game differently. Brady ranked 27th out of 28 QBs in Week 5, according to the network’s highly publicized but mysterious indicator, Total QB Rating.

Brady’s 24.1 “QBR” on Sunday placed him ahead of only Nick Foles (1.5 QBR). The Rams quarterback completed just 11-of-30 passes with four interceptions in a 24-10 loss to Green Bay.

Members of ESPN’s analytics team were not available for comment yesterday. But network spokesman Bill Hofheimer provided detailed explanations of ESPN’s QB-rating process. Sacks, Brady’s fumble (recovered by the Patriots) and the fact that 63 percent of the team’s passing yards came after the catch all negatively impacted his rating — to the point that one of the NFL’s best passing performances of Week 5 looks like one of the worst in the eyes of ESPN.

Houston’s Brian Hoyer (90.1 QBR) played better than Brady: He averaged 8.8 YPA and threw two TDs. But he also threw two picks and produced just three fourth-quarter points. His Texans lost, 27-20, to the Colts and 40-year-old warhorse Matt Hasselbeck (92.1).

Detroit’s Matt Stafford (33.2) and Dan Orlovsky (50.8) both played better than Brady: Stafford was benched after throwing his third pick. Orlovsky averaged an anemic 5.0 YPA with one TD and one pick in the Lions’ 42-17 loss to Arizona.

Yes, even the Cowboys’ overmatched Brandon Weeden (27.5 rating) played better than Brady: He produced just 188 yards on 39 attempts (dismal 4.8 YPA), tossed one interceptions and failed to get the Cowboys in the end zone.

Total QBR has four major flaws.

First, Total QBR is statistical pixie dust that exists only within the walls of ESPN. The network never has published a formula for QBR. Nobody can double-check the data.

“The formula is not something we give out,” said Hofheimer, citing a complex algorithm that takes in many factors beyond passing.

Second, Total QBR is not actually a statistic; that is, it’s not an objective mathematical calculation that reflects performance. Instead, it’s a subjective assessment that betrays human bias. ESPN never has published a formula for Total QBR because one does not exist. Instead, it’s a judgment call.

A key component of Total QBR is “dividing credit” for each play between the QB and other players on the field. “ESPN video tracking has been useful in helping to separate credit,” according to the network’s lengthy explanation of the indicator.

Analysts review tape, divvy up credit and assign a score.

That ain’t football. It’s figure skating. And it ain’t statistics. It’s a beauty contest.

“Multiple trackers watch each play to validate data thoroughly,” Hofheimer said. But “credit” shouldn’t matter in the world of statistics. Only empirical data.

Third, and most importantly, existing indicators do a much better job explaining individual and team success. Trusty old passer rating is most notable among them. It’s a phenomenal statistic because wins and losses move in virtual lockstep with passer rating.

Teams win when the quarterback passes the ball efficiently. They lose when he doesn’t. The Patriots’ big win is explained perfectly by passer rating.

Brady’s 130.9 rating was 63.9 points better than Weeden’s 67.0 — a surefire sign of a blowout victory. Teams that were plus-50 or better in passer rating margin last year were 51-1 (.981), a number consistent with historic results. The Patriots are 102-6 (.944) when Brady posts a rating of 100-plus.

Passer rating, put another way, has a high correlation to victory. Total QBR has a low correlation to victory.

The Pats’ blowout victory was statistically guaranteed by Brady’s blowout of Weeden in passer rating. But ESPN looked at this guaranteed winning performance and determined that Brady was one of the worst QBs in the NFL this week.

Fourth and finally, ESPN’s indicator makes fatal mistakes common in modern football analysis. It tries to isolate individual “credit” and blame amid a violent swirl of 22 men. It over-emphasizes factors that have zero correlation to success (yards after catch, most notably). And it over-complicates a very simple game: Teams win when they pass the ball more efficiently than opponents. Simple as that. Consider 36 percent of all NFL champions since 1940 (27-of-75) finished No. 1 in passer rating differential. No credit. No blame. Just results.

If ESPN was looking to improve upon existing stats, it failed miserably. This week’s rankings, meanwhile, betray either a bad stat or bias against Brady inside the halls of ESPN.

In either case, it’s time for ESPN, with all its resources and power, to get give fans a better indicator.