President Donald Trump decried Thursday that the U.S. is not taking in enough immigrants from Norway and is accepting too many arrivals from Haiti, El Salvador and Africa. He combined this with some flowery language I would prefer not to reproduce. There has been a vociferous emotional reaction, but I’d like to take a more sober tack and consider what the data actually tell us, focusing on Africa and Norway.

One of the most striking facts, unbeknown even to many immigration advocates, is the superior education of Africans coming to this country. Of adults ages 25 or older born in Africa and living here, 41.7 have a bachelor’s degree or more, according to 2009 data. For contrast, the native-born population has a bachelor’s degree or more at the much lower rate of only 28.1 percent in these estimates, and foreign-born adults as a whole have a college degree at the rate of 26.8 percent, both well below the African rate.

How about high school degrees? About one-third of immigrants overall lack this credential, but only 11.7 percent of African-born migrants don’t have a high school degree — close to the estimated rate for native-born Americans, 11.4 percent.

Or consider Nigerian-Americans, Nigeria being Africa’s most populous nation: Their education levels are among the very highest in the U.S., above those of Asians, with 17 percent having a master’s degree.

About three-quarters of African migrants speak English, and they have above-average rates of labor force participation. They are also much less likely to commit violent crimes than native-born Americans.

That implies we could accept more African immigrants with mutual benefit. Subjectively, I would also note that sub-Saharan Africa is the region where I encounter the least anti-American sentiment. That’s broadly consistent with these poll results.

As a resident of the Washington, D.C., area, I live alongside an especially high number and proportion of African immigrants. It is well-known in this region that African immigration outcomes in terms of education, starting new businesses, safety and assimilation are quite positive.

“They’re not sending us their best people” is a claim I hear from Trump in his speeches and news conferences. Yet that’s the opposite of the truth when it comes to Africa.

How about Norwegians? During America’s earlier age of mass migration starting in the late 19th century, we received many Norwegians. They were especially likely to come from low-skilled backgrounds, they had problems assimilating and about 70 percent returned to their home country. If we compare the 16 immigrant groups from that time for which we have data, the Norwegians and the Portuguese did the worst in terms of wage gaps.

To be clear, I think this experiment with Norwegian migration has more than worked out all right, as Norwegian-Americans now have above-average levels of income and they have assimilated extremely well. But this is a cautionary tale, indicating that the groups one might think would succeed right away often face big struggles. Ole Edvart Rølvaag’s “Giants in the Earth,” the famous 1920s novel of Norwegian migration to the Dakotas in the 1870s, shows that the enterprise was highly fraught and that assimilation was a major issue. It is noteworthy that the novel was originally published in Norwegian, whereas the major Nigerian and Nigerian-American novels of today are typically written and first published in English.

It would be a mistake to look at these comparisons and conclude that somehow Africans are intrinsically superior to Norwegians. In fact, there is some pretty simple economic theory at work. The harder it is to get from one country to another, the more the immigration process selects for individuals who are especially ambitious and resourceful.

Economist Edward Lazear suggests a simple experiment: Consider immigrants to the U.S. from Algeria, Israel and Japan, and rank them in order of most- to least-educated. The correct answer? Algeria, Israel then Japan. That may be counterintuitive at first glance, but it’s easy to see how it works. If you are Algerian and educated, or aspire to be educated, your prospects in Algeria are relatively poor. A talented, educated person in Japan or Israel can do just fine by staying at home. These kinds of considerations explain about 73 percent of the variation in the educational outcomes of migrants.

In other words, Trump is not only being offensive, he is also quite wrong.

Tyler Cowen is a Bloomberg View columnist. He is a professor of economics at George Mason University and writes for the blog Marginal Revolution. His books include “The Complacent Class: The Self-Defeating Quest for the American Dream.”