MIAMI -- Score one for the geeks.

The Dallas Mavericks won their first-ever championship for a lot of different reasons, most of which rhyme with the word “Birk.” But in a playoffs in which the difference between winning and losing was razor-thin, at the margin a key difference was that their brain trust was consistently a step ahead of the competition.

Dallas coach Rick Carlisle’s shift to J.J. Barea as a starter for Game 4 is the most obvious example -- the Mavs won the final three games with the diminutive speedster in the lineup, an achievement that hardly seemed preordained given that he was shooting 5-for-23 at the time. But on countless other subtle moves -- from rest to zones to his use of role players -- Carlisle was pitch perfect.

This was not an isolated incident either. The Mavs, as flawed as they looked on paper, had a unique way of optimizing the resources they had while camouflaging their weaknesses.

It’s a victory for the data-driven approach that Dallas' coaching staff has taken, starting with Carlisle -- unquestionably the most cerebral and stat-friendly of the league’s 30 head coaches -- and down to director of basketball analytics Roland Beech, the 82games.com founder who joined the Mavs on the bench last season and earned the unofficial title of “first stat geek with a championship ring” with such access to the coaching staff.

Carlisle was reluctant to toot his own horn, deflecting praise to the players and calling out two assistant coaches in his opening remarks of the postgame interview. So let me do it for him. Going up against four fairly accomplished coaches in this postseason, he and the Dallas staff consistently stayed a half-step ahead of all four of them.

To say “every button he pushed worked” is technically true, but also misses the point. He wasn’t throwing stuff at the wall and seeing what would stick, he was making calculated adjustments that he knew had a great chance of success. That’s why they all worked.

Tactically, he did the one thing that coaching, at its bottom line, is all about: He gave his team the best chance to win, often with some courageously out-of-the-box thinking.

“Rick coached his ass off,” Mavs owner Mark Cuban said. “There was no question he was the best coach in the playoffs.”

And in doing so, he’s now ascended to near the top of the league’s coaching totem pole. With Phil Jackson retiring, Larry Brown out of the league and Pat Riley in the front office, there is only one active coach who can boast a stronger resume. That’s San Antonio’s Gregg Popovich, and Carlisle won’t be moving into that rarefied air any time soon.

But compared to anyone else? Who can stack up with Carlisle? Remember, he might be working on his second championship had Jamaal Tinsley and Jermaine O’Neal not been injured in the 2004 conference finals; he’s only coached nine seasons.

Perhaps he needed an owner like Cuban to appreciate him. Cuban is an oddity because he’s as emotional as any owner in basketball, but behind that facade is an avid number-cruncher who hired Carlisle, in part, because Cuban studied his lineup usage and noted he used optimal line-ups with far greater frequency than most coaches.

Perhaps he needed a team like this too. Having a team full of veterans that cared little about personal agendas gave him a lot more leeway to mix and match lineups and roles. That, in turn, provided him the optimal environment to work his magic.

“The inflection point for the team this year,” said Cuban, “was when they got past learning Rick’s system, to finally just committing to it and executing Rick’s system. And with the analytics, understanding what it takes to execute it and how to execute it. So Rick did a phenomenal job.”

How did Carlisle and his crew -- which includes Beech and assistants Dwane Casey, Terry Stotts, Tim Grgurich, Darrell Armstrong, Monte Mathis and Don Kalkstein -- outfox the competition?

Let’s start with the zone defenses. Dallas was widely regarded as the league’s best zone team throughout the season, thanks in part to the two 7-footers in the frontcourt, but also due to Carlisle’s willingness to switch to it and assistant Dwane Casey’s ability to teach it. (Seriously, would somebody give Casey another a head-coaching gig already?)

The amazing effect of the Mavericks’ zone in Game 6 was not just that it gummed up Miami’s offenses momentarily (a “guerilla tactic,” as our Kevin Arnovitz calls it), but that once the Mavs returned to a man-to-man defense the Heat’s previous mojo against it magically vanished.

Dallas went to a zone late in the first quarter in the most crucial sequence of the game, with the Mavs already down by seven points and Dirk Nowitzki on the bench with two fouls. Given the Mavs’ horrifyingly bad plus-minus numbers with Dirk off the floor this season, the danger of a blowout loomed large.

Instead, the zone helped Dallas hold Miami to two points over the next five minutes, the subs unexpectedly blew up for 17 of their own, and the Mavs closed the quarter with an unlikely five-point lead.

In the fourth quarter, Dallas again trotted out the zone; while the effect wasn’t as outsized, it slowed down a Miami charge long enough for the Mavs to regain control.

Second, Carlisle’s flexibility in mixing and matching lineups gives him a leg up. NBA coaches are amazingly reluctant to change lineups, even when what they’re doing clearly isn’t working. For example, it took Miami five games to yank Mike Bibby from the starting lineup, and they only did so when facing elimination. They are not unique in this regard. (The NBA playoffs: Where finally doing what you should have done three games ago happens).

Carlisle admitted that he’s not fond of changing lineups either -- there’s a value in continuity -- but when push came to shove he’s been more than willing to pull the trigger. Peja Stojakovic went from a key rotation player for three rounds to a bystander in this one when it became obvious the match-ups didn’t favor him; it’s easy to forget now, but he averaged more than 24 minutes a game in the first two rounds when his floor-spacing was more advantageous.

Similarly, Barea went from the bench to a starting role in Game 4, which allowed him to savage Miami’s flammable Mike Bibby for two games before the Heat mustered a response. And his use of reserves Brian Cardinal and Ian Mahinmi in place of an injured Brendan Haywood was equally effective.

“He did some phenomenal adjustments here to start J.J.,” Nowitzki said, “ and then decided to let Peja really sit for the series [and] bring Cardinal in, who has been phenomenal for us.”

And let me reiterate that the geeks played a big role. The Mavericks knew which lineups and pairings worked for them and optimized their rotations accordingly. But it wasn’t just about personnel usage in the NBA Finals -- it was play calls, game planning and countless in-season adjustments that built to this moment.

“Roland was a key part to all his,” Cuban said. “I give a lot of credit to Coach Carlisle for putting Roland on the bench and interfacing with him, and making sure we understood exactly what was going on. Knowing what lineups work, what the issues were in terms of play calls and training.”

“It makes a difference. I think Jason and JET and Dirk and Tyson Chandler make a whole lot more difference, but if you don’t know what’s going on it’s hard for you to get smarter and get better.”

The Mavs did both, and it’s a big reason they’re champions.