The reliable scores were enough, he said, to decide the case and to allow Mr. Moore’s execution.

Justice Ginsburg said the courts have more work to do when I.Q. scores are close to the line. For instance, she wrote, Mr. Moore had reached his teenage years without having learned the most fundamental things.

“At 13,” she wrote, “Moore lacked basic understanding of the days of the week, the months of the year, and the seasons; he could scarcely tell time or comprehend the standards of measure or the basic principle that subtraction is the reverse of addition.”

A state judge, considering that evidence and relying on current medical standards on intellectual disability, concluded that executing Mr. Moore would violate the Eighth Amendment.

But the Court of Criminal Appeals, Texas’ highest court for criminal matters, reversed that ruling, saying the judge had made a mistake in “employing the definition of intellectual disability presently used.”

Under medical standards from 1992, Mr. Moore was not intellectually disabled, the appeals court said. The court added that the young Bobby Moore “had demonstrated adaptive strengths” by living on the street, mowing lawns, playing pool and committing crimes. He had, for instance, worn a wig during the robbery and tried to hide his shotgun in two plastic bags, which prosecutors said was evidence of forethought and planning.

Justice Ginsburg said the appeals court had given too much weight to those aspects of Mr. Moore’s behavior and not enough to his intellectual deficits.