We’ve all played the utterly unscientific “guess today’s attendance” game at sporting events. A multiple-choice question flashes on the scoreboard. Fans, already several hot dogs and beers in, scream their guesstimates before moving on to the next distraction.

Students in a summer class at the University of Arizona played the game recently, but with a completely different approach. They didn’t attempt to guess the attendance for the Diamondbacks’ weekend series against the Milwaukee Brewers two weeks ago — they used statistical analysis to predict the attendance. One student came within nine fans of nailing it for the series opener.

The UA is offering a class in sports analytics, a booming industry in the world of professional athletics. “MGMT 359 Sports Analytics,” part of the Eller Sports Management Program, provides students with an entry point to the data analysis that has become an essential ingredient in front offices across every major sport.

Ricardo Valerdi, who created the curriculum and is teaching the class, is hopeful it can supply aspiring Billy Beanes with the tools they need to land jobs in sports analytics and similar fields.

“I hope that they have a new appreciation for all the data that’s out there, that is freely available, that they can access right away to learn about basketball, football, golf,” said Valerdi, who modeled the class after his popular “Science of Baseball” program. “Even if you’re not an athlete or going into professional sports, you can sharpen your saw with statistical tools that apply to business.”

Valerdi believes his students will “become more marketable as a result of this. … There are a lot of jobs in data science and analytics where you can make some good money.”

Jobs were projected to grow at a 30 percent rate for operations research analysts from 2014-24, according to the U.S. Bureau of Labor Statistics. The median pay for such jobs in 2016 was $79,200.

You’d be hard-pressed to find an organization in any of the four major American sports that hasn’t invested heavily in analytics in recent years. You’re at a competitive disadvantage if you don’t.

Valerdi witnessed first-hand how powerful a tool analytics could be. Valerdi was working at MIT and regularly attending Boston Red Sox games as they broke their 86-year curse and won three World Series between 2004 and 2011.

“Moneyball,” the best-selling Michael Lewis book about Beane’s Oakland Athletics that later was turned into a movie of the same name, came out in 2003.

The Red Sox front office, led by young general manager Theo Epstein, used sabermetrics to help build a championship roster.

Valerdi met a Boston University professor named Andy Andres, whose work combining science, math and baseball inspired Valerdi to launch his own Science of Baseball camps, which several MLB teams have co-opted. When the opportunity arose last fall to launch a sports-analytics class and become the director of the Sports Management Program at Eller, Valerdi — who came to the UA to teach engineering — jumped at it.

Based on the preliminary reaction to the course — which, admittedly, sabermetricians might dismiss as too small a sample size — it won’t be a one-time offering. Initially open to 25 students, the class swelled to 38.

“I’m enjoying it,” said senior offensive tackle Gerhard de Beer, the student who came within .03 percent of predicting the exact attendance for the June 9 Diamondbacks game. “It’s fascinating.

“I don’t know a lot about baseball” — de Beer grew up in South Africa — “but they have statistics dating back to the early 1900s, 1800s even. That is crazy, man. It blew my mind.”

Valerdi broke up the five-week course into nine segments, matching the number of innings in a baseball game. The class is taught online, so Valerdi, with the aid of Eller’s multimedia department, made short, lighthearted introductory videos for each “inning.”

Students also can hear from experts in the field, such as Wayne L. Winston, an Indiana University professor whose book, “Mathletics,” provides primary source material for the course. Sister school Indiana University-Purdue University Indianapolis, Syracuse and Cal Baptist are among a small but growing number of universities offering degrees in sports analytics. Arizona offers a minor in sports management.

That’s what led de Beer to Valerdi’s class; the well-spoken senior might become a coach someday. For now, one of the most intellectually curious Wildcats is focusing on completing his course work, getting healthy for training camp and figuring out how analytics can be applied to the offensive line.

The ninth inning of the class is a final project of each student’s choosing. De Beer is considering a deep topic — the average life expectancy of offensive linemen since the discovery of chronic traumatic encephalopathy, the degenerative disease found in those who have suffered blows to the head — but wants to make sure there’s enough relevant data available.

“I don’t want to be spitballing around,” de Beer said. “I want to be solid in my research.”

De Beer’s teammate, Josh Pollack, who’s also taking the class, plays a position whose results are more easily quantifiable. Pollack served as Arizona’s placekicker and primary punter last season. For his final project, the redshirt junior is planning to examine the effectiveness of different types of punts from various locations on the field.

“You have the freedom to do what you want,” Pollack said. “(Valerdi) will teach you the skills and give you what you need, and then you’ll be able to do it on something you actually find interesting.”

Pollack’s interests extend beyond the field of play. He recently took the LSAT and plans to go to law school.

Forget guessing today’s attendance; as an attorney, Pollack envisions being able to use data to forecast the outcomes of cases.

“A lot of what happens in the world is statistics-based,” Pollack said, “trying to predict what the next move is.”