Every three years, half a million 15-year-olds in 69 countries take a two-hour test designed to gauge their ability to think. Unlike other exams, the PISA, as it is known, does not assess what teenagers have memorized. Instead, it asks them to solve problems they haven’t seen before, to identify patterns that are not obvious and to make compelling written arguments. It tests the skills, in other words, that machines have not yet mastered.

The latest results reveal that the United States is treading water in the middle of the pool. In math, American teenagers performed slightly worse than they usually do on the PISA — below average for the developed world, which means they scored worse than nearly three dozen countries. They did about the same as always in science and reading, which is to say average for the developed world.

But that scoreboard is the least interesting part of the findings. More intriguing is what the PISA has revealed about which conditions seem to make smart countries smart. In that realm, the news was not all bad for American teenagers.

Like all tests, the PISA is imperfect, but it is unusually relevant to real life and provides increasingly nuanced insights into education for researchers like Andreas Schleicher, who oversees the test at the Organization for Economic Cooperation and Development. After each test, he and his team analyze the results, stripped of country names. They don’t want to be biased by their pre-existing notions of what teenagers in Japan or Mexico can or cannot do.

A year later, after their analysis is finished, team members gather in a small conference room at their Paris offices to guess which countries are which. It’s a parlor game of the high-nerd variety — or, as Schleicher put it, “a stress test of the robustness of our analysis.”

Finally, it was time for the results: The analysts looked at the country names to see how their predictions held up. It was, by statistician standards, a huge thrill. The United States had not raised its average scores, but on measures of equity, it had improved. One in every 3 disadvantaged American teenagers beat the odds in science, achieving results in the top quarter of students from similar backgrounds worldwide.

This is a major accomplishment, despite America’s lackluster performance overall. Here’s what the models show: Generally speaking, the smartest countries tend to be those that have acted to make teaching more prestigious and selective; directed more resources to their neediest children; enrolled most children in high-quality preschools; helped schools establish cultures of constant improvement; and applied rigorous, consistent standards across all classrooms.

Of all those lessons learned, the United States has employed only one at scale: A majority of states recently adopted more consistent and challenging learning goals, known as the Common Core State Standards, for reading and math. These standards were in place for only a year in many states, so Schleicher did not expect them to boost America’s PISA scores just yet. (In addition, America’s PISA sample included students living in states that have declined to adopt the new standards altogether.)

But Schleicher urges Americans to work on the other lessons learned — and to keep the faith in their new standards. “I’m confident the Common Core is going to have a long-term impact,” he said. “Patience may be the biggest challenge.”

President Donald Trump and Betsy DeVos, his education secretary, have called for the repeal of the Common Core. But since the federal government did not create or mandate the standards, it cannot easily repeal them. Standards like the Common Core exist in almost every high-performing education nation, from Poland to South Korea.

Some of the other reforms Americans have attempted nationwide in past years, including smaller class sizes and an upgrade of classroom technology, do not appear on the list of things that work. In fact, there is some evidence that both policies can have a negative impact on learning.

For now, the PISA reveals brutal truths about America’s education system: Math, a subject that reliably predicts children’s future earnings, continues to be the United States’ weakest area at every income level. Nearly a third of American 15-year-olds are not meeting a baseline level of ability — the lowest level the OECD believes children must reach in order to thrive as adults in the modern world.

As we drift toward a world in which more good jobs will require Americans to think critically — and to repeatedly prove their abilities before and after they are hired — it is hard to imagine a more pressing national problem. “Your president has promised to make America great again,” Schleicher said. But he warned, “He won’t be able to do that without fixing education.”