It was the sixth game of the American League Championship Series. Brett Gardner, the spunky Yankees outfielder, was batting in the second inning with runners on first and second base.

Even though it was still early, this was a crucial part of last week’s game since the Houston Astros were already up by three runs to one.

Gardner could have narrowed the gap with a single or tied the score with an extra base hit, as he has often done. A homer would have put the Yankees ahead.

But home plate umpire Marvin Hudson called two pitches strikes that weren’t. The one that struck Gardner out was clearly wide on the right side of the plate to the left-handed hitter.

Strike three, motioned Hudson. Inning over. Threat over.

Even the TV announcers made a point — several times — that the pitch wasn’t close to being a strike.

Why am I mentioning baseball in a column like this? Because home plate umpire is the one job in America that shouldn’t exist in this technological age.

We, the TV viewer, could tell that Hudson had made a mistake because the computer-generated box superimposed on home plate during every pitch told us so.

The home plate umpire’s job should be replaced by that box.

Let Hudson and other home plate umps just stand there, if you must, and call out what the computer tells them to. But don’t let umps use their judgment anymore when calling balls and strikes.

To be clear, the Astros were the better team in the series. And they deserved to win, which they did. Game Six was fantastic to watch on TV no matter who you were rooting for.

As any sport fan knows, technology now allows all sports to review umpire and referee calls for accuracy. Even baseball plays are reviewed — except when it comes to calls of balls and strikes.

In that case, anyone watching on TV knows when the ump calls a ball a strike and a strike a ball. It’s right there on the computer box.

Mark Williams, a finance professor at Boston University and founder of UmpScores, has a team of data analysts looking into the performance of umpires. He has put together UmpScores, an app that tracks umpire performance.

According to Williams, his data show that umpire Hudson is the 51st- worst umpire during the 2019 season when he works home plate out of the 76 umps in Major League Baseball.

UmpScores simply uses the superimposed box to determine when umps get it right or wrong.

Hudson’s bad-call ratio, says Williams, is about 10 percent. In other words, he is calling one in 10 pitches incorrectly.

And this’ll make Yankees fans even more angry: When Hudson was working Yankees games behind the plate, his bad-call ratio increased to 12.07 percent. But his bad-call ratio when working Houston Astros games was only 6.25 percent, according to Williams.

So, Hudson was nearly twice as bad working Yankees games than Houston games.

As for that 6th game I just mentioned, Williams says: “With two runners on base and two outs, this was a momentum-killing bad call by Hudson — an umpire who has a mediocre record at best behind home plate.”

Williams says Hudson is a two-and-a-half star ump — out of five stars — which is below average.

“How can MLB put a below-average umpire behind home plate in such an important champion sixth game of a series?” says Williams. “The division championship was on the line.”

The UmpScores group came up with these stats via publicly available Major League Baseball pitch-call data. The company uses the strike zone overlay that MLB employs during broadcasts to come up with its rankings.

The best umpire at home plate, Pat Hoberg, has a bad-call ratio of just 6.9 percent. The computer would have a zero bad-call ratio.

“Kill the ump” is a favorite saying of angry baseball fans. But that saying might have to be updated to “kill the ump’s job” now that computers are doing it better.

Ref;nypost.com