You’ve heard of “Moneyball,” the book and subsequent movie showing how a small-market baseball team (the Oakland Athletics) managed to compete successfully against clubs with larger payrolls by relying on advanced statistics to find undervalued players.

Data analysis for hockey, dubbed Moneypuck by some, is still in its infancy. Hockey is much more fluid and has many more variables than baseball, which often can be broken down to pitcher versus batter matchups.

“In baseball, a pitcher throws the ball and a batter either hits it or not,” said former Portland Pirates forward Rocco Grimaldi. “In hockey, eight different things can happen.”

Even so, there are National Hockey League teams who have embraced analytics, and the next two weekends will provide an opportunity to put their knowledge to good use. The two-day NHL entry draft begins Friday in Buffalo. The signing period for free agents begins July 1.

For the past two months, the Florida Panthers – parent club last winter of the Pirates, who have since been sold and relocated to Springfield, Massachusetts – have been busy evaluating personnel, deciding who stays, who goes and what missing pieces can be added to produce teams that can contend for the Stanley Cup.

Helping to sift through all the data and provide input for those decisions is a former West Point assistant professor of mathematics named Brian Macdonald, who has published research papers with titles such as “Quantifying playmaking ability in hockey” and “An Expected Goals Model for Evaluating NHL Teams and Players.”

Goals are relatively scarce, and sometimes fluky, so a better predictor of hockey success, Macdonald said, turns out to be shots.

Of course, not all shots are equal. Are they contested? Where are they coming from? Are teams at even strength? Did play begin in the offensive or defensive end? Is the game close? How do we define close? (Tied in the third period or within one goal in the first or second, say the analysts.)

Furthermore, who else is on the ice? How strong are your teammates? How about your opponents? Are some players better at creating shot opportunities for teammates? Is there a way to measure the quantity and quality of shot attempts when a particular player is on the ice and compare it with the number of shots allowed?

These are the sorts of questions that intrigued Macdonald, an electrical engineering graduate of Lafayette College in 2000 who earned a Ph.D. from Johns Hopkins before being hired at West Point. He had played street hockey growing up but fell in love with the sport while in college.

He still remembers watching his first NHL game. It was winter break his freshman year. The Flyers were hosting the Avalanche and came back from a 4-1 deficit to tie, back when the NHL allowed games to end that way.

“It was the most exciting tie I’d ever seen,” said Macdonald, who started skating and wound up playing for Lafayette’s club team.

In graduate school, Macdonald was studying “very theoretical math. I knew I wanted to move on to something more applied, and I decided that would be hockey stats.”

Early on, he did it to help his fantasy hockey team. Eventually, he started a blog called greaterthanplusminus.com, published his research and was invited to speak at the prestigious Sloan Analytics Conference hosted by MIT and the New England Symposium on Statistics in Sports hosted by Harvard.

Eric Joyce, who served as the Pirates general manager in Portland, taught counter-terrorism and homeland security at West Point before joining the Panthers organization, purchased in 2013 by Vinnie Viola. The owner hired Joyce as an assistant general manager and asked him to develop an analytics department.

“Part of my job was to find a guy like Brian,” Joyce said. “(Viola) wanted us to be like the Oakland A’s of the National Hockey League.”

analytics in action

Scouts still outnumber data analysts 11-3 in the Panthers front office, but the decision makers like input from both sides. One offseason success last summer was the acquisition of forward Reilly Smith from the Bruins in a trade for Jimmy Hayes, a Boston native who had scored 19 goals for the ’14-15 Panthers, six more than Smith managed with the Bruins.

Joyce knew the Bruins liked to put a big body in front of the net on the power play and thought the 6-foot-5 Hayes could fill that role. Smith is a speedy and versatile skater who fit better in Florida’s system There were financial considerations as well involving salary cap space that allowed Boston to sign free agent left wing Matt Beleskey.

Smith “was one of the guys that, according to my stuff, was one of the most undervalued players on the Bruins,” Macdonald said.

