My wife surfs the Internet more than I do and delights in sharing her discoveries. “You’ll like this comment,” she said last week. A reader wrote that the rising number of students failing Advanced Placement tests “could be a response to Jay Mathews’ ridiculous Challenge Index.”

It was nice to be noticed, and the reader had a point. I have been rating high schools since 1998 with an index that measures the portion of students taking AP, International Baccalaureate and Advanced International Certificate of Education courses and tests, not how well the students perform on them. The reader was commenting on a thoughtful post by education blogger Natalie Wexler expressing concern about “putting students in a class they’re not prepared for,” such as AP.

Many people wonder why schools do that. Doesn’t that discourage the students? Isn’t it a waste of their time to try to learn something so far above their level? Those legitimate worries are important, as the D.C. school system has just released its AP results showing many students with failing scores on those tests.

After 31 years watching and interviewing hundreds of AP and IB teachers who welcome everyone into their classes, I am convinced that schools that challenge average or even below-average students that way have the right idea. What critics of that approach don’t understand are nuances in what motivates teenagers and what happens when courses lack the incorruptible exams provided by AP, IB and AICE.

I invented the Challenge Index, the core of the America’s Most Challenging High Schools list on, to dramatize the success of schools like Garfield High School in East Los Angeles. Most education experts, people as wise and experienced as Wexler, assumed Garfield students were not ready for the heavy homework and long exams in AP. Yet in 1987, two teachers at that school, Jaime Escalante and Ben Jimenez, produced 26 percent of all the Mexican American students in the country who passed an AP Calculus test with a score of 3 or higher.

How did Garfield succeed when other schools with ill-prepared students did not? When the film “Stand and Deliver” was made about Escalante, the popular explanation was that he had a unique genius that other teachers could not replicate. Few noticed that Jimenez, no different from thousands of other good teachers, got the same results doing what Escalante did, giving kids more encouragement and time to learn.

If you visit schools that do that today, you will discover that the students who struggle in AP classes are not discouraged by the difficulty of the material when they are taught by encouraging teachers. AP to them is like going one-on-one against LeBron James. They don’t score much, but they improve and are proud to have a tough challenge. Interview students at Columbia Heights Educational Campus in the District, where all must take AP English, and you will see what I mean.

AP, IB and AICE exams are written and graded by outside experts. They cannot be dumbed down by classroom teachers. Schools that try somewhat less-challenging courses and tests to suit their less-prepared students find that doesn’t work. The temptation to go easy on such kids is too strong when there is no independent exam to keep them honest. As Columbia Heights Principal Maria Tukeva concluded many years ago, her students learn more and are better prepared for college by taking an AP course, even if most don’t perform well on the AP exam.

AVID, the nation’s largest college-readiness program, insists that average students be put in AP or IB but gives them extra tutoring. Washington suburban districts have found that the added support works. More D.C. schools have moved in that direction.

Seventy-five percent of D.C. public school AP students still fail the exams, but the number passing has grown from 295 in 2008 to 445 last year. I have yet to find any schools making more progress by challenging their students less.