When Jared Ward was about halfway through the Olympic marathon in Rio, doubts started to creep into his head. He didn't feel good. Part of the pack he was in started to break away. Could he actually finish? Ward, a member of the U.S. Olympic team, was running only his fifth marathon ever and needed to find some way to get through the rest of the race.

Not only did the 28-year-old Ward find a way to get through the mental challenges and finish, but he finished sixth overall -- in the Olympics -- in his fifth race.

There were two keys for Ward to break through the doubt that could have cost him Olympic glory.

The first was to think about the race in chunks -- getting through the next mile instead of trying to get through the entire race.

The second was analytics.

The chunking of a task is a well-known management strategy -- breaking huge projects down into small tasks that will be mentally less taxing and therefore more manageable. The use of analytics, though, particularly in the context of the Olympic marathon, is more novel.

Given Ward's rise, clearly he is not your typical runner. Dually inspired by his high school coaches and math teachers, Ward attended Brigham Young University to run cross country and study statistics. What Ward soon found out is that the BYU statistics department -- led by Dr. Gilbert Fellingham and Dr. Shane Reese -- has one of the top sports statistics groups in the country. BYU statistics alumni have worked for teams in the NFL and NBA as well as the U.S. Olympic Committee, and ESPN's sports analytics team.

Fellingham took interest in Ward as both a student and an athlete, and began to encourage Ward to take a more analytical approach to his running. Ward's BYU cross country coach, Ed Eyestone, also embraced this approach -- particularly when Ward used up his eligibility in cross country and turned his attention to marathons. Eyestone, as it happened, was a two-time U.S. Olympic marathoner who competed in 1988 (Seoul) and 1992 (Barcelona).

At the urging of these mentors, Ward (who would become a BYU statistics professor himself) took both a macro and micro approach to the analytics of marathons.

On the macro level, he looked at the research on marathon performance, and that data provided two important insights: (1) elite marathoners run at a fairly constant pace -- they don't speed up or slow down throughout the race; and (2) they use the terrain to their advantage -- speeding up on a downhill and slowing down on an uphill. These concepts formed the basis of a strategy to estimate a constant pace that Ward would try to match throughout the race, diverging only when the terrain dictated it.

"If you can get to mile 20 feeling like you are [at] 15, you have an easier time getting to the end," Ward said.

On the micro level, Ward looked at data on his own performance to estimate what that pace should be. He used every one of his own workouts and races as a data point, and then used that data to look at the factors that positively and negatively impacted his performance. Finally, using several drills and workouts designed by Eyestone, as well as the terrain and weather conditions in Rio, he estimated the proper pace for his race that would get him a top-10 finish.

This empirical work gave him confidence when he put his toe on the line in Rio, he could not only finish but also finish strong.

"The data says I'm ready to run 2:10," said Ward. "I believe that and can step on the line at the Olympic Games confident that I can hit the top 10."

He also leaned on the analysis at that midway point of the race, when the aforementioned self-doubt crept in. He knew the research and analysis, trusting that if he kept to the plan -- even though some runners were breaking away from him -- he would have a top-10 finish. Armed with solid analytics and mental strength to push through his aching body, Ward crossed the finish line in sixth place with a personal-best time of 2:11:30.

Ward's story is about far more than analytics, but in a very real way, the analytics powered his Olympic performance. You can expect to hear from Ward -- and teammate Galen Rupp, who won the bronze medal in Rio, participating in just his second career marathon -- in the runup to the 2020 Summer Games in Tokyo.

Ward has "certainly leaped into full world-class status," Eyestone told the Salt Lake Tribune. "You're top-six in the Olympic Games."