RALEIGH — A few weeks ago, the Associated Press and a nonprofit journalism outfit called The Markup released a dataset and news stories purporting to prove the existence of pervasive discrimination against racial minorities by mortgage lenders. The McClatchy newspapers in North Carolina (The Charlotte Observer, The News & Observer in Raleigh, and the Herald-Sun in Durham) splashed the Markup/AP findings across their front pages and contributed additional reporting about the North Carolina-specific data.

I grimaced when I saw the headlines. I groaned as I read the stories.

These kinds of allegations are old hat. Long ago, they likely had some validity, back when bankers and other lenders were foolish enough to let personal bigotry interfere with their responsibility to maximize return on investment assets.

Prejudice is morally wrong. In business, it is also immensely foolish. If you refuse to hire the best people because of their sex, sexuality, or skin color, your smarter competitors will gain at your expense. In the case of mortgage lending, the past practice of redlining harmed not only the targeted minorities but also the institutions that refused to offer them loans. The latter were leaving money on the table — interest payments on principle they’d refused to lend to qualified borrowers unlikely to default.

Market pressures tend to subvert discriminatory behavior. I’m not alleging that free enterprise yields perfect outcomes, regarding this or any other matter. Some economic actors really do prefer to lose income in order to indulge their prejudices. But beware of those who claim the only tools against discrimination are legislation and litigation. Competition is a very useful one.

To return to the question of mortgage lending attempts to prove the existence of discrimination by examining loan-approval rates, as the Markup/AP team tried to do, are wrongheaded. External analysts lack the complete set of information about loan applicants, including credit scores, that financial institutions use to guide their decisions.

A more revealing approach is to examine not the “front end” of the process, as it were, but the “back end.” How often do borrowers default on their mortgages? If lenders make their decisions without prejudice, then the default rates for, say, white and Hispanic customers ought to be roughly the same. That is, default rates would show lenders are equally willing to take a risk with a white applicant as with an otherwise comparable Hispanic applicant.

If, on the other hand, a lender takes ethnicity into account and assumes whites are more trustworthy — more likely to pay their loans back — than Hispanics are, then the lender will award more loans to white applicants than to Hispanic applicants with the same incomes, debts, credit scores, and financial history. That means, in turn, that the prejudiced lender will experience a lower average default rate for Hispanic customers than for white customers.

The statistical analysis involved is a bit more complicated than any short explanation can convey, I admit, and over time economists have persuasively argued that default-rate data need themselves to be risk-adjusted. Still, if someone purports to assess the extent of discrimination in lending without paying close attention to default rates, that someone is either poorly informed or is actively trying to misinform.

You won’t be surprised to learn that the Markup/AP analysis, parroted by some newspapers, didn’t pay close attention to default rates. Edward Pinto and Tobias Peter, fellows with the American Enterprise Institute’s Housing Center, have now performed precisely the analysis that should have been performed all along. They found that risk-adjusted default rates on mortgage loans are either the same or higher for black and Hispanic borrowers than for white borrowers.

There is, in other words, no evidence here of systematic discrimination against racial minorities by mortgage lenders. The AEI Housing Center’s study is only the latest of several producing a similar conclusion. Those who allege pervasive discrimination are very much aware of this flaw in their argument. That they continue to peddle it reflects poorly on them — and on those who assist them.

John Hood is a John Locke Foundation board member and author of the new novel Mountain Folk, a historical fantasy set during the American Revolution (MountainFolkBook.com).