Mississippi had a problem born of the age of soaring student testing and digital technology. High school students taking the state’s end-of-year exams were using cellphones to text one another the answers.

With more than 100,000 students tested, proctors could not watch everyone — not when some teenagers can text with their phones in their pockets.

So the state called in a company that turns technology against the cheats: it analyzes answer sheets by computer and flags those with so many of the same questions wrong or right that the chances of random agreement are astronomically small. Copying is the almost certain explanation.

Since the company, Caveon Test Security, began working for Mississippi in 2006, cheating has declined about 70 percent, said James Mason, director of the State Department of Education’s Office of Student Assessment. “People know that if you cheat there is an extremely high chance you’re going to get caught,” Mr. Mason said.