As things turned out, Smith became a 50-point scorer for the Panthers, playing on a productive second line with Vincent Trocheck (25-28-53) and Jussi Jokinen (18-42-60) as Florida won the Atlantic Division title.

Hayes scored 13 goals and Beleskey 15 for the Bruins, who missed the playoffs.

Data analysis isn’t confined to player acquisition, although that is likely its most useful purpose. The organization also compiles statistics on, say, referees.

“Some guys are more apt to call certain types of penalties and at certain times of the game,” said Scott Allen, who took over from Tom Rowe as head coach of the Pirates two months into the season. “That type of stuff is important to me. You see trends. This guy calls a lot of hooks. This guy calls a lot of holds. To me, that’s very interesting. I love to have information in my pocket, especially when it comes to refs.”

Mike McKenna, who this winter became the Pirates’ franchise leader in goaltender wins, said statistics are more detailed and available in the NHL than in the American Hockey League.

“A lot of it, to be completely honest, is over our head right now,” he said. “It’s such a new field that you almost have to be, for lack of a better term, a stats geek to really understand it.”

McKenna said he does see how something such as adjusted save percentage can reveal more about a goaltender’s true value because it takes into account shot location and excludes penalty-killing and power-play chances.

Data analysis is “only going to pick up steam because it has shown in every other sport how valuable it’s been,” he said. “There’s no doubt about it having value in hockey, too. It’s just that, everybody is trying to find the right balance of numbers versus everything else you take into the equation.”

In other words, McKenna said he finds the macro level fascinating. At the micro level, no stat is going to help him stop a puck whistling toward the upper corner of the net.

“At the end of the day,” Allen said, “there’s a lot of heart and soul and blood, sweat and tears that’s involved when you’re talking about the dynamics of success in this game.”

stats just part of the story

Still, there’s also plenty of data that can be revealing. The Panthers played 82 games in the regular season and six more in the playoffs. The Pirates played 76 and five, the last of them a 2-1 Game 5 loss to Atlantic Division champion Hershey.

Along the way, the players generated all manner of measurable statistics dealing with shots, saves, faceoffs and plus-minus ratings.

In the regular season, for example, Rob Schremp led the Pirates with 21 goals. Cameron Gaunce was the team leader with 35 assists. Wade Megan set a franchise record with seven short-handed goals. Only one other Pirate, Kyle Rau, scored as many as two.

Wayne Simpson, at plus-20, had the best plus-minus rating, meaning he was on the ice for 20 more Pirates goals than he was for opponent goals. At the other end of the spectrum, Corban Knight’s rating was minus-11.

Does that mean Simpson was the most valuable player and Knight the least? Not in the eyes of the Panthers, who brought up Knight to play 20 NHL games and kept Simpson in the AHL.

Last weekend the Panthers announced the hiring as a pro scout of a Winnipeg lawyer named Richard Pollock who founded a hockey news and analysis web site called Illegal Curve in 2007 and has written for ESPN and Hockey Prospectus. They also hired an artificial intelligence whiz named Josh Weissbock and a chief financial officer named Cam Lawrence – both from Vancouver – as prospect consultants.

A proprietary algorithm dubbed Prospect Cohort Success rates potential draft picks on the basis of size, point production, age and competition level.

“They’ve looked at historical data dating back for a while,” Joyce said, “and said because of this player’s production at this level in this league, he is put in a basket of players like this. On average, those guys (went on to play) 200 games in the National Hockey League.”

The average of this particular basket, Joyce said, is 22 percent, so a draft pick from that basket has a 22-percent of becoming an established NHL player.

There is, however, still plenty of chance and luck involved in choosing players.

“If a scout is telling me a player’s not good and the stats are telling me the player’s good,” Joyce said, “I err on the side of the scouts.”

Joyce calls the tension between scouts and analysts “positive friction.”

“I don’t want it to be a Kumbaya moment,” he said. “We’re making multi-million dollar decisions here on kids. We need to find the right kids that fit the roles that we think we’re going to need. It’s a hard task to do.”