A 13-year-old boy from Texas won a national math competition on Monday with an answer rooted in probabilities — and a dash of farming.

The boy, Luke Robitaille, took less than a second to buzz in at the Raytheon Mathcounts National Competition with the correct answer.

The question: In a barn, 100 chicks sit peacefully in a circle. Suddenly, each chick randomly pecks the chick immediately to its left or right. What is the expected number of unpecked chicks?

(The answer is at the end of story.)

The Scripps National Spelling Bee frequently gains attention for the nail-biting drama of watching students stand on a stage under hot lights to respond to questions.

The math competition was no less challenging.

Contestants can use only a pencil and paper and have 45 seconds to solve word problems such as this one answered by the winner in 2014: The smallest integer of a set of consecutive integers is -32. If the sum of these integers is 67, how many integers are in the set?

(That answer is also below.)

For Luke, a seventh-grader from Euless, Texas, who is home schooled, the victory meant beating a teammate from Texas in the final round. As national champion, he will receive a US$20,000 college scholarship and a trip to Space Camp in Huntsville, Alabama.

“You get to think about things and move logically toward solving problems,” said Luke, who came in second place at last year’s competition.

The contest, which was open to students in the sixth, seventh and eighth grades, took place at a hotel ballroom in Lake Buena Vista, Florida, before an audience of 1,000 people.

A written test was given on Sunday to 224 contestants; the 12 highest-scoring students advanced to the final round on Monday. The first contestant to score four correct answers won.

The score was 3-3 when Luke buzzed in with his winning answer.

**PROMOTING STEM FIELDS**

The competition is a way to promote skills in science, technology, engineering and mathematics — known as the STEM fields, Pamela Erickson, vice president of global brand and corporate citizenship at Raytheon, an aerospace and defense company, said Monday.

In 2012, the President’s Council of Advisers on Science and Technology projected that the US States during the next decade would need about 1 million more STEM professionals than the country produced at its current rate to maintain its supremacy in science and technology. To do that would mean increasing the number of students earning STEM degrees by about 34 percent annually, the council said.

“We feel that pain, and it’s a real concern for us,” Erickson said.

(Incidentally, the winner that year answered this question correctly: A bag of coins contains only pennies, nickels and dimes with at least five of each. How many different combined values are possible if five coins are selected at random?)

Lou DiGioia, executive director of Mathcounts, said the contestants’ achievements were the results of endless hours of practice and coaching and not necessarily innate math abilities.

“These are not natural prodigies,” he said. “Nobody watches a basketball game and says, ‘Oh, LeBron James was born that way.’”

The gap between the supply and demand of STEM workers promises to grow, he added.

“If we have a shortfall today and the rate of acceleration is going to continue, there is going to be a problem,” he said. “Anyone can do the math on that.”

(Did you give up yet? Luke’s winning response was 25 chicks. The answer to the question from last year: 67 integers. And the answer to the 2012 question about the bag of coins: 21.